Support fused multiply-adds in fully-masked reductions
[official-gcc.git] / gcc / ChangeLog
blob20ed355ca124bdc675332ceace84a8e312cbb62f
1 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2             Alan Hayward  <alan.hayward@arm.com>
3             David Sherwood  <david.sherwood@arm.com>
5         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
6         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
7         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8         plus and minus and convert them into IFN_COND_FMA-based sequences.
9         (convert_mult_to_fma): Handle conditional plus and minus.
11 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
14         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
15         (cond_fnms_optab): New optabs.
16         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
17         internal functions.
18         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
19         * internal-fn.h (get_conditional_internal_fn): Declare.
20         (get_unconditional_internal_fn): Likewise.
21         * internal-fn.c (cond_ternary_direct): New macro.
22         (expand_cond_ternary_optab_fn): Likewise.
23         (direct_cond_ternary_optab_supported_p): Likewise.
24         (FOR_EACH_COND_FN_PAIR): Likewise.
25         (get_conditional_internal_fn): New function.
26         (get_unconditional_internal_fn): Likewise.
27         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
28         (gimple_match_op::gimple_match_op): Add a new overload for 5
29         operands.
30         (gimple_match_op::set_op): Likewise.
31         (gimple_resimplify5): Declare.
32         * genmatch.c (decision_tree::gen): Generate simplifications for
33         5 operands.
34         * gimple-match-head.c (gimple_simplify): Define an overload for
35         5 operands.  Handle calls with 5 arguments in the top-level overload.
36         (convert_conditional_op): Handle conversions from unconditional
37         internal functions to conditional ones.
38         (gimple_resimplify5): New function.
39         (build_call_internal): Pass a fifth operand.
40         (maybe_push_res_to_seq): Likewise.
41         (try_conditional_simplification): Try converting conditional
42         internal functions to unconditional internal functions.
43         Handle 3-operand unconditional forms.
44         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
45         Define ternary equivalents of the current rules for binary conditional
46         internal functions.
47         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
48         ternary operations.
49         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
50         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
51         (optab): Handle them.
52         (SVE_COND_FP_TERNARY): New int iterator.
53         (sve_fmla_op, sve_fmad_op): New int attributes.
54         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
55         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
56         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
58 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
60         * target.def (preferred_else_value): New target hook.
61         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
62         * doc/tm.texi: Regenerate.
63         * targhooks.h (default_preferred_else_value): Declare.
64         * targhooks.c (default_preferred_else_value): New function.
65         * internal-fn.h (conditional_internal_fn_code): Declare.
66         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
67         (get_conditional_internal_fn): Use it.
68         (conditional_internal_fn_code): New function.
69         * gimple-match.h (gimple_match_cond): New struct.
70         (gimple_match_op): Add a cond member function.
71         (gimple_match_op::gimple_match_op): Update all forms to take a
72         gimple_match_cond.
73         * genmatch.c (expr::gen_transform): Use the same condition as res_op
74         for the suboperation, but don't specify a particular else_value.
75         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
76         (visit_nary_op, visit_reference_op_load): Pass
77         gimple_match_cond::UNCOND to the gimple_match_op constructor.
78         * gimple-match-head.c: Include tree-eh.h
79         (convert_conditional_op): New function.
80         (maybe_resimplify_conditional_op): Likewise.
81         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
82         (gimple_resimplify2): Likewise.
83         (gimple_resimplify3): Likewise.
84         (gimple_resimplify4): Likewise.
85         (maybe_push_res_to_seq): Return null for conditional operations.
86         (try_conditional_simplification): New function.
87         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
88         constructor.
89         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
90         IFN_COND_* call.
91         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
92         function.
93         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
95 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
97         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
98         DECL_FCONTEXT
99         (hash_tree): Do not hash DECL_FCONTEXT
100         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
101         Do not stream DECL_FCONTEXT.
102         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
103         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
105 2018-07-12  Richard Biener  <rguenther@suse.de>
107         PR debug/86462
108         * dwarf2out.c (gen_block_die): Only output blocks when they have
109         at least one !DECL_IGNORED_P variable.
111 2018-07-12  Richard Biener  <rguenther@suse.de>
113         PR target/84829
114         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
115         Remove -mieee-fp handling.
117 2018-07-12  Richard Biener  <rguenther@suse.de>
119         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
120         left-over from last patch.
122 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
124         PR tree-optimization/86492
125         * gimple-ssa-store-merging.c
126         (imm_store_chain_info::coalesce_immediate_stores): Call
127         check_no_overlap even for the merge_overlapping case.  Formatting fix.
129 2018-07-12  Richard Biener  <rguenther@suse.de>
131         PR middle-end/86479
132         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
133         move possibly trapping operations into the conditional.
135 2018-07-12  Richard Biener  <rguenther@suse.de>
137         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
138         (vn_lookup_simplify_result): Remove recursion limit applied
139         here.
140         (vn_nary_build_or_lookup_1): Adjust.
141         (try_to_simplify): Likewise.
142         * gimple-match-head.c (gimple_resimplify1): Instead apply one
143         here.
144         (gimple_resimplify2): Likewise.
145         (gimple_resimplify3): Likewise.
146         (gimple_resimplify4): Likewise.
148 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
150         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
151         Use __mmask64 type instead of __mmask8 for __M argument.
152         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
153         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
154         __U argument.
155         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
156         __mmask16 for __M argument.
157         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
158         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
159         to __mmask16 instead of __mmask8.
160         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
161         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
162         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
163         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
164         instead of __mmask16 for __U argument.
165         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
166         __mmask16 instead of __mmask8 for __U argument.
167         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
168         __U argument.
169         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
170         __mmask16.
171         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
172         argument.
173         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
174         __U argument.
175         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
176         __mmask16.
177         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
178         of __mmask16.
179         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
180         __U argument.
181         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
182         __U argument.
183         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
184         __U argument.
185         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
186         __U argument.
187         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
188         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
189         return type as well as __M argument type and all casts from __mmask8
190         to __mmask32.
191         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
192         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
193         return type as well as __M argument type and all casts from __mmask8
194         to __mmask16.
195         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
196         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
197         return type as well as __M argument type and all casts from __mmask8
198         to __mmask32.
199         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
200         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
201         return type as well as __M argument type and all casts from __mmask8
202         to __mmask16.
203         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
204         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
205         __mmask16.
207 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
209         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
210         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
211         for __U argument.
213 2018-07-11  Paul Koning  <ni1d@arrl.net>
215         * doc/md.texi (define_subst): Document how multiple occurrences of
216         the same argument in the replacement pattern are handled.
218 2018-07-11  Paul Koning  <ni1d@arrl.net>
220         * doc/extend.texi (Common Variable Attributes): Move "mode" into
221         alphabetical order.
222         (Common Type Attributes): Add "mode" attribute.
224 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
226         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
227         stream DECL_ORIGINAL_TYPE.
228         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
229         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
230         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
231         Do not walk original type.
232         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
233         external decls.
234         (write_ts_decl_non_common_tree_pointers): Do not stream
235         DECL_ORIGINAL_TYPE
236         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
237         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
239 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
241         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
242         thread twice from the same starting edge.
244 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
246         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
247         * gimple.c (gimple_call_nonnull_result_p): ...here...
248         (gimple_call_nonnull_arg): ...and here.
249         * gimple.h (gimple_call_nonnull_result_p): New.
250         (gimple_call_nonnull_arg): New.
252 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
254         * config/arm/arm-cpus.in: Move information from fpu field of each
255         cpu definition to the isa field.
256         * config/arm/parsecpu.awk (fpu): Delete match rule.
257         (gen_comm_data): Don't add bits from the CPU's FPU entry.
259 2018-07-11  Richard Biener  <rguenther@suse.de>
261         PR debug/86457
262         * dwarf2out.c (init_sections_and_labels): Use
263         output_asm_line_debug_info consistently.
264         (dwarf2out_early_finish): Likewise.
265         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
266         type units.
268 2018-07-11  Richard Biener  <rguenther@suse.de>
270         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
271         Rework father_bb setting in a way to avoid propagating constants
272         multiple times on a loop body.
274 2018-07-10  Mark Wielaard  <mark@klomp.org>
276         PR debug/86459
277         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
279 2018-07-10  Richard Biener  <rguenther@suse.de>
281         * hash-map.h (hash_map::iterator::operator*): Return
282         references to key and value.
284 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
286         PR c++/86443
287         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
288         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
289         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
290         (gimplify_omp_for): For composite loops, move outer
291         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
292         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
293         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
294         TREE_LIST for both the original class iterator and the "last" helper
295         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
296         loop, remember has_decl_expr from outer composite loops for the
297         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
299 2018-07-09  Martin Sebor  <msebor@redhat.com>
301         PR middle-end/77357
302         PR middle-end/86428
303         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
304         accessing implicitly initialized array elements.
305         * expr.c (string_constant): Handle string initializers of
306         character arrays within aggregates.
307         * gimple-fold.c (fold_array_ctor_reference): Add argument.
308         Store element offset.  As a special case, handle zero size.
309         (fold_nonarray_ctor_reference): Same.
310         (fold_ctor_reference): Add argument.  Store subobject offset.
311         * gimple-fold.h (fold_ctor_reference): Add argument.
313 2018-07-09  Paul Koning  <ni1d@arrl.net>
315         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
316         (pdp11_insn_cost): New function.
317         (pdp11_md_asm_adjust): New function.
318         (TARGET_INVALID_WITHIN_DOLOOP): Define.
319         (pdp11_rtx_costs): Update to match machine better.
320         (output_addr_const_pdp11): Correct format mismatch warnings.
321         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
322         * config/pdp11/pdp11.md: General change to add base_cost and/or
323         length attributes for use by new pdp11_insn_cost function.
324         (MIN_BRANCH): Correct definition.
325         (MIN_SOB): Ditto.
326         (doloop_end): Use standard pattern name for looping pattern.
327         (doloop_end_nocc): New.
328         (movsf): Add another constraint alternative.
329         (zero_extendqihi2): Add constraint alternatives for not in place
330         extend.
331         (zero_extendhisi2): Remove.
332         (shift patterns): Add CC handling variants.
333         (bswaphi2): New.
334         (bswapsi2): New.
335         (rothi3): New.
336         (define_peephole2): New peephole to recognize mov that sets CC for
337         subsequent test.
339 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
341         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
342         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
343         wi::add.
345 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
347         PR c/86420
348         * real.c (real_nextafter): Return true if result is denormal.
350 2018-07-09  Martin Liska  <mliska@suse.cz>
352         * common.opt: Add back wrongly removed attribute.
354 2018-07-09  Richard Biener  <rguenther@suse.de>
356         PR debug/86413
357         * dwarf2out.c (gen_block_die): For an early generated DIE
358         always output high/low PC attributes.
360 2018-07-09  Tom de Vries  <tdevries@suse.de>
362         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
363         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
364         onto VAR_DECL with abstract origin.
366 2018-07-07  Jim Wilson  <jimw@sifive.com>
368         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
370 2018-07-07  Tom de Vries  <tdevries@suse.de>
372         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
374 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
376         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
377         overflow_type.
378         (combine_bound): Use wide-int overflow calculation instead of
379         rolling our own.
380         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
381         overflow_type.
382         * fold-const.c (int_const_binop_2): Same.
383         (extract_muldiv_1): Same.
384         (fold_div_compare): Same.
385         (fold_abs_const): Same.
386         * match.pd: Same.
387         * poly-int.h (add): Same.
388         (sub): Same.
389         (neg): Same.
390         (mul): Same.
391         * predict.c (predict_iv_comparison): Same.
392         * profile-count.c (slow_safe_scale_64bit): Same.
393         * simplify-rtx.c (simplify_const_binary_operation): Same.
394         * tree-chrec.c (tree_fold_binomial): Same.
395         * tree-data-ref.c (split_constant_offset_1): Same.
396         * tree-if-conv.c (idx_within_array_bound): Same.
397         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
398         * tree-ssa-phiopt.c (minmax_replacement): Same.
399         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
400         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
401         * vr-values.c (vr_values::adjust_range_with_scev): Same.
402         * wide-int.cc (wi::add_large): Same.
403         (wi::mul_internal): Same.
404         (wi::sub_large): Same.
405         (wi::divmod_internal): Same.
406         * wide-int.h: Change overflow type to overflow_type for neg, add,
407         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
408         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
409         mul_internal, divmod_internal.
410         (overflow_type): New enum.
411         (accumulate_overflow): New.
413 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
415         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
416         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
418 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
420         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
421         argument is checked for zero before entering loop, avoid checking again.
423 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
425         * gimplify.h (generic_expr_could_trap_p): Set as global function.
426         * gimplify.h (generic_expr_could_trap_p): Likwise.
427         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
429 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
431         PR tree-optimization/86401
432         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
433         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
434         (fold_bit_and_mask): ... here.  New helper function for match.pd.
435         * fold-const.h (fold_bit_and_mask): Declare.
436         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
438 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
440         PR target/86324
441         * target.def (translate_mode_attribute): New hook.
442         * targhooks.h (default_translate_mode_attribute): Declare.
443         * targhooks.c (default_translate_mode_attribute): New function.
444         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
445         * doc/tm.texi: Regenerate.
446         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
447         (rs6000_translate_mode_attribute): New function.
449 2018-07-06  Paul Koning  <ni1d@arrl.net>
451         * doc/md.texi (define_split): Document DONE and FAIL.
452         (define_peephole2): Ditto.
454 2018-07-05  Jeff Law  <law@redhat.com>
456         PR tree-optimization/86010
457         * tree-ssa-dse.c (compute_trims): More aggressively trim at
458         both the head and tail of mem* and str* calls.
460 2018-07-05  Jim Wilson  <jimw@sifive.com>
462         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
464 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com> 
466         * config/aarch64/aarch64-simd.md: correct flags text for 
467         MIN_EXPR replacement.
469 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
471         * configure: Regenerated.
473 2018-07-05  Carl Love  <cel@us.ibm.com>
475         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
476         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
477         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
478         VSX_BUILTIN_DOUBLEL_V4SF.
480 2018-07-05  Martin Sebor  <msebor@redhat.com>
482         PR c++/86400
483         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
484         than its domain to compute its the upper bound of a char array.
486 2018-07-05  Nathan Sidwell  <nathan@acm.org>
488         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
489         * doc/cpp.texi: Update comment.
490         * doc/tm.texi: Rebuilt.
491         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
492         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
493         * doc/extend.texi (Backwards Compatibility): Clarify it is system
494         headers affected by extern "C".
495         * system.h: Poison NO_IMPLICIT_EXTERN_C.
496         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
497         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
498         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
499         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
500         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
501         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
502         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
503         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
504         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
505         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
506         config/sparc/sp64-elf.h, config/spu/spu.h,
507         config/stormy16/stormy16.h, config/v850/v850.h,
508         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
509         define NO_IMPLICIT_EXTERN_C.
510         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
512 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
514         PR target/84711
515         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
516         instead of GET_MODE_SIZE when comparing Units.
518 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
520         PR target/84711
521         * rtlanal.c (set_noop_p): Constrain on mode change,
522         include hard-reg-set.h
524 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
526         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
528 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
530         Revert
531         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
533         PR sanitizer/84250
534         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
535         libasan.
536         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
538 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
540         PR sanitizer/84250
541         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
542         libasan.
543         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
545 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
547         PR middle-end/86380
548         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
550 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
552         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
553         neg_*_op* variables.
555 2018-07-04  Martin Liska  <mliska@suse.cz>
557         * tree-switch-conversion.c: Define
558         max_ratio_for_speed and max_ratio_for_size constants.
560 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
561             Martin Liska  <mliska@suse.cz>
563         PR middle-end/66240
564         PR target/45996
565         PR c/84100
566         * common.opt: Rename align options with 'str_' prefix.
567         * common/config/i386/i386-common.c (set_malign_value): New
568         function.
569         (ix86_handle_option): Use it to set -falign-* options/
570         * config/aarch64/aarch64-protos.h (struct tune_params): Change
571         type from int to string.
572         * config/aarch64/aarch64.c: Update default values from int
573         to string.
574         * config/alpha/alpha.c (alpha_override_options_after_change):
575         Likewise.
576         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
577         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
578         max skip conditionally.
579         * config/i386/freebsd.h (SUBALIGN_LOG): New.
580         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
581         max skip conditionally.
582         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
583         max skip conditionally.
584         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
585         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
586         max skip conditionally.
587         * config/i386/i386.c (struct ptt): Change type from int to
588         string.
589         (ix86_default_align): Set default values.
590         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
591         max skip conditionally.
592         * config/i386/iamcu.h (SUBALIGN_LOG): New.
593         (ASM_OUTPUT_MAX_SKIP_ALIGN):
594         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
595         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
596         max skip conditionally.
597         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
598         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
599         * config/i386/x86-64.h (SUBALIGN_LOG): New.
600         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
601         max skip conditionally.
602         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
603         * config/ia64/ia64.c (ia64_option_override): Set default values
604         for alignment options.
605         * config/m68k/m68k.c: Handle new str_align_* options.
606         * config/mips/mips.c (mips_set_compression_mode): Change
607         type of constants.
608         (mips_option_override): Set default values for options.
609         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
610         Likewise.
611         * config/rs6000/rs6000.c (rs6000_option_override_internal):
612         Likewise.
613         * config/rx/rx.c (rx_option_override): Likewise.
614         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
615         (LABEL_ALIGN): Use align_labels_log.
616         (LOOP_ALIGN): Use align_loops_align.
617         * config/s390/s390.c (s390_asm_output_function_label): Use new
618         macros.
619         * config/sh/sh.c (sh_override_options_after_change):
620         Change type of constants.
621         * config/spu/spu.c (spu_sched_init): Likewise.
622         * config/sparc/sparc.c (sparc_option_override): Set default
623         values for options.
624         * config/visium/visium.c (visium_option_override): Likewise.
625         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
626         emit p2align format with last argument if it's not needed.
627         * doc/invoke.texi: Document extended format of -falign-*.
628         * final.c: Use align_labels alignment.
629         * flags.h (struct target_flag_state): Change type to use
630         align_flags.
631         (struct align_flags_tuple): New.
632         (struct align_flags): Likewise.
633         (align_loops_log): Redefine macro to use new types.
634         (align_loops_max_skip): Redefine macro to use new types.
635         (align_jumps_log): Redefine macro to use new types.
636         (align_jumps_max_skip): Redefine macro to use new types.
637         (align_labels_log): Redefine macro to use new types.
638         (align_labels_max_skip): Redefine macro to use new types.
639         (align_functions_log): Redefine macro to use new types.
640         (align_loops): Redefine macro to use new types.
641         (align_jumps): Redefine macro to use new types.
642         (align_labels): Redefine macro to use new types.
643         (align_functions): Redefine macro to use new types.
644         (align_functions_max_skip): Redefine macro to use new types.
645         (align_loops_value): New macro.
646         (align_jumps_value): New macro.
647         (align_labels_value): New macro.
648         (align_functions_value): New macro.
649         * function.c (invoke_set_current_function_hook): Propagate
650         alignment values from flags to global variables default in
651         topleev.h.
652         * ipa-icf.c (sem_function::equals_wpa): Use
653         cl_optimization_option_eq instead of memcmp.
654         * lto-streamer.h (cl_optimization_stream_out): Support streaming
655         of string types.
656         (cl_optimization_stream_in): Likewise.
657         * optc-save-gen.awk: Support strings in cl_optimization.
658         * opth-gen.awk: Likewise.
659         * opts.c (finish_options): Remove error checking of invalid
660         value ranges.
661         (MAX_CODE_ALIGN): Remove.
662         (MAX_CODE_ALIGN_VALUE): Likewise.
663         (parse_and_check_align_values): New function.
664         (check_alignment_argument): Likewise.
665         (common_handle_option): Use check_alignment_argument.
666         * opts.h (parse_and_check_align_values): Declare.
667         * toplev.c (init_alignments): Remove.
668         (read_log_maxskip): New.
669         (parse_N_M): Likewise.
670         (parse_alignment_opts): Likewise.
671         (backend_init_target): Remove usage of init_alignments.
672         * toplev.h (parse_alignment_opts): Declare.
673         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
674         argument.
675         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
676         * tree.c (cl_option_hasher::equal): New.
677         * varasm.c: Use new global macros.
679 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
681         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
682         Use a simpler align directive also if MAXSKIP = ALIGN-1.
683         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
684         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
685         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
686         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
687         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
688         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
689         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
690         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
691         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
692         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
693         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
695 2018-07-04  Martin Liska  <mliska@suse.cz>
696             Jonathan Wakely  <jwakely@redhat.com>
698         * coverage.c: Use correct type.
699         * doc/invoke.texi: Language correction.
701 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
703         PR target/85620
704         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
705         ENDBRANCH for non-tail call which may return via indirect branch.
706         * doc/extend.texi: Document indirect_return attribute.
708 2018-07-03  Martin Sebor  <msebor@redhat.com>
710         PR tree-optimization/86274
711         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
712         precondition.
713         (format_floating): Correct handling of infinities and NaNs.
715 2018-07-03  Martin Sebor  <msebor@redhat.com>
717         * print-tree.c (print_real_cst): New function.
718         (print_node_brief): Call it.
719         (print_node): Ditto.
721 2018-07-03  Jeff Law  <law@redhat.com>
723         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
724         into a single pattern.
726         * config/h8300/h8300.md (ors code_iterator): New.
727         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
728         a single pattern and single splitter.
729         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
730         (iorqi3_1, xorqi3_1): Likewise.
731         (iorqi3, xorqi3 expanders): Similarly.
733         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
734         (movmd_internal) into a single pattern using the P mode iterator.
735         (movmd splitters): Similarly.
736         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
737         (movsd splitters): Similarly.
739         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
740         ADDB, ADDW and ADDL into a single ADD attribute which selects the
741         right table based on the size of the operand.
742         * config/h8300/h8300.md (length_table): Corresponding changes. All
743         references to "addb", "addw" and "addl" changed to "add".
744         (btst patterns): Merge two variants into a single pattern.
745         (tstqi, tsthi): Likewise.
746         (addhi3_incdec, addsi3_incdec): Likewise.
747         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
748         (mulhi3, mulsi3): Likewise.
749         (udivhi3, udivsi3): Likewise.
750         (divhi3, divsi3): Likewise.
751         (andorqi3, andorhi3, andorsi3): Likewise.
753 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
755         PR target/85694
756         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
757         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
759 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
761         PR tree-optimization/85694
762         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
763         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
764         UNSPEC_URHADD.
765         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
766         (<u>avg<mode>3_ceil): New patterns.
768 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
770         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
771         scan-tree-dump directive.
772         * gcc.dg/vect/slp-perm-2.c: Likewise.
773         * gcc.dg/vect/slp-perm-3.c: Likewise.
774         * gcc.dg/vect/slp-perm-5.c: Likewise.
775         * gcc.dg/vect/slp-perm-6.c: Likewise.
776         * gcc.dg/vect/slp-perm-7.c: Likewise.
777         * gcc.dg/vect/slp-perm-8.c: Likewise.
779 2018-07-03  Marek Polacek  <polacek@redhat.com>
781         PR middle-end/86202
782         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
784 2018-07-03  Richard Biener  <rguenther@suse.de>
786         PR ipa/86389
787         * tree-ssa-structalias.c (find_func_clobbers): Properly
788         handle indirect calls.
790 2018-07-03  Jeff Law  <law@redhat.com>
792         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
793         (shifts): New code iterator.
794         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
795         expander.  Fix HImode handling on H8/SX.
796         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
797         (subqi3, subhi3, subsi3 expanders): Likewise.
798         (andqi3, andhi3, andsi3 expanders): Likewise.
799         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
800         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
801         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
802         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
803         (zero_extendqihi2, zero_extendqisi2): Likewise.
804         (extendqihi2, extendqisi2): Likewise.
805         (rotlqi3, rotlhi3, rotlsi3): Likewise.
806         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
807         (rotlqi3_1, rotlhi3_1): Likewise.
808         (logicalhi3_sn, logicalsi3_sn): Likewise.
809         (logicalhi3, logicalsi3): Likewise.
811 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
813         * tree-vect-patterns.c (vect_recog_rotate_pattern)
814         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
815         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
816         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
817         type to append_pattern_def_seq instead of creating a stmt_vec_info
818         directly.
819         (build_mask_conversion): Likewise.  Remove vinfo argument.
820         (vect_add_conversion_to_patterm): Likewise, renaming to...
821         (vect_add_conversion_to_pattern): ...this.
822         (vect_recog_mask_conversion_pattern): Update call to
823         build_mask_conversion.  Pass the vector type to
824         append_pattern_def_seq here too.
825         (vect_recog_gather_scatter_pattern): Update call to
826         vect_add_conversion_to_pattern.
828 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
830         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
831         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
832         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
833         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
834         STMT_VINFO_PATTERN_DEF_SEQ to null here.
835         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
836         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
837         append_pattern_def_seq instead of new_pattern_def_seq.
838         (vect_recog_divmod_pattern): Do both of the above.
839         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
840         is null.
842 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
844         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
845         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
846         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
847         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
848         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
849         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
850         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
851         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
852         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
853         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
854         parameter with a single stmt_vec_info.
855         (vect_recog_func_ptr): Likewise.
856         (vect_recog_gather_scatter_pattern): Likewise, folding in...
857         (vect_try_gather_scatter_pattern): ...this.
858         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
859         the stmt_vec_info of the statement to be matched.  Don't clear
860         STMT_VINFO_RELATED_STMT.
861         (vect_pattern_recog): Update call accordingly.
863 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
865         PR tree-optimization/85694
866         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
867         (uavgM3_ceil): Document new optabs.
868         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
869         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
870         functions.
871         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
872         (savg_ceil_optab): New optabs.
873         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
874         (vect_vect_recog_func_ptrs): Add it.
875         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
876         constant directly from the associated lhs.
878 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
880         * tree-vect-patterns.c (vect_split_statement): New function.
881         (vect_convert_input): Use it to try to split an existing cast.
883 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
885         * poly-int.h (print_hex): New function.
886         * dumpfile.h (dump_dec, dump_hex): Declare.
887         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
888         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
889         min_input_precision, operation_precision and operation_sign.
890         * tree-vect-patterns.c (vect_get_range_info): New function.
891         (vect_same_loop_or_bb_p, vect_single_imm_use)
892         (vect_operation_fits_smaller_type): Delete.
893         (vect_look_through_possible_promotion): Add an optional
894         single_use_p parameter.
895         (vect_recog_over_widening_pattern): Rewrite to use new
896         stmt_vec_info infomration.  Handle one operation at a time.
897         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
898         (vect_truncatable_operation_p, vect_set_operation_type)
899         (vect_set_min_input_precision): New functions.
900         (vect_determine_min_output_precision_1): Likewise.
901         (vect_determine_min_output_precision): Likewise.
902         (vect_determine_precisions_from_range): Likewise.
903         (vect_determine_precisions_from_users): Likewise.
904         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
905         (vect_vect_recog_func_ptrs): Put over_widening first.
906         Add cast_forwprop.
907         (vect_pattern_recog): Call vect_determine_precisions.
909 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
911         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
912         statements that have been replaced by further pattern statements.
913         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
915 2018-07-03  Richard Biener  <rguenther@suse.de>
917         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
918         always set *dt.  Dump vectype in vectype overload.
919         * dumpfile.h (dump_gimple_expr): New function.
920         (dump_gimple_expr_loc): Likewise.
921         * dumpfile.c (dump_gimple_expr): New function.
922         (dump_gimple_expr_loc): Likewise.
924 2018-07-02  Jeff Law  <law@redhat.com>
926         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
927         the H8/300, H8/300H and H8/S variants into a single pattern.
928         (movhi_h8300, movqi_h8300hs): Similarly.
929         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
930         (QHI mode iterator): New.
932         * config/h8300/h8300.md: Remove trailing whitespace.
934 2018-07-02  Jim Wilson  <jimw@sifive.com>
936         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
937         instead of emit_insn for interrupt returns.
938         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
939         (riscv_sret, riscv_uret): Likewise.
941 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
943         * pretty-print.c (selftest::test_pp_format): Move save and restore
944         of quotes to class auto_fix_quotes, and add an instance.
945         * selftest.c: Include "intl.h".
946         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
947         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
948         * selftest.h (selftest::auto_fix_quotes): New class.
950 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
952         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
953         (aarch64_sve_prepare_conditional_op): Remove.
954         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
955         Allow aarch64_simd_reg_or_zero as select operand; remove
956         the aarch64_sve_prepare_conditional_op call.
957         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
958         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
959         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
960         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
961         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
962         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
963         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
964         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
965         and a splitters to match all of the *_any patterns.
966         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
968         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
969         (SVE_COND_FP_BINARY_REV): Remove.
970         (sve_int_op_rev, sve_fp_op_rev): New.
971         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
972         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
973         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
974         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
975         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
976         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
977         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
978         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
979         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
981         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
982         Remove match_dup 1 from the inner unspec.
983         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
985         * config/aarch64/aarch64.md (movprfx): New attr.
986         (length): Default movprfx to 8.
987         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
988         (*madd<SVE_I>, *msub<SVE_I): Likewise.
989         (*<su>mul<SVE_I>3_highpart): Likewise.
990         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
991         (*v<ASHIFT><SVE_I>3): Likewise.
992         (*<su><MAXMIN><SVE_I>3): Likewise.
993         (*<su><MAXMIN><SVE_F>3): Likewise.
994         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
995         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
996         (*div<SVE_F>4): Likewise.
998 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
1000         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1001         in dump string.
1003 2018-07-02  Richard Biener  <rguenther@suse.de>
1005         PR tree-optimization/86363
1006         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1007         memset argument refers to a non-variable address.
1009 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
1011         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1012         {PLUS,MINUS}_EXPR code to...
1013         (adjust_symbolic_bound): ...here,
1014         (combine_bound): ...here,
1015         (set_value_range_with_overflow): ...and here.
1017 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
1019         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1020         code...
1021         (extract_range_from_abs_expr): ...here.
1023 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
1025         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1026         -fno-omit-frame-pointer when not optimizing.
1028 2018-07-02  Martin Liska  <mliska@suse.cz>
1030         PR ipa/86279
1031         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1032         (propagate_nothrow): Likewise.
1034 2018-07-02  Martin Liska  <mliska@suse.cz>
1036         PR ipa/86323
1037         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1039 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
1041         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1042         function in r262149, changing "loc" param from source_location to
1043         const dump_location_t &.
1044         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1045         declaration, as above.
1047 2018-07-01  Paul Koning  <ni1d@arrl.net>
1049         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1050         -munit-asm, -mgnu-asm, -mdec-asm.
1051         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1052         (pdp11_output_labelref): New.
1053         (pdp11_output_def): New.
1054         (pdp11_output_addr_vec_elt): New.
1055         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
1056         %# and %@ format codes.
1057         (pdp11_option_override): New.
1058         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1059         (pdp11_output_ident): New.
1060         (pdp11_asm_named_section): New.
1061         (pdp11_asm_init_sections): New.
1062         (pdp11_file_start): New.
1063         (pdp11_file_end): New.
1064         (output_ascii): Use .ascii/.asciz for -mdec-asm.
1065         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
1066         %o, like %c but octal.
1067         (pdp11_option_override): New.
1068         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1069         -mdec-asm.
1070         (DATA_SECTION_ASM_OP): Ditto.
1071         (READONLY_DATA_SECTION_ASM_OP): New.
1072         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1073         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1074         (ASM_OUTPUT_LABELREF): Ditto.
1075         (ASM_OUTPUT_DEF): Ditto.
1076         (ASM_OUTPUT_EXTERNAL): New.
1077         (ASM_OUTPUT_SOURCE_FILENAME): New.
1078         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1079         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1080         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
1081         %# and %@ format codes.
1082         * config/pdp11/pdp11.opt (mgnu-asm): New.
1083         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1084         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1085         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1087 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
1089         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1090         dereferencing path[] beyond its length.
1091         (debug_path): New.
1092         (debug_all_paths): New.
1093         (rewire_first_differing_edge): New.
1094         (adjust_paths_after_duplication): New.
1095         (duplicate_thread_path): Call adjust_paths_after_duplication.
1096         Add new argument.
1097         (thread_through_all_blocks): Add new argument to
1098         duplicate_thread_path.
1100 2018-06-30  Jim Wilson  <jimw@sifive.com>
1102         * config/riscv/predicates.md (p2m1_shift_operand): New.
1103         (high_mask_shift_operand): New.
1104         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1105         pattern using p2m1_shift_operand.
1106         (lshsi3_zero_extend_3+2): New combiner pattern using
1107         high_mask_shift_operand.
1109 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1111         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1112         split out from...
1113         (vect_recog_rotate_pattern): ...here.
1114         (vect_convert_input): Try to insert casts of invariants in the
1115         preheader.
1116         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1117         preheader to be empty.
1119 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1121         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1122         vector type.  If given, install it in the new statement's
1123         STMT_VINFO_VECTYPE.
1124         (vect_element_precision): New function.
1125         (vect_unpromoted_value): New struct.
1126         (vect_unpromoted_value::vect_unpromoted_value): New function.
1127         (vect_unpromoted_value::set_op): Likewise.
1128         (vect_look_through_possible_promotion): Likewise.
1129         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1130         (vect_widened_op_tree, vect_convert_input): Likewise.
1131         (vect_convert_inputs, vect_convert_output): Likewise.
1132         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1133         to handle the optional cast of the multiplication result and
1134         vect_widened_op_tree to detect the widened multiplication itself.
1135         Do not require the input and output of promotion casts to have
1136         the same sign, but base the signedness of the operation on the
1137         input rather than the result.  If the pattern includes two
1138         promotions, check that those promotions have the same sign.
1139         Do not restrict the MULT_EXPR handling to a double-width result;
1140         handle quadruple-width results and wider.  Use vect_convert_inputs
1141         to convert the inputs to the common type.
1142         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
1143         to handle the optional cast of the ABS result.  Also allow a sign
1144         change or a sign extension between the ABS and MINUS.
1145         Use vect_widened_op_tree to detect the widened subtraction and use
1146         vect_convert_inputs to convert the inputs to the common type.
1147         (vect_handle_widen_op_by_const): Delete.
1148         (vect_recog_widen_op_pattern): New function.
1149         (vect_recog_widen_mult_pattern): Use it.
1150         (vect_recog_widen_shift_pattern): Likewise.
1151         (vect_recog_widen_sum_pattern): Use
1152         vect_look_through_possible_promotion to handle the promoted
1153         PLUS_EXPR operand.
1155 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1157         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1158         the containing gimple_seq *.
1159         * gimple-iterator.h (gsi_for_stmt): Declare it.
1160         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1161         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1162         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1163         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1164         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1165         checks.
1166         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1167         split out from...
1168         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
1169         statement being replaced is part of an existing pattern
1170         definition sequence, inserting the new pattern statements before
1171         the original one.
1172         (vect_pattern_recog_1): Don't return a bool.  If the statement
1173         is already part of a pattern, instead apply pattern matching
1174         to the pattern definition statements.  Don't clear the
1175         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1176         (vect_pattern_recog): Don't break after the first match;
1177         continue processing the pattern definition statements instead.
1178         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1180 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1182         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1183         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1184         (vect_recog_widen_sum_pattern): Use it.
1186 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1188         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1189         phi is not a pattern statement and has not been replaced by
1190         a pattern statement.
1191         * tree-vect-patterns.c (type_conversion_p): Don't check
1192         STMT_VINFO_IN_PATTERN_P.
1193         (vect_recog_vector_vector_shift_pattern): Likewise.
1194         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1195         the pattern statement rather than the original statement; check
1196         directly for a WIDEN_MULT_EXPR here.
1197         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1198         vect_is_simple_use to return the pattern statement rather
1199         than the original statement; use is_pattern_stmt_p to check
1200         for such a pattern statement.
1201         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1202         to return the pattern statement rather than the original statement;
1203         don't do the same transformation here.
1204         (vect_is_simple_use): If the defining statement has been replaced
1205         by a pattern statement, return the pattern statement instead.
1206         Remove the corresponding (local) transformation from the vectype
1207         overload.
1209 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1211         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1212         end and default to null.
1213         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1214         (vectorizable_reduction): Update calls accordingly, dropping the
1215         gimple ** argument if the passed-back statement isn't needed.
1216         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1217         (vect_recog_rotate_pattern): Likewise.
1218         (vect_recog_mask_conversion_pattern): Likewise.
1219         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1220         (vect_mask_constant_operand_p): Likewise.
1221         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1222         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1223         (get_group_load_store_type, get_load_store_type): Likewise.
1224         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1225         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1226         (vectorizable_conversion, vectorizable_assignment): Likewise.
1227         (vectorizable_shift, vectorizable_operation): Likewise.
1228         (vectorizable_store, vect_is_simple_cond): Likewise.
1229         (vectorizable_condition, vectorizable_comparison): Likewise.
1230         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1231         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1232         and move it to the end.  Cope with null def_stmt_outs.
1234 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1236         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1238 2018-06-29  Jeff Law  <law@redhat.com>
1240         * config/v850/v850.c (v850_legitimate_address_p): Handle large
1241         displacements for TARGET_V850E2V3 and newer.
1242         (TARGET_LRA_P): Remove.  Defaults to LRA now.
1243         * config/v850/v850.md (sign23byte_load): Remove.
1244         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1245         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1247 2018-06-29  Martin Liska  <mliska@suse.cz>
1249         PR lto/85759
1250         * coverage.c (coverage_init): Mangle full path name.
1251         * doc/invoke.texi: Document the change.
1252         * gcov-io.c (mangle_path): New.
1253         * gcov-io.h (mangle_path): Likewise.
1254         * gcov.c (mangle_name): Use mangle_path for path mangling.
1256 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1258         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1259         if starting source register is not even.
1261 2018-06-29  Martin Liska  <mliska@suse.cz>
1263         PR tree-optimization/86263
1264         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1265         Make edge redirection.
1267 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
1269         * dumpfile.c (dump_loc): Add indentation based on scope depth.
1270         (dump_scope_depth): New variable.
1271         (get_dump_scope_depth): New function.
1272         (dump_begin_scope): New function.
1273         (dump_end_scope): New function.
1274         * dumpfile.h (get_dump_scope_depth): New declaration.
1275         (dump_begin_scope): New declaration.
1276         (dump_end_scope): New declaration.
1277         (class auto_dump_scope): New class.
1278         (AUTO_DUMP_SCOPE): New macro.
1279         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1280         AUTO_DUMP_SCOPE.
1282 2018-06-29  Richard Biener  <rguenther@suse.de>
1284         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1285         compute_all_dependences succeeds.
1286         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1287         exceed --param loop-max-datarefs-for-datadeps.
1289 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
1291         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1293 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
1295         PR target/86348
1296         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1297         alternative 0 in preferred_for_speed attribute.
1299 2018-06-28  Paul Koning  <ni1d@arrl.net>
1301         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1302         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1303         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1304         * config/pdp11/pdp11.md: Correct "length" attribute calculation
1305         for shift insn patterns.
1307 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
1309         * cgraph.c (cgraph_node::get_body): Replace assignments to
1310         "dump_file" with calls to set_dump_file.
1311         * dumpfile.c (alt_dump_file): Make static, and group with...
1312         (alt_flags): ...this definition.
1313         (dumps_are_enabled): New variable.
1314         (refresh_dumps_are_enabled): New function.
1315         (set_dump_file): New function.
1316         (set_alt_dump_file): New function.
1317         (gcc::dump_manager::dump_start): Replace assignments to
1318         "dump_file" and "alt_dump_file" with calls to set_dump_file and
1319         set_alt_dump_file.
1320         (gcc::dump_manager::dump_finish): Likewise.
1321         * dumpfile.h (alt_dump_file): Delete decl.
1322         (dumps_are_enabled): New variable decl.
1323         (set_dump_file): New function decl.
1324         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1325         global.
1326         * tree-nested.c (lower_nested_functions): Replace assignments to
1327         "dump_file" with calls to set_dump_file.
1329 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1331         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1332         goto_locus of each outgoing edge of each basic block.
1334 2018-06-28  Richard Biener  <rguenther@suse.de>
1336         * dwarf2out.c (decl_scope_table): Remove.
1337         (push_decl_scope): Likewise.
1338         (pop_decl_scope): Likewise.
1339         (gen_type_die_for_member): Do not call push/pop_decl_scope.
1340         (gen_struct_or_union_type_die): Likewise.
1341         (gen_tagged_type_die): Likewise.
1342         (dwarf2out_init): Do not initialize decl_scope_table.
1343         (dwarf2out_c_finalize): Do not free it.
1345 2018-06-28  Richard Biener  <rguenther@suse.de>
1347         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1348         deciding whether to not re-use a DIE.
1350 2018-06-28  Richard Biener  <rguenther@suse.de>
1352         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1353         DW_AT_abstract_origin attribute.
1355 2018-06-28  Martin Liska  <mliska@suse.cz>
1357         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1358         Use newly introduced constants.
1359         * tree-switch-conversion.h (struct jump_table_cluster):
1360         Define max_ratio_for_size and max_ratio_for_speed.
1362 2018-06-28  Martin Liska  <mliska@suse.cz>
1364         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1365         Add new checking assert to catch invalid state.
1366         (jump_table_cluster::can_be_handled): Handle single case
1367         clusters.
1368         (jump_table_cluster::is_beneficial): Bail out for such case.
1369         (bit_test_cluster::find_bit_tests):
1370         Add new checking assert to catch invalid state.
1371         (bit_test_cluster::can_be_handled): Handle single case
1372         clusters.
1373         (bit_test_cluster::is_beneficial): Bail out for such case.
1374         (switch_decision_tree::analyze_switch_statement):
1375         Fix comment.
1377 2018-06-28  Martin Liska  <mliska@suse.cz>
1379         * common.opt: Introduce -completion option.
1380         * gcc.c (driver_handle_option): Handle it.
1381         (driver::main): Print completions if completion
1382         is set.
1383         * opt-suggestions.c (option_proposer::get_completions):
1384         New function.
1385         (option_proposer::suggest_completion): Likewise.
1386         (option_proposer::find_param_completions): Likewise.
1387         (verify_autocompletions): Likewise.
1388         (test_completion_valid_options): Likewise.
1389         (test_completion_valid_params): Likewise.
1390         (in_completion_p): Likewise.
1391         (empty_completion_p): Likewise.
1392         (test_completion_partial_match): Likewise.
1393         (test_completion_garbage): Likewise.
1394         (opt_proposer_c_tests): Likewise.
1395         * opt-suggestions.h: Declare new functions.
1396         * opts.c (common_handle_option): Handle OPT__completion_.
1397         * selftest-run-tests.c (selftest::run_tests): Add
1398         opt_proposer_c_tests.
1399         * selftest.c (assert_str_startswith): New.
1400         * selftest.h (assert_str_startswith): Likewise.
1401         (opt_proposer_c_tests): New.
1402         (ASSERT_STR_STARTSWITH): Likewise.
1404 2018-06-28  Martin Liska  <mliska@suse.cz>
1406         * Makefile.in: Add opt-suggestions.o.
1407         * gcc-main.c: Include opt-suggestions.h.
1408         * gcc.c (driver::driver): Likewise.
1409         (driver::~driver): Remove m_option_suggestions.
1410         (driver::build_option_suggestions): Moved to option_proposer.
1411         (driver::suggest_option): Likewise.
1412         (driver::handle_unrecognized_options): Use option_proposer.
1413         * gcc.h (class driver): Add new memver m_option_proposer.
1414         * opt-suggestions.c: New file.
1415         * opt-suggestions.h: New file.
1417 2018-06-28  Martin Liska  <mliska@suse.cz>
1419         * vec.h (class auto_string_vec): New (moved from auto_argvec).
1420         (auto_string_vec::~auto_string_vec): Likewise.
1422 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1424         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1425         prevent_decl_creation_for_types fields up and add reset_location field.
1426         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1427         statement if id->reset_location is true.
1428         (copy_edges_for_bb): Do not set goto_locus on the new edges if
1429         id->reset_location is true.
1430         (copy_phis_for_bb): Force input_location on the arguments if
1431         id->reset_location is true.
1432         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1433         is set on the function to be inlined.
1435 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
1437         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1439 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
1441         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1442         registers for Pmode.
1443         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1444         hard registers for the clobbered pseudo.
1446 2018-06-27  Paul Koning  <ni1d@arrl.net>
1448         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1449         mutually exclusive options.
1450         * config/pdp11/constraints.md (h): New constraint.
1451         (O): Update definition to match shift code generation.
1452         (D): New constraint.
1453         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1454         (CCFP): Remove.
1455         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1456         function.
1457         (output_jump): Change arguments.
1458         (pdp11_fixed_cc_regs): New function.
1459         (pdp11_cc_mode): Ditto.
1460         (pdp11_expand_shift): Ditto.
1461         (pdp11_assemble_shift): Ditto.
1462         (pdp11_small_shift): Ditto.
1463         (pdp11_branch_cost): Remove.
1464         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1465         from output.
1466         (pdp11_register_move_cost): Update for CC registers.
1467         (pdp11_rtx_costs): Add case for LSHIFTRT.
1468         (pdp11_output_jump): Add CCNZ mode conditional branches.
1469         (notice_update_cc_on_set): Remove.
1470         (pdp11_cc_mode): New function.
1471         (simple_memory_operand): Correct pre/post decrement case.
1472         (no_side_effect_operand): New function.
1473         (pdp11_regno_reg_class): Add CC_REGS class.
1474         (pdp11_fixed_cc_regs): New function.
1475         (pdp11_small_shift): New function.
1476         (pdp11_expand_shift): New function to expand shift insns.
1477         (pdp11_assemble_shift): New function to output shifts.
1478         (pdp11_branch_cost): Remove.
1479         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1480         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1481         (WCHAR_TYPE): Ditto.
1482         (PTRDIFF_TYPE): Ditto.
1483         (ADJUST_INSN_LENGTH): New macro.
1484         (FIXED_REGISTERS): Add CC registers.
1485         (CALL_USED_REGISTERS): Ditto.
1486         (reg_class): Ditto.
1487         (REG_CLASS_NAMES): Ditto.
1488         (REG_CLASS_CONTENTS): Ditto.
1489         (SELECT_CC_MODE): Use new function.
1490         (TARGET_FLAGS_REGNUM): New macro.
1491         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1492         (cc0_reg_rtx): Remove.
1493         (CC_STATUS_MDEP): Remove.
1494         (CC_STATUS_MDEFP_INIT): Remove.
1495         (CC_IN_FPU): Remove.
1496         (NOTICE_UPDATE_CC): Remove.
1497         (REGISTER_NAMES): Add CC registers.
1498         (BRANCH_COST): Change to constant 1.
1499         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1500         handling.
1501         * config/pdp11/pdp11.opt (mbcopy): Remove.
1502         (mbcopy-builtin): Remove.
1503         (mbranch-cheap): Remove.
1504         (mbranch-expensive): Remove.
1505         * config/pdp11/predicates.md (expand_shift_operand): Update to
1506         match shift code generation.
1507         (ccnz_operator): New predicate.
1508         * doc/invoke.texi (PDP-11 Options): Remove deleted options
1509         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1510         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
1511         exclusive options.
1512         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
1513         description of O constraint.
1515 2018-06-27  Jeff Law  <law@redhat.com>
1516             Austin Law  <austinklaw@gmail.com>
1518         * config/v850/v850.md (addsi3_set_flags): New pattern.
1519         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1520         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1521         (zero_extendhisi2_v850_set_flags): Likewise.
1522         (zero_extendqisi2_v850_set_flags): Likewise.
1523         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1524         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1525         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1527         * config/v850/v850-protos.h (notice_update_cc): Remove.
1528         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1529         (v850_print_operand): Handle 'D' and "d".
1530         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1531         Add handling of arithmetic/logical operations compared against zero.
1532         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1533         Do not look at v850_compare_op, instead get mode from last argument.
1534         (v850_gen_compare): Remove
1535         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1536         after reload for prologue insns.
1537         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1538         patterns.
1539         (construct_save_jarl): Likewise.
1540         (TARGET_FLAGS_REGNUM): Define.
1541         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1542         (NOTICE_UPDATE_CC): Remove.
1543         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1544         than cc0.  Conditionalize on reload_completed.
1545         (cmpsi_insn, setfcc_insn): Likewise.
1546         (tst1 splitter): Turn into define_and_split which sets the flags
1547         after reload.
1548         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1549         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1550         (cstoresf4, cstoredf4): Clobber the flags.
1551         (cmpsi, cmpsf, cmpdf): Remove expanders.
1552         (setf_insn): Remove pattern.
1553         (addsi3): Turn into define_and_split which clobbers the flags after
1554         reload and a suitable pattern (addsi3_clobber_flags) for use after
1555         reload.
1556         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1557         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1558         (ashrsi3, ashrsi3_v850e2): Likewise.
1559         (bins): Clobber the flags.
1560         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1561         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1562         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1563         (call_value_internal_short, call_value_internal_long): Likewise.
1564         (callt_save_interrupt, callt_return_interrupt): Likewise.
1565         (save_interrupt, return_interrupt): Likewise.
1566         (callt_save_all_interrupt, save_all_interrupt): Likewise.
1567         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1568         (restore_all_interrupt, _restore_all_interrupt): Likewise.
1569         (All FP comparisons): Only allow after reload has completed.
1570         (trfsr): Likewise.
1571         (divh, divhu): Tweak output template.
1572         (branch_z_normal, branch_z_invert): Remove
1573         (branch_nz_normal, branch_nz_invert): Likewise.
1574         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1576         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1577         * config/v850/v850.c (notice_update_cc): Remove.
1578         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
1579         (CC_NO_CARRY): Likewise.
1580         (NOTICE_UPDATE_CC): Define to nothing.
1581         * config/v850/v850.md: Remove block comment on cc0 handling
1582         Remove "cc" attribute from all patterns.  Remove cc_status handling
1583         from all patterns.  Minor formatting fixes.
1585 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1587         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1588         (cortex-a76.cortex-a55): Likewise.
1589         * config/aarch64/aarch64-tune.md: Regenerate.
1590         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1591         cortex-a76.cortex-a55.
1593 2018-06-27  Jeff Law  <law@redhat.com>
1595         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1596         (MULTILIB_DIRNAMES): Similarly.
1598 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
1600         * gimple.h (gimple_return_retbnd): Delete.
1601         (gimple_return_set_retbnd): Likewise.
1602         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1603         gimple_return_set_retbnd.
1604         * gimple-pretty-print.c (dump_gimple_return): Remove call to
1605         gimple_return_retbnd and adjust.
1606         * tree-inline.h (struct copy_body_data): Remove retbnd field.
1607         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1608         Explicitly return NULL in a couple more cases.  Move assertion
1609         on debug statements and remove unreachable code.
1610         (reset_debug_binding): Do not test id->retbnd.
1611         (expand_call_inline): Do not set it.
1613 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1615         * configure.ac: Add --disable-gcov option.
1616         * configure: Regenerate.
1617         * Makefile.in: Honour @enable_gcov@.
1618         * doc/install.texi: Document --disable-gcov.
1620 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1622         * config/arm/arm-cpus.in (cortex-a76): New entry.
1623         (cortex-a76.cortex-a55): Likewise.
1624         * config/arm/arm-tables.opt: Regenerate.
1625         * config/arm/arm-tune.md: Likewise.
1626         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1627         * doc/invoke.texi (ARM Options): Document cortex-a76 and
1628         cortex-a76.cortex-a55.
1630 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
1632         PR target/85769
1633         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1635 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1637         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1638         comment.
1639         (EPILOGUE_USES): Likewise.
1641 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
1643         * tree-inline.c (remap_location): New function extracted from...
1644         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
1645         (copy_phis_for_bb): ...here.  Call remap_location.
1646         (copy_cfg_body): Adjust call to copy_edges_for_bb.
1648 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1650         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1651         unaligned vsx for 16B memset.
1653 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
1655         PR target/86285
1656         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1657         ieee128_float_type_node to long_double_type_node unless
1658         TARGET_LONG_DOUBLE_128 is set.
1660 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
1662         * cfgloop.c (get_loop_location): Convert return type from
1663         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1664         by implicit construction from rtx_insn *, and using
1665         dump_user_location_t::from_function_decl for the fallback case.
1666         * cfgloop.h (get_loop_location): Convert return type from
1667         location_t to dump_user_location_t.
1668         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1669         dump_printf_loc to pass in a dump_location_t rather than a
1670         location_t, via the gimple stmt.
1671         * coverage.c (get_coverage_counts): Update calls to
1672         dump_printf_loc to pass in dump_location_t rather than a
1673         location_t.
1674         * doc/optinfo.texi (Dump types): Convert example of
1675         dump_printf_loc from taking "locus" to taking "insn".  Update
1676         description of the "_loc" calls to cover dump_location_t.
1677         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1678         "selftest.h".
1679         (dump_user_location_t::dump_user_location_t): New constructors,
1680         from gimple *stmt and rtx_insn *.
1681         (dump_user_location_t::from_function_decl): New function.
1682         (dump_loc): Make static.
1683         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1684         const dump_location_t &.
1685         (dump_generic_expr_loc): Delete.
1686         (dump_printf_loc): Convert param "loc" from location_t to
1687         const dump_location_t &.
1688         (selftest::test_impl_location): New function.
1689         (selftest::dumpfile_c_tests): New function.
1690         * dumpfile.h: Include "profile-count.h".
1691         (class dump_user_location_t): New class.
1692         (struct dump_impl_location_t): New struct.
1693         (class dump_location_t): New class.
1694         (dump_printf_loc): Convert 2nd param from source_location to
1695         const dump_location_t &.
1696         (dump_generic_expr_loc): Delete.
1697         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1698         const dump_location_t &.
1699         * gimple-fold.c (fold_gimple_assign): Update call to
1700         dump_printf_loc to pass in a dump_location_t rather than a
1701         location_t, via the gimple stmt.
1702         (gimple_fold_call): Likewise.
1703         * gimple-loop-interchange.cc
1704         (loop_cand::analyze_iloop_reduction_var): Update for change to
1705         check_reduction_path.
1706         (tree_loop_interchange::interchange): Update for change to
1707         find_loop_location.
1708         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1709         change in return-type of find_loop_location.
1710         (graphite_regenerate_ast_isl): Likewise.
1711         * graphite-optimize-isl.c (optimize_isl): Likewise.
1712         * graphite.c (graphite_transform_loops): Likewise.
1713         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1714         pass in a dump_location_t rather than a location_t, via the
1715         gimple stmt.
1716         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1717         * ipa.c (walk_polymorphic_call_targets): Likewise.
1718         * loop-unroll.c (report_unroll): Convert "locus" param from
1719         location_t to dump_location_t.
1720         (decide_unrolling): Update for change to get_loop_location's
1721         return type.
1722         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1723         location_t to dump_user_location_t.
1724         (grid_find_single_omp_among_assignments_1): Updates calls to
1725         dump_printf_loc to pass in a dump_location_t rather than a
1726         location_t, via the gimple stmt.
1727         (grid_parallel_clauses_gridifiable): Convert "tloc" from
1728         location_t to dump_location_t.  Updates calls to dump_printf_loc
1729         to pass in a dump_location_t rather than a location_t, via the
1730         gimple stmt.
1731         (grid_inner_loop_gridifiable_p): Likewise.
1732         (grid_dist_follows_simple_pattern): Likewise.
1733         (grid_gfor_follows_tiling_pattern): Likewise.
1734         (grid_target_follows_gridifiable_pattern): Likewise.
1735         (grid_attempt_target_gridification): Convert initialization
1736         of local "grid" from memset to zero-initialization; FIXME: does
1737         this require C++11?  Update call to dump_printf_loc to pass in a
1738         optinfo_location rather than a location_t, via the gimple stmt.
1739         * profile.c (read_profile_edge_counts): Updates call to
1740         dump_printf_loc to pass in a dump_location_t rather than a
1741         location_t
1742         (compute_branch_probabilities): Likewise.
1743         * selftest-run-tests.c (selftest::run_tests): Call
1744         dumpfile_c_tests.
1745         * selftest.h (dumpfile_c_tests): New decl.
1746         * tree-loop-distribution.c (pass_loop_distribution::execute):
1747         Update for change in return type of find_loop_location.
1748         * tree-parloops.c (parallelize_loops): Likewise.
1749         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1750         "locus" from location_t to dump_user_location_t.
1751         (canonicalize_loop_induction_variables): Likewise.
1752         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1753         for change in return type of find_loop_location.
1754         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1755         to dump_printf_loc to pass in a dump_location_t rather than a
1756         location_t, via the stmt.
1757         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1758         Likewise.
1759         * tree-vect-loop-manip.c (find_loop_location): Convert return
1760         type from source_location to dump_user_location_t.
1761         (vect_do_peeling): Update for above change.
1762         (vect_loop_versioning): Update for change in type of
1763         vect_location.
1764         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1765         from location_t to dump_user_location_t.
1766         (vect_estimate_min_profitable_iters): Update for change in type
1767         of vect_location.
1768         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1769         location_t to dump_location_t.
1770         (vect_slp_bb): Update for change in type of vect_location.
1771         * tree-vectorizer.c (vect_location): Convert from source_location
1772         to dump_user_location_t.
1773         (try_vectorize_loop_1): Update for change in vect_location's type.
1774         (vectorize_loops): Likewise.
1775         (increase_alignment): Likewise.
1776         * tree-vectorizer.h (vect_location): Convert from source_location
1777         to dump_user_location_t.
1778         (find_loop_location): Convert return type from source_location to
1779         dump_user_location_t.
1780         (check_reduction_path): Convert 1st param from location_t to
1781         dump_user_location_t.
1782         * value-prof.c (check_counter): Update call to dump_printf_loc to
1783         pass in a dump_user_location_t rather than a location_t; update
1784         call to error_at for change in type of "locus".
1785         (check_ic_target): Update call to dump_printf_loc to
1786         pass in a dump_user_location_t rather than a location_t, via the
1787         call_stmt.
1789 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
1791         * config/s390/s390.h (enum processor_flags): Do not use
1792         default tune parameter when -march was specified.
1794 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
1796         PR target/86314
1797         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1798         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1799         operands.
1801 2018-06-26  Richard Biener  <rguenther@suse.de>
1803         PR tree-optimization/86287
1804         PR bootstrap/86316
1805         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1806         (vect_analyze_loop): Initialize n_stmts.
1808 2018-06-26  Richard Biener  <rguenther@suse.de>
1810         PR middle-end/86271
1811         * fold-const.c (fold_convertible_p): Pointer extension
1812         isn't valid.
1814 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
1816         PR debug/86064
1817         * dwarf2out.c (loc_list_has_views): Adjust comments.
1818         (dw_loc_list): Split single cross-partition range with
1819         nonzero locview.
1821 2018-06-25  Jeff Law  <law@redhat.com>
1823         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1824         on -mbig-switch by default.
1826         * config/v850/predicates.md (const_float_1_operand): Fix match_code
1827         test.
1828         (const_float_0_operand): Remove unused predicate.
1829         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1830         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1831         (recipsf2): New expander.  Original pattern now called
1832         (recipsf2_insn).
1833         (recipdf2, recipdf2_insn): Similarly.
1834         (rsqrtsf2, rsqrtsf2_insn): Similarly
1835         (rsqrtdf2, rsqrtdf2_insn): Similarly
1837 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
1839         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
1840         Simplify logic for FreeBSD (twice).
1842 2018-06-25  Martin Sebor  <msebor@redhat.com>
1844         PR tree-optimization/86204
1845         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
1846         a strnlen result if it's less than the length of the string.
1848 2018-06-25  Martin Sebor  <msebor@redhat.com>
1850         PR tree-optimization/85700
1851         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
1852         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
1853         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
1855 2018-06-25  Martin Sebor  <msebor@redhat.com>
1857         * doc/extend.texi (Zero-length arrays): Update and clarify.
1859 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
1861         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1862         added IEEE/IBM long double multilib support on PowerPC little
1863         endian Linux systems.
1864         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1865         (MULTILIB_DEFAULTS): Likewise.
1866         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1867         Likewise.
1868         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1869         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1870         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1872 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
1874         PR middle-end/86311
1875         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1876         (REORDER_45): Likewise.
1878 2018-06-25  Jeff Law  <law@redhat.com>
1880         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1881         dividend to 32 bits.  Adjust length.
1882         (udivmodhi4): Cleanup output template.  Fix length.
1884 2018-06-25  Carl Love  <cel@us.ibm.com>
1886         * config/rs6000/vsx.md: Change word selector to prefered location.
1888 2018-06-25  Richard Biener  <rguenther@suse.de>
1890         PR tree-optimization/86304
1891         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1892         epilogue-if-converted loops as well.
1894 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
1896         * lto-section-out.c (lto_begin_section): Do not print section
1897         name for noaddr and unnumbered dumps.
1899 2018-06-25  Richard Biener  <rguenther@suse.de>
1901         * tree-vectorizer.h (struct vec_info_shared): New structure
1902         with parts split out from struct vec_info and loop_nest from
1903         struct _loop_vec_info.
1904         (struct vec_info): Adjust accordingly.
1905         (struct _loop_vec_info): Likewise.
1906         (LOOP_VINFO_LOOP_NEST): Adjust.
1907         (LOOP_VINFO_DATAREFS): Likewise.
1908         (LOOP_VINFO_DDRS): Likewise.
1909         (struct _bb_vec_info): Likewise.
1910         (BB_VINFO_DATAREFS): Likewise.
1911         (BB_VINFO_DDRS): Likewise.
1912         (struct _stmt_vec_info): Add dr_aux member.
1913         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1914         (DR_MISALIGNMENT_UNINITIALIZED): New.
1915         (set_dr_misalignment): Adjust.
1916         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1917         (vect_analyze_loop): Adjust prototype.
1918         (vect_analyze_loop_form): Likewise.
1919         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1920         Compute dependences lazily.
1921         (vect_record_base_alignments): Use shared datarefs/ddrs.
1922         (vect_verify_datarefs_alignment): Likewise.
1923         (vect_analyze_data_refs_alignment): Likewise.
1924         (vect_analyze_data_ref_accesses): Likewise.
1925         (vect_analyze_data_refs): Likewise.
1926         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1927         constructor parameter for shared part.
1928         (vect_analyze_loop_form): Pass in shared part and adjust.
1929         (vect_analyze_loop_2): Pass in storage for the number of
1930         stmts.  Move loop nest finding to the caller.  Compute
1931         datarefs lazily.
1932         (vect_analyze_loop): Pass in shared part.
1933         (vect_transform_loop): Verify shared datarefs are unchanged.
1934         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1935         constructor parameter for shared part.
1936         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1937         (vect_slp_bb): Verify shared datarefs are unchanged before
1938         transform.
1939         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1940         change.
1941         (new_stmt_vec_info): Initialize DR_AUX misalignment to
1942         DR_MISALIGNMENT_UNINITIALIZED.
1943         * tree-vectorizer.c (vec_info::vec_info): Add constructor
1944         parameter for shared part.
1945         (vec_info::~vec_info): Adjust.
1946         (vec_info_shared::vec_info_shared): New.
1947         (vec_info_shared::~vec_info_shared): Likewise.
1948         (vec_info_shared::save_datarefs): Likewise.
1949         (vec_info_shared::check_datarefs): Likewise.
1950         (try_vectorize_loop_1): Construct shared part live for analyses
1951         of a single loop for multiple vector sizes.
1952         * tree-parloops.c (gather_scalar_reductions): Adjust.
1954 2018-06-25  Richard Biener  <rguenther@suse.de>
1956         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1957         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1958         (vect_analyze_data_refs): Remove similar code from here and
1959         simplify accordingly.
1961 2018-06-25  Richard Biener  <rguenther@suse.de>
1963         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1964         for reverse storage order accesses rather than asserting
1965         they cannot happen here.
1967 2018-06-25  Tom de Vries  <tdevries@suse.de>
1969         PR debug/86257
1970         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1971         Use data16 instead of .byte for insn prefix.
1973 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
1975         PR C++/86082
1976         * parser.c (make_char_string_pack): Pass this literal chars
1977         through cpp_interpret_string.
1978         (cp_parser_userdef_numeric_literal): Check the result of
1979         make_char_string_pack.
1981 2018-06-24  Maya Rashish  <coypu@sdf.org>
1983         * ginclude/stddef.h: Simplify conditions around avoiding
1984         re-definition of __size_t.
1986 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1988         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1989         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1991 2018-06-22  Maya Rashish  <coypu@sdf.org>
1993         * doc/invoke.texi (mno-fancy-math-387): Update for changes
1994         made to OpenBSD and NetBSD through the years.
1996 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1998         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1999         behavior of vec_pack (vector double, vector double) to match
2000         behavior of vec_float2 (vector double, vector double).
2002 2018-06-22  Olivier Hainque  <hainque@adacore.com>
2004         * gimplify.c (gimplify_function_tree): Prevent creation
2005         of a trampoline for the address of the current function
2006         passed to entry/exit instrumentation hooks.
2008 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
2010         PR target/86222
2011         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2012         correctly.
2014 2018-06-22  Martin Liska  <mliska@suse.cz>
2016         PR tree-optimization/86263
2017         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2018         Bail out if is_enabled is false.
2019         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2020         New declaration.
2021         (jump_table_cluster::is_enabled): New function.
2023 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2025         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2026         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2027         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2028         (lto_input_ts_binfo_tree_pointers): Likewise.
2029         * tree-streamer-out.c (streamer_write_tree_bitfields,
2030         write_ts_binfo_tree_pointers): Likewise.
2031         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2033 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2035         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2037 2018-06-22  Martin Liska  <mliska@suse.cz>
2039         * symbol-summary.h (get): Make it pure and inline move
2040         functionality from ::get function.
2041         (get): Remove and inline into ::get and ::get_create.
2042         (get_create): Move code from ::get function.
2044 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2046         PR target/85994
2047         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2048         -x assembler-with-cpp.
2050 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2052         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2053         _FILE_OFFSET_BITS=64 for C++.
2055 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
2057         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2058         conversion insn that shows up when pr85657-3.c is compiled using
2059         IEEE 128-bit long double.
2060         (neg<mode>2_internal): Use the correct mode to check whether the
2061         mode is IBM extended.
2062         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2063         multiply and divide external functions from being created more
2064         than once.
2066 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2068         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2069         functions.
2070         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
2071         the edge can be forwarded.
2072         (cfg_layout_merge_blocks): Likewise.
2074 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2076         * except.c (finish_eh_generation): Commit edge insertions only after
2077         the EH edges have been redirected from post-landing to landing pads.
2079 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2081         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2082         create_tmp_var_for to create the FRAME decl.
2083         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2085 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2087         * tree-inline.c (copy_edges_for_bb): Minor tweak.
2088         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2089         debug statement when resetting its value.
2090         (expand_call_inline): Copy the locus of the call onto the assignment
2091         of the return value, if any.  Use local variable in more cases.
2093 2018-06-21  Martin Liska  <mliska@suse.cz>
2095         * ipa-pure-const.c (propagate_nothrow): Use
2096         funct_state_summaries->get.
2097         (dump_malloc_lattice): Likewise.
2098         (propagate_malloc): Likewise.
2100 2018-06-21  Richard Biener  <rguenther@suse.de>
2102         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2103         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2104         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2105         comment.
2106         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2107         BLOCK_ABSTRACT_ORIGIN unconditionally.
2109 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
2111         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2112         deleting it.
2113         * ipa-reference.c (ipa_reference_c_finalize): Delete
2114         ipa_ref_opt_sum_summaries and set it to NULL.
2116 2018-06-21  Tom de Vries  <tdevries@suse.de>
2118         PR tree-optimization/85859
2119         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2120         test with comment from bb_no_side_effects_p.
2122 2018-06-21  Richard Biener  <rguenther@suse.de>
2124         PR tree-optimization/86232
2125         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2126         max for constant niter.
2128 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2130         * config/aarch64/aarch64-simd.md
2131         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2133 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2135         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2136         Make opernads of the unspec commutative.
2138 2018-06-21  Richard Biener  <rguenther@suse.de>
2140         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2141         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2142         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2143         (vect_analyze_data_ref_dependence): Re-order checks to deal with
2144         NULL DR_STEP.
2145         (vect_record_base_alignments): Do not record base alignment
2146         for gathers or scatters.
2147         (vect_compute_data_ref_alignment): Drop return value that is always
2148         true.  Bail out early for gathers or scatters.
2149         (vect_enhance_data_refs_alignment): Bail out early for gathers
2150         or scatters.
2151         (vect_find_same_alignment_drs): Likewise.
2152         (vect_analyze_data_refs_alignment): Remove dead code.
2153         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2154         (vect_analyze_data_refs): For possible gathers or scatters do
2155         not create an alternate DR, just check their possible validity
2156         and mark them.  Adjust DECL_NONALIASED handling to not rely
2157         on DR_BASE_ADDRESS.
2158         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2159         update inits of gathers or scatters.
2160         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2161         Also copy gather/scatter flag to pattern vinfo.
2163 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2165         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2166         behavior of vec_packsu (vector unsigned long long, vector unsigned
2167         long long) to match behavior of vec_packs with same signature.
2169 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
2170             Thomas Schwinge <thomas@codesourcery.com>
2171             Cesar Philippidis  <cesar@codesourcery.com>
2173         * gimplify.c (gimplify_scan_omp_clauses): Add support for
2174         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2175         (gimplify_adjust_omp_clauses): Likewise.
2176         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2177         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2178         (gimplify_omp_target_update): Update handling of acc update and
2179         enter/exit data.
2180         * omp-low.c (install_var_field): Remove unused parameter
2181         base_pointers_restrict.
2182         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2183         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2184         FINALIZE}
2185         (omp_target_base_pointers_restrict_p): Delete.
2186         (scan_omp_target): Update call to scan_sharing_clauses.
2187         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2188         FINALIZE}.
2189         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2190         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2191         (convert_local_omp_clauses): Likewise.
2192         * tree-pretty-print.c (dump_omp_clause): Likewise.
2193         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
2194         FINALIZE}.
2195         (omp_clause_code_name): Likewise.
2197 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2199         PR debug/86194
2200         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2201         be narrowed.
2203         PR tree-optimization/86231
2204         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
2205         anti-range don't overwrite *vr0min before using it to compute *vr0max.
2207 2018-06-20  Tom de Vries  <tdevries@suse.de>
2209         PR tree-optimization/86097
2210         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2211         iv type if signedness of iv type is not the same as that of *nit.
2213 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2215         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
2216         EDGE_EH edges, verify they are all EDGE_EH.
2218 2018-06-20  Maya Rashish  <coypu@sdf.org>
2220         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2222 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2224         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2225         * config/aarch64/aarch64.c (xgene1_tunings): Add
2226         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2227         (aarch64_mode_valid_for_sched_fusion_p):
2228         Allow 16-byte modes.
2229         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2230         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2231         128-bit modes.
2232         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2233         New pattern.
2234         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2235         * config/aarch64/iterators.md (VQ2): New mode iterator.
2237 2018-06-20  Martin Liska  <mliska@suse.cz>
2239         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2240         Change default ratio from 10 to 8.
2242 2018-06-20  Martin Liska  <mliska@suse.cz>
2244         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2245         New.
2246         (bit_test_cluster::find_bit_tests): Likewise.
2247         (switch_decision_tree::analyze_switch_statement): Find clusters.
2248         * tree-switch-conversion.h (struct jump_table_cluster): Document
2249         hierarchy.
2251 2018-06-20  Martin Liska  <mliska@suse.cz>
2253         * tree-switch-conversion.c (switch_conversion::collect):
2254         Record m_uniq property.
2255         (switch_conversion::expand): Bail out for special conditions.
2256         (group_cluster::~group_cluster): New.
2257         (group_cluster::group_cluster): Likewise.
2258         (group_cluster::dump): Likewise.
2259         (jump_table_cluster::emit): New.
2260         (switch_decision_tree::fix_phi_operands_for_edges): New.
2261         (struct case_node): Remove struct.
2262         (jump_table_cluster::can_be_handled): New.
2263         (case_values_threshold): Moved to header.
2264         (reset_out_edges_aux): Likewise.
2265         (jump_table_cluster::is_beneficial): New.
2266         (bit_test_cluster::can_be_handled): Likewise.
2267         (add_case_node): Remove.
2268         (bit_test_cluster::is_beneficial): New.
2269         (case_bit_test::cmp): New.
2270         (bit_test_cluster::emit): New.
2271         (expand_switch_as_decision_tree_p): Remove.
2272         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2273         (fix_phi_operands_for_edge): Likewise.
2274         (switch_decision_tree::analyze_switch_statement): New.
2275         (compute_cases_per_edge): Move ...
2276         (switch_decision_tree::compute_cases_per_edge): ... here.
2277         (try_switch_expansion): Likewise.
2278         (switch_decision_tree::try_switch_expansion): Likewise.
2279         (record_phi_operand_mapping): Likewise.
2280         (switch_decision_tree::record_phi_operand_mapping): Likewise.
2281         (emit_case_decision_tree): Likewise.
2282         (switch_decision_tree::emit): Likewise.
2283         (balance_case_nodes): Likewise.
2284         (switch_decision_tree::balance_case_nodes): Likewise.
2285         (dump_case_nodes): Likewise.
2286         (switch_decision_tree::dump_case_nodes): Likewise.
2287         (emit_jump): Likewise.
2288         (switch_decision_tree::emit_jump): Likewise.
2289         (emit_cmp_and_jump_insns): Likewise.
2290         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2291         (emit_case_nodes): Likewise.
2292         (switch_decision_tree::emit_case_nodes): Likewise.
2293         (conditional_probability): Remove.
2294         * tree-switch-conversion.h (enum cluster_type): New.
2295         (PRINT_CASE): New.
2296         (struct cluster): Likewise.
2297         (cluster::cluster): Likewise.
2298         (struct simple_cluster): Likewise.
2299         (simple_cluster::simple_cluster): Likewise.
2300         (struct group_cluster): Likewise.
2301         (struct jump_table_cluster): Likewise.
2302         (struct bit_test_cluster): Likewise.
2303         (struct min_cluster_item): Likewise.
2304         (struct case_tree_node): Likewise.
2305         (case_tree_node::case_tree_node): Likewise.
2306         (jump_table_cluster::case_values_threshold): Likewise.
2307         (struct case_bit_test): Likewise.
2308         (struct switch_decision_tree): Likewise.
2309         (struct switch_conversion): Likewise.
2310         (switch_decision_tree::reset_out_edges_aux): Likewise.
2312 2018-06-20  Martin Liska  <mliska@suse.cz>
2314         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2315         (hoist_edge_and_branch_if_true): Likewise.
2316         (expand_switch_using_bit_tests_p): Likewise.
2317         (struct case_bit_test): Likewise.
2318         (case_bit_test_cmp): Likewise.
2319         (emit_case_bit_tests): Likewise.
2320         (switch_conversion::switch_conversion): New class.
2321         (struct switch_conv_info): Remove old struct.
2322         (collect_switch_conv_info): More to ...
2323         (switch_conversion::collect): ... this.
2324         (check_range): Likewise.
2325         (switch_conversion::check_range): Likewise.
2326         (check_all_empty_except_final): Likewise.
2327         (switch_conversion::check_all_empty_except_final): Likewise.
2328         (check_final_bb): Likewise.
2329         (switch_conversion::check_final_bb): Likewise.
2330         (create_temp_arrays): Likewise.
2331         (switch_conversion::create_temp_arrays): Likewise.
2332         (free_temp_arrays): Likewise.
2333         (gather_default_values): Likewise.
2334         (switch_conversion::gather_default_values): Likewise.
2335         (build_constructors): Likewise.
2336         (switch_conversion::build_constructors): Likewise.
2337         (constructor_contains_same_values_p): Likewise.
2338         (switch_conversion::contains_same_values_p): Likewise.
2339         (array_value_type): Likewise.
2340         (switch_conversion::array_value_type): Likewise.
2341         (build_one_array): Likewise.
2342         (switch_conversion::build_one_array): Likewise.
2343         (build_arrays): Likewise.
2344         (switch_conversion::build_arrays): Likewise.
2345         (gen_def_assigns): Likewise.
2346         (switch_conversion::gen_def_assigns): Likewise.
2347         (prune_bbs): Likewise.
2348         (switch_conversion::prune_bbs): Likewise.
2349         (fix_phi_nodes): Likewise.
2350         (switch_conversion::fix_phi_nodes): Likewise.
2351         (gen_inbound_check): Likewise.
2352         (switch_conversion::gen_inbound_check): Likewise.
2353         (process_switch): Use the newly created class.
2354         (switch_conversion::expand): New.
2355         (switch_conversion::~switch_conversion): New.
2356         * tree-switch-conversion.h: New file.
2358 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2360         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2361         tree-vect-patterns.c.
2362         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2363         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
2364         (vect_recog_sad_pattern): Likewise.
2365         (vect_recog_widen_sum_pattern): Likewise.
2366         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
2367         (vect_recog_widen_shift_pattern): Remove the type_in argument.
2368         (vect_recog_rotate_pattern): Likewise.
2369         (vect_recog_mult_pattern): Likewise.
2370         (vect_recog_vector_vector_shift_pattern): Likewise.
2371         (vect_recog_divmod_pattern): Likewise.
2372         (vect_recog_mixed_size_cond_pattern): Likewise.
2373         (vect_recog_bool_pattern): Likewise.
2374         (vect_recog_mask_conversion_pattern): Likewise.
2375         (vect_try_gather_scatter_pattern): Likewise.
2376         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
2377         (vect_recog_over_widening_pattern): Likewise.
2378         (vect_recog_gather_scatter_pattern): Likewise.
2379         (vect_recog_func_ptr): Move from tree-vectorizer.h
2380         (vect_vect_recog_func_ptrs): Move further down the file.
2381         (vect_recog_func): Likewise.  Remove the third argument.
2382         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2383         (vect_pattern_recog_1): Expect the pattern function to do any
2384         necessary target tests.  Also expect it to provide a vector type.
2385         Remove the type_in handling.
2387 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2389         * tree-vect-patterns.c (vect_pattern_detected): New function.
2390         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2391         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2392         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2393         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2394         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2395         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2396         (vect_recog_mask_conversion_pattern)
2397         (vect_try_gather_scatter_pattern): Likewise.
2399 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2401         * tree-vect-patterns.c (vect_get_internal_def): New function.
2402         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2403         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2404         (search_type_for_mask_1): Use it.
2406 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2408         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2409         redundant WIDEN_SUM_EXPR handling.
2410         (vect_recog_sad_pattern): Likewise.
2412 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2414         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2415         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2416         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2417         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2418         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2420 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2422         * tree-vect-stmts.c (vectorizable_call): Make sure that we
2423         use the stmt_vec_info of the original bb statement for the
2424         new zero assignment, even if the call is part of a pattern.
2426 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2428         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2429         that the sequence is attached to the original statement rather
2430         than the pattern statement.
2431         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2432         PATTERN_DEF_SEQ from the original statement rather than
2433         the main pattern statement.
2434         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2435         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2436         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2438 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2440         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2441         definition statements before the early exit for statements that aren't
2442         live or relevant.
2443         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2444         split out from...
2445         (vect_transform_loop): ...here.  Process pattern definition
2446         statements without first checking whether the main pattern
2447         statement is live or relevant.
2449 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2451         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2452         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2454 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
2456         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2457         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2458         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2459         (expand_block_compare): Change select_block_compare_mode call.
2460         (expand_strncmp_align_check): Use new functions, fix comment.
2461         (emit_final_str_compare_gpr): New function.
2462         (expand_strn_compare): Refactor and clean up code.
2463         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2465 2018-06-19  Tony Reix  <tony.reix@atos.com>
2466             Damien Bergamini  <damien.bergamini@atos.com>
2467             David Edelsohn  <dje.gcc@gmail.com>
2469         * collect2.c (static_obj): New variable.
2470         (static_libs): New variable.
2471         (is_in_list): Uncomment declaration.
2472         (main): Track AIX libraries linked statically.
2473         (is_in_list): Uncomment definition.
2474         (scan_prog_file): Don't add AIX shared libraries initializer
2475         to constructor list if linking statically.
2477 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
2479         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2480         constant.
2481         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2483 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
2485         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2486         blocks.
2488 2018-06-19  Martin Liska  <mliska@suse.cz>
2490         * config/i386/i386.c (ix86_can_inline_p): Do not use
2491         ipa_fn_summaries::get_create.
2492         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2493         get.
2494         (devirtualization_time_bonus): Likewise.
2495         (ipcp_propagate_stage): Likewise.
2496         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2497         (edge_set_predicate): Likewise.
2498         (evaluate_conditions_for_known_args): Likewise.
2499         (evaluate_properties_for_edge): Likewise.
2500         (ipa_call_summary::reset): Tranform to ...
2501         (ipa_call_summary::~ipa_call_summary): ... this.
2502         (ipa_fn_summary::reset): Transform to ...
2503         (ipa_fn_summary::~ipa_fn_summary): ... this.
2504         (ipa_fn_summary_t::remove): Rename to ...
2505         (ipa_fn_summary_t::remove_callees): ... this.
2506         (ipa_fn_summary_t::duplicate): Use placement new
2507         instead of memory copy.
2508         (ipa_call_summary_t::duplicate): Likewise.
2509         (ipa_call_summary_t::remove): Remove.
2510         (dump_ipa_call_summary): Change get_create to get.
2511         (ipa_dump_fn_summary): Dump only when summary exists.
2512         (analyze_function_body): Use symbol_summary::get instead
2513         of get_create.
2514         (compute_fn_summary): Likewise.
2515         (estimate_edge_devirt_benefit): Likewise.
2516         (estimate_edge_size_and_time): Likewise.
2517         (inline_update_callee_summaries): Likewise.
2518         (remap_edge_change_prob): Likewise.
2519         (remap_edge_summaries): Likewise.
2520         (ipa_merge_fn_summary_after_inlining): Likewise.
2521         (write_ipa_call_summary): Likewise.
2522         (ipa_fn_summary_write): Likewise.
2523         (ipa_free_fn_summary): Likewise.
2524         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2525         (struct ipa_call_summary): Likewise.
2526         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2527         of get_create.
2528         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2529         (estimate_size_after_inlining): Likewise.
2530         (estimate_growth): Likewise.
2531         (growth_likely_positive): Likewise.
2532         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2533         (inline_call): Likewise.
2534         * ipa-inline.c (caller_growth_limits): Likewise.
2535         (can_inline_edge_p): Likewise.
2536         (can_inline_edge_by_limits_p): Likewise.
2537         (compute_uninlined_call_time): Likewise.
2538         (compute_inlined_call_time): Likewise.
2539         (want_inline_small_function_p): Likewise.
2540         (edge_badness): Likewise.
2541         (update_caller_keys): Likewise.
2542         (update_callee_keys): Likewise.
2543         (inline_small_functions): Likewise.
2544         (inline_to_all_callers_1): Likewise.
2545         (dump_overall_stats): Likewise.
2546         (early_inline_small_functions): Likewise.
2547         (early_inliner): Likewise.
2548         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2549         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2550         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2551         * ipa-split.c (execute_split_functions): Likewise.
2552         * symbol-summary.h: Likewise.
2553         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2555 2018-06-19  Richard Biener  <rguenther@suse.de>
2557         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2558         (vectorize_loops): ... here.  Fix dbgcnt handling.
2559         (try_vectorize_loop): Wrap try_vectorize_loop_1.
2561 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
2563         PR target/86197
2564         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2565         ieee128 argument takes up only one (vector) register, not two (floating
2566         point) registers.
2568 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2570         * gimplify.c (gimplify_init_constructor): Really never clear for an
2571         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2573 2018-06-19  Richard Biener  <rguenther@suse.de>
2575         PR tree-optimization/86179
2576         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2577         after failed recognition.
2579 2018-06-18  Martin Sebor  <msebor@redhat.com>
2581         PR middle-end/85602
2582         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2583         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2584         Handle integer subtraction.
2585         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2586         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2588 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2590         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2591         param from rtx to rtx_insn *.
2592         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2593         param.
2594         (frv_ifcvt_modify_insn): Likwise.
2595         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2596         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
2597         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2598         as_a <rtx_insn *> cast to local "unprotected_region" once
2599         it's been established that it's not NULL or pc_rtx.
2600         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2601         param "sethi" from rtx to rtx_insn *.
2602         (nds32_group_float_insns): Likewise for param "insn".
2603         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2604         param.
2605         (vax_output_int_subtract): Likewise.
2606         * config/vax/vax.c (vax_output_int_add): Likewise for param
2607         "insn".
2608         (vax_output_int_subtract): Likewise.
2609         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2610         (emit_pattern_after): Likewise for param "after".
2611         (emit_insn_after): Likewise.
2612         (emit_jump_insn_after): Likewise.
2613         (emit_call_insn_after): Likewise.
2614         (emit_debug_insn_after): Likewise.
2615         (emit_pattern_before): Likewise for param "before".
2616         (emit_insn_before): Likewise.
2617         (emit_jump_insn_before): Likewise.
2618         * final.c (get_insn_template): Likewise for param "insn", removing
2619         a cast.
2620         * output.h (get_insn_template): Likewise for 2nd param.
2621         * rtl.h (emit_insn_before): Likewise.
2622         (emit_jump_insn_before): Likewise.
2623         (emit_debug_insn_before_noloc): Likewise.
2624         (emit_insn_after): Likewise.
2625         (emit_jump_insn_after): Likewise.
2626         (emit_call_insn_after): Likewise.
2627         (emit_debug_insn_after): Likewise.
2628         (set_insn_deleted): Likewise for param.
2630 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
2632         PR target/85358
2633         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2634         floating point modes, so that IFmode is numerically greater than
2635         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2636         to declare the ordering.  This prevents IFmode from being
2637         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2638         machine.  Include rs6000-modes.h to share the fractional values
2639         between genmodes* and the rest of the compiler.
2640         (IFmode): Likewise.
2641         (KFmode): Likewise.
2642         (TFmode): Likewise.
2643         * config/rs6000/rs6000-modes.h: New file.
2644         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2645         meaning of rs6000_long_double_size so that 126..128 selects an
2646         appropriate 128-bit floating point type.
2647         (rs6000_option_override_internal): Likewise.
2648         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2649         (TARGET_LONG_DOUBLE_128): Change the meaning of
2650         rs6000_long_double_size so that 126..128 selects an appropriate
2651         128-bit floating point type.
2652         (LONG_DOUBLE_TYPE_SIZE): Update comment.
2653         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2654         source and destination to match the standard usage.
2655         (truncifkf2): Likewise.
2656         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2657         ISA 2.07 to use an explicit clobber, instead of passing in a
2658         temporary.
2659         (copysign<mode>3_soft): Likewise.
2661 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2663         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2664         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2665         (vect_slp_analyze_instance_dependence): Likewise.
2666         (vect_enhance_data_refs_alignment): Likewise.
2667         (vect_analyze_data_refs_alignment): Likewise.
2668         (vect_slp_analyze_and_verify_instance_alignment
2669         (vect_analyze_data_ref_accesses): Likewise.
2670         (vect_prune_runtime_alias_test_list): Likewise.
2671         (vect_analyze_data_refs): Likewise.
2672         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2673         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2674         (vect_analyze_scalar_cycles_1): Likewise.
2675         (vect_get_loop_niters): Likewise.
2676         (vect_analyze_loop_form_1): Likewise.
2677         (vect_update_vf_for_slp): Likewise.
2678         (vect_analyze_loop_operations): Likewise.
2679         (vect_analyze_loop): Likewise.
2680         (vectorizable_induction): Likewise.
2681         (vect_transform_loop): Likewise.
2682         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2683         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2684         (vect_make_slp_decision): Likewise.
2685         (vect_detect_hybrid_slp): Likewise.
2686         (vect_slp_analyze_operations): Likewise.
2687         (vect_slp_bb): Likewise.
2688         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2689         (vectorizable_bswap): Likewise.
2690         (vectorizable_call): Likewise.
2691         (vectorizable_simd_clone_call): Likewise.
2692         (vectorizable_conversion): Likewise.
2693         (vectorizable_assignment): Likewise.
2694         (vectorizable_shift): Likewise.
2695         (vectorizable_operation): Likewise.
2696         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2698 2018-06-18  Martin Sebor  <msebor@redhat.com>
2700         PR tree-optimization/81384
2701         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2702         * builtins.c (expand_builtin_strnlen): New function.
2703         (expand_builtin): Call it.
2704         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2705         * builtins.def (BUILT_IN_STRNLEN): New.
2706         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2707         Warn for bounds in excess of maximum object size.
2708         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2709         single-value ranges.  Handle strnlen.
2710         (handle_builtin_strlen): Handle strnlen.
2711         (strlen_check_and_optimize_stmt): Same.
2712         * doc/extend.texi (Other Builtins): Document strnlen.
2714 2018-06-18  Maya Rashish  <coypu@sdf.org>
2716         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2717         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2718         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2720         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2721         here to ...
2722         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2724 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2726         * tree.c (escaped_string::escape): Replace cast to char * by
2727         const_cast<char *> (unescaped).
2729 2018-06-18  Nick Clifton  <nickc@redhat.com>
2731         PR 84195
2732         * tree.c (escaped_string): New class.  Converts an unescaped
2733         string into its escaped equivalent.
2734         (warn_deprecated_use): Use the new class to convert the
2735         deprecation message, if present.
2736         (test_escaped_strings): New self test.
2737         (test_c_tests): Add test_escaped_strings.
2738         * doc/extend.texi (deprecated): Add a note that the
2739         deprecation message is affected by the -fmessage-length
2740         option, and that control characters will be escaped.
2741         (#pragma GCC error): Document this pragma.
2742         (#pragma GCC warning): Likewise.
2743         * doc/invoke.texi (-fmessage-length): Document this option's
2744         effect on the #warning and #error preprocessor directives and
2745         the deprecated attribute.
2747 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
2749         * tree.c (decl_value_expr_lookup): Revert latest change.
2750         (decl_value_expr_insert): Likewise.
2752 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
2754         * gimplify.c (nonlocal_vlas): Delete.
2755         (nonlocal_vla_vars): Likewise.
2756         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2757         referenced VLAs.
2758         (gimplify_body): Do not create and destroy nonlocal_vlas.
2759         * tree-nested.c: Include diagnostic.h.
2760         (use_pointer_in_frame): Tweak.
2761         (lookup_field_for_decl): Add assertion and declare the transformation.
2762         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2763         internal error when the reference is in a wrong context.  Do not
2764         create a debug decl by default.
2765         (note_nonlocal_block_vlas): Delete.
2766         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2767         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
2768         create a debug decl by default.
2769         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2770         call is in a wrong context.
2771         (fixup_vla_decls): New function.
2772         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
2773         debug variables were created.
2774         * tree.c (decl_value_expr_lookup): Add checking assertion.
2775         (decl_value_expr_insert): Likewise.
2777 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2779         PR middle-end/82479
2780         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2781         * tree-scalar-evolution.c (interpret_expr): Likewise.
2782         (expression_expensive_p): Likewise.
2783         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2784         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2785         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2786         (ssa_defined_by_minus_one_stmt_p): New.
2788 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2790         PR middle-end/64946
2791         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2792         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2793         * dojump.c (do_jump): Likewise.
2794         * expr.c (expand_expr_real_2): Check operand type's sign.
2795         * fold-const.c (const_unop): Handle ABSU_EXPR.
2796         (fold_abs_const): Likewise.
2797         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2798         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2799         (strip_sign_op_1): Likesise.
2800         * match.pd: Add new pattern to generate ABSU_EXPR.
2801         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2802         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2803         * tree-eh.c (operation_could_trap_helper_p): Likewise.
2804         * tree-inline.c (estimate_operator_cost): Likewise.
2805         * tree-pretty-print.c (dump_generic_node): Likewise.
2806         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2807         * tree.def (ABSU_EXPR): New.
2809 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
2811         PR middle-end/86095
2812         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2813         documented as preserved for backward compatibility only.
2814         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2816         PR rtl-optimization/86108
2817         * bb-reorder.c (create_forwarder_block): Renamed to ...
2818         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
2819         jump from new landing pad to the second part.
2820         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2821         Adjust callers.
2823 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
2825         PR middle-end/85878
2826         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2827         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2828         Only call store_expr for halves if the mode is the same.
2830         PR middle-end/86123
2831         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2832         Fix up comment formatting.
2834 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2836         * typed-splay-tree.h (typed_splay_tree::remove): New function.
2837         (typed_splay_tree::closure,
2838         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
2839         (typed_splay_tree::typed_splay_tree,
2840         typed_splay_tree::operator =): Declared private.
2841         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
2842         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
2843         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
2844         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
2845         typed_splay_tree::splay_tree_splay,
2846         typed_splay_tree::splay_tree_foreach_helper,
2847         typed_splay_tree::splay_tree_insert,
2848         typed_splay_tree::splay_tree_remove,
2849         typed_splay_tree::splay_tree_lookup,
2850         typed_splay_tree::splay_tree_predecessor,
2851         typed_splay_tree::splay_tree_successor,
2852         typed_splay_tree::splay_tree_min,
2853         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
2854         (typed_splay_tree::root, typed_splay_tree::comp,
2855         typed_splay_tree::delete_key,
2856         typed_splay_tree::delete_value): New data members.
2857         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
2858         typed_splay_tree::remove.
2860 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
2862         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2863         -mginv and -mno-ginv to the assembler.
2864         * config/mips/mips.opt (-mcrc): New option.
2865         (-mginv): Likewise.
2866         * doc/invoke.text (-mcrc): Document.
2867         (-mginv): Likewise.
2869 2018-06-15  Nick Clifton  <nickc@redhat.com>
2871         PR 84195
2872         * tree.c (escaped_string): New class.  Converts an unescaped
2873         string into its escaped equivalent.
2874         (warn_deprecated_use): Use the new class to convert the
2875         deprecation message, if present.
2876         (test_escaped_strings): New self test.
2877         (test_c_tests): Add test_escaped_strings.
2878         * doc/extend.texi (deprecated): Add a note that the
2879         deprecation message is affected by the -fmessage-length
2880         option, and that control characters will be escaped.
2881         (#pragma GCC error): Document this pragma.
2882         (#pragma GCC warning): Likewise.
2883         * doc/invoke.texi (-fmessage-length): Document this option's
2884         effect on the #warning and #error preprocessor directives and
2885         the deprecated attribute.
2887 2018-06-15  Richard Biener  <rguenther@suse.de>
2889         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2890         here, also noting vector size used.
2891         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
2892         size used in MSG_OPTIMIZED_LOCATIONS dump.
2893         (pass_slp_vectorize::execute): Adjust.
2895 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
2897         PR target/85968
2898         * config/arc/arc.c (arc_return_address_register): Fix
2899         if-condition.
2901 2018-06-15  Richard Biener  <rguenther@suse.de>
2903         PR middle-end/86159
2904         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2905         leave useless conversion stripping to force_gimple_operand_gsi.
2906         (gimplify_build2): Likewise.
2907         (gimplify_build1): Likewise.
2909 2018-06-15  Richard Biener  <rguenther@suse.de>
2911         PR middle-end/86076
2912         * tree-cfg.c (move_stmt_op): unshare invariant addresses
2913         before adjusting their block.
2915 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2917         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2918         multilibs for *-*-rtems*.
2919         * config/riscv/t-rtems: New file.
2921 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
2923         PR middle-end/86122
2924         * match.pd ((A +- CST1) +- CST2): Punt if last resort
2925         unsigned_type_for returns NULL.
2927         PR target/85945
2928         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2929         subregs of multi-word pseudos unless the float mode has word size.
2931 2018-06-14  Richard Biener  <rguenther@suse.de>
2933         PR middle-end/86139
2934         * tree-vect-generic.c (build_word_mode_vector_type): Remove
2935         duplicate and harmful type_hash_canon.
2936         * tree.c (type_hash_canon): Assert we didn't find ourselves.
2938 2018-06-14  Richard Biener  <rguenther@suse.de>
2940         PR ipa/86124
2941         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2942         NULL cgraph_node.
2944 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2946         * config/rtems.h (STDINT_LONG32): Define.
2948 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
2949             Prachi Godbole  <prachi.godbole@imgtec.com>
2951         * config/mips/mips-cpus.def: Define P6600.
2952         * config/mips/mips-tables.opt: Regenerate.
2953         * config/mips/mips.c (mips_ucbranch_type): New enum.
2954         (mips_rtx_cost_data): Add support for P6600.
2955         (mips_issue_rate): Likewise.
2956         (mips_multipass_dfa_lookahead): Likewise.
2957         (mips_avoid_hazard): Likewise.
2958         (mips_reorg_process_insns): Likewise.
2959         (mips_classify_branch_p6600): New function.
2960         * config/mips/mips.h (TUNE_P6600): New define.
2961         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2962         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2963         * config/mips/mips.md: Include p6600.md.
2964         (processor): Add p6600.
2965         * config/mips/p6600.md: New file.
2966         * doc/invoke.texi: Add p6600 to supported architectures.
2968 2018-06-13  Martin Sebor  <msebor@redhat.com>
2970         PR tree-optimization/86114
2971         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2972         of integer types.
2973         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2975 2018-06-13  Richard Biener  <rguenther@suse.de>
2977         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2978         Properly set vector type of the intermediate stmt.
2979         * tree-vect-stmts.c (vectorizable_operation): The destination
2980         var always has vectype_out type.
2982 2018-06-13  Jeff Law  <law@redhat.com>
2984         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2985         integer 0 for argument to print_rtl_with_bb.
2986         (rl78_reorg): Likewise.
2988 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
2990         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2991         from rtx to rtx_insn *.
2992         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2993         "label".
2994         (add_sched_insns_for_speculation): Likewise for local "target",
2995         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2996         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2997         from rtx_insn ** to rtx_code_label **.
2998         (reorg_emit_nops): Likewise.
2999         (c6x_reorg): Likewise for local "call_labels".
3000         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3001         rtx to rtx_insn *.
3002         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3003         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3004         the loops over LABEL_REFS.
3005         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3006         braf_label.
3007         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3008         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3009         (split_branches): Strengthen local "olabel" from rtx to
3010         rtx_insn *, adding a safe_as_a cast.
3011         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3012         to "rtx_insn *".
3013         (add_insn_after): Likewise for first two params.
3014         (add_insn_before): Likewise.
3015         (remove_insn): Likewise for param.
3016         (emit_pattern_before_noloc): Likewise for second and third params.
3017         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3018         (emit_call_insn_before_noloc): Likewise.
3019         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3020         to "rtx_insn *".
3021         (emit_barrier_before): Likewise.
3022         (emit_label_before): Strengthen "label" param from "rtx" to
3023         "rtx_code_label *".  Strengthen "before" param from "rtx" to
3024         "rtx_insn *".
3025         (emit_insn_after_1): Strengthen "after" param from "rtx" to
3026         "rtx_insn *".
3027         (emit_pattern_after_noloc): Likewise.
3028         (emit_insn_after_noloc): Likewise.
3029         (emit_jump_insn_after_noloc): Likewise.
3030         (emit_call_insn_after_noloc): Likewise.
3031         (emit_debug_insn_after_noloc): Likewise.
3032         (emit_barrier_after): Likewise.
3033         (emit_label_after): Likewise for both params.
3034         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
3035         "loc" param from "int" to "location_t".
3036         (emit_insn_after_setloc): Likewise.
3037         (emit_jump_insn_after_setloc): Likewise.
3038         (emit_call_insn_after_setloc): Likewise.
3039         (emit_debug_insn_after_setloc): Likewise.
3040         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
3041         "loc" param from "int" to "location_t".
3042         (emit_pattern_before): Convert NULL_RTX to NULL.
3043         (emit_insn_before_setloc): Convert "loc" param from "int" to
3044         "location_t".
3045         (emit_jump_insn_before_setloc): Likewise.
3046         (emit_call_insn_before_setloc): Likewise.
3047         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3048         rtx_insn *.  Convert "loc" param from "int" to "location_t".
3049         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3050         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3051         Convert 3rd param from "int" to "location_t".
3052         (emit_barrier_before, emit_barrier_after, next_real_insn):
3053         Strengthen param from rtx to rtx_insn *.
3054         (emit_label_before): Strengthen 1st param from "rtx" to
3055         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
3056         "rtx_insn *".
3057         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3058         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3059         Strengthen 2nd param from "rtx" to "rtx_insn *".
3060         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3061         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3062         Likewise. Convert 3rd param from "int" to "location_t".
3063         (emit_label_after): Strengthen 1st param from "rtx" to
3064         "rtx_code_label *".
3065         (next_real_insn, remove_insn): Strengthen param from "rtx" to
3066         "rtx_insn *".
3067         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3068         from "rtx" to "rtx_insn *".
3070 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
3072         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3073         bodies streamed in with -Q.
3074         * dumpfile.c (dump_files): Add lto-stream-out dump file.
3075         * dumpfile.h (tree_dump_index): Add lto_stream_out.
3076         * gimple-streamer-out.c: Include gimple-pretty-print.h
3077         (output_bb): Dump stmts streamed.
3078         * lto-section-out.c: Include print-tree.h
3079         (lto_begin_section): Dump sections created.
3080         (lto_output_decl_index): Dump decl encoded.
3081         * lto-streamer-out.c: Include print-tree.h
3082         (create_output_block): Dump output block created.
3083         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3084         (output_function): Dump function output.
3085         (output_constructor): Dump constructor streamed.
3086         (write_global_stream): Output indexes encoded.
3087         (produce_asm_for_decls): Dump streams encoded.
3088         * lto-streamer.c (streamer_dump_file): New global var.
3089         * lto-streamer.h (streamer_dump_file): Declare.
3090         * passes.c (ipa_write_summaries): Initialize streamer dump.
3091         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3092         in.
3094 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
3096         PR target/86048
3097         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3098         offsets for register save directives.  Emit a second batch of save
3099         directives, if need be, when the function accesses prior frames.
3101 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3103         * config/arc/fpu.md (fmasf4): Force operand to register.
3104         (fnmasf4): Likewise.
3106 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3108         * config/arc/arc-protos.h (arc_pad_return): Remove.
3109         * config/arc/arc.c (machine_function): Remove force_short_suffix
3110         and size_reason.
3111         (arc_print_operand): Adjust printing of '&'.
3112         (arc_verify_short): Remove conditional printing of short suffix.
3113         (arc_final_prescan_insn): Remove reference to size_reason.
3114         (pad_return): New function.
3115         (arc_reorg): Call pad_return.
3116         (arc_pad_return): Remove.
3117         (arc_init_machine_status): Remove reference to force_short_suffix.
3118         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3119         (attr length): When attribute iscompact is true force to 2
3120         regardless; in the case of maybe check if we want to force the
3121         instruction to have 4 bytes length.
3122         (nopv): Change it to generate 4 byte long nop as well.
3123         (blockage): New pattern.
3124         (simple_return): Remove call to arc_pad_return.
3125         (p_return_i): Likewise.
3127 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3129         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3131 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3133         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3134         ARC cores.
3136 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3138         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3139         for ARC700 and ARCv2.
3141 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
3143         PR target/86076
3144         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3145         operands[2] instead of operands[1].
3148 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3150         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3151         case, check whether the outer register overlaps an unallocatable
3152         register, not just whether it fits the required class.
3154 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3156         * poly-int.h (can_div_trunc_p): Add new overload in which all values
3157         are poly_ints.
3158         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3159         (memrefs_conflict_p): Likewise.
3160         (init_alias_analysis): Likewise.
3161         * cfgexpand.c (expand_debug_expr): Likewise.
3162         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3163         * cse.c (fold_rtx): Likewise.
3164         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3165         * expr.c (emit_block_move_hints): Likewise.
3166         (clear_storage_hints, push_block, emit_push_insn): Likewise.
3167         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3168         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3169         (emit_group_store): Likewise.
3170         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
3171         to read the PRE/POST_MODIFY increment.
3172         * calls.c (store_one_arg): Use strip_offset.
3173         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3174         poly_int_rtx_p.
3175         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3176         by a VEC_SELECT.
3177         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3178         (simplify_binary_operation_1): Extend CONST_INT handling to
3179         poly_int_rtx_p.
3180         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3181         than a HOST_WIDE_INT.
3182         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3183         poly_int64.
3184         (adjust_mems, add_stores): Update accodingly.
3185         (vt_canonicalize_addr): Track polynomial offsets.
3186         (emit_note_insn_var_location): Likewise.
3187         (vt_add_function_parameter): Likewise.
3188         (vt_initialize): Likewise.
3190 2018-06-12  Jeff Law  <law@redhat.com>
3192         * config.gcc (alpha*-*-freebsd*): Remove.
3193         * config/alpha/freebsd.h: Remove.
3195 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
3197         PR other/69968
3198         * spellcheck-tree.c (levenshtein_distance): Rename to...
3199         (get_edit_distance): ...this, and update for underlying renaming.
3200         * spellcheck-tree.h (levenshtein_distance): Rename to...
3201         (get_edit_distance): ...this.
3202         * spellcheck.c (levenshtein_distance): Rename to...
3203         (get_edit_distance): ...this.  Convert from Levenshtein distance
3204         to Damerau-Levenshtein distance by supporting transpositions of
3205         adjacent characters.  Rename "v1" to "v_next" and "v0" to
3206         "v_one_ago".
3207         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3208         (selftest::test_edit_distance_unit_test_oneway): ...this, and
3209         update for underlying renaming.
3210         (selftest::levenshtein_distance_unit_test): Rename to...
3211         (selftest::test_get_edit_distance_unit): ...this, and update for
3212         underlying renaming.
3213         (selftest::test_find_closest_string): Add example from PR 69968
3214         where transposition helps
3215         (selftest::test_metric_conditions): Update for renaming.
3216         (selftest::test_metric_conditions): Likewise.
3217         (selftest::spellcheck_c_tests): Likewise.
3218         * spellcheck.h (levenshtein_distance): Rename both overloads to...
3219         (get_edit_distance): ...this.
3220         (best_match::consider): Update for renaming.
3222 2018-06-12  Martin Sebor  <msebor@redhat.com>
3224         PR tree-optimization/85259
3225         * builtins.c (compute_objsize): Handle constant offsets.
3226         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3227         true iff a warning has been issued.
3228         * gimple.h (gimple_nonartificial_location): New function.
3229         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3230         gimple_nonartificial_location and handle -Wno-system-headers.
3231         (handle_builtin_stxncpy): Same.
3233 2018-06-12  Martin Sebor  <msebor@redhat.com>
3235         PR c/85931
3236         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3238 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
3240         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3241         BUILTIN_VEC_XST entries for pointer to double and long long.
3243 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
3245         PR target/85990
3246         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3247         Update comments.
3248         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3249         Likewise.
3251 2018-06-12  Martin Liska  <mliska@suse.cz>
3253         * doc/options.texi: Document IntegerRange.
3255 2018-06-12  Martin Liska  <mliska@suse.cz>
3257         * config/i386/i386.opt: Make MPX-related options as Deprecated.
3258         * opt-functions.awk: Handle Deprecated flag.
3259         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3260         and report error.
3261         (read_cmdline_option): Report warning for a deprecated option.
3262         * opts.h (struct cl_option): Add new field cl_deprecated.
3263         (CL_ERR_DEPRECATED): New.
3265 2018-06-12  Martin Liska  <mliska@suse.cz>
3267         * doc/options.texi: Document Deprecated option flag.
3269 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3271         * config/arc/arc-arch.h (arc_extras): New enum.
3272         (arc_cpu_t):Add field extra.
3273         (arc_cpu_types): Consider the extras.
3274         * config/arc/arc-cpus.def: Add extras info.
3275         * config/arc/arc-opts.h (processor_type): Consider extra field.
3276         * config/arc/arc.c (arc_override_options): Handle extra field.
3278 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3280         * config/arc/arc-arch.h: Update ARC_OPTX macro.
3281         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3282         field.
3283         * config/arc/arc.c (arc_init): Update pic warning.
3284         (irq_range): Update irq range parsing warnings.
3285         (arc_override_options): Update various warning messages.
3286         (arc_handle_aux_attribute): Likewise.
3288 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
3290         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3292 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3294         * doc/sourcebuild.texi: Document usage of line number 0 in verify
3295         compiler messages directives.
3297 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
3299         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3300         * config/mips/mips-tables.opt: Regenerate.
3301         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3302         mips64r6.
3303         * doc/invoke.texi: Document -march=i6500.
3305 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
3307         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3308         (i6400_gpmul): Add cpu_unit.
3309         (i6400_gpdiv): Likewise.
3310         (i6400_msa_add_d): Update reservations.
3311         (i6400_msa_int_add) Likewise.
3312         (i6400_msa_short_logic3) Likewise.
3313         (i6400_msa_short_logic2) Likewise.
3314         (i6400_msa_short_logic) Likewise.
3315         (i6400_msa_move) Likewise.
3316         (i6400_msa_cmp) Likewise.
3317         (i6400_msa_short_float2) Likewise.
3318         (i6400_msa_div_d) Likewise.
3319         (i6400_msa_long_logic1) Likewise.
3320         (i6400_msa_long_logic2) Likewise.
3321         (i6400_msa_mult) Likewise.
3322         (i6400_msa_long_float2) Likewise.
3323         (i6400_msa_long_float4) Likewise.
3324         (i6400_msa_long_float5) Likewise.
3325         (i6400_msa_long_float8) Likewise.
3326         (i6400_fpu_fadd): Include frint type.
3327         (i6400_fpu_store): New define_insn_reservation.
3328         (i6400_fpu_load): Likewise.
3329         (i6400_fpu_move): Likewise.
3330         (i6400_fpu_fcmp): Likewise.
3331         (i6400_fpu_fmadd): Likewise.
3332         (i6400_int_mult): Include imul3nc type and update reservation.
3333         (i6400_int_div): Include idiv3 type and update reservation.
3334         (i6400_int_load): Update to check type not move_type.
3335         (i6400_int_store): Likewise.
3336         (i6400_int_prefetch): Set zero latency.
3338 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3340         * gcc.c: Document new %@{...} sequence.
3341         (LINK_COMMAND_SPEC): Use it for the -L switches.
3342         (cpp_unique_options): Use it for the -I switches.
3343         (at_file_argbuf): New global variable.
3344         (in_at_file): Likewise.
3345         (alloc_args): Create at_file_argbuf.
3346         (clear_args): Truncate at_file_argbuf.
3347         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3348         (open_at_file): New function.
3349         (close_at_file): Likewise.
3350         (create_at_file): Delete.
3351         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3352         <'o'>: Likewise.
3353         <'@'>: New case.
3354         (validate_switches_from_spec): Deal with %@{...} sequence.
3355         (validate_switches): Likewise.
3356         (driver::finalize): Call clear_args.
3358 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
3360         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3362 2018-06-11  Martin Sebor  <msebor@redhat.com>
3364         * doc/invoke.texi (-Wall): List -Wc++17-compat.
3365         (Wno-class-memaccess): Add @opindex.
3366         (Wno-templates, Wno-multiple-inheritance): Same.
3367         (Wno-virtual-inheritance, Wno-namespaces): Same.
3368         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3369         (Wno-format-overflow, Wno-format-truncation): Same.
3370         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3371         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3372         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3373         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3374         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3375         (Wno-misspelled-isr): Same.
3377 2018-06-11  Martin Sebor  <msebor@redhat.com>
3379         * PR tree-optimization/86083
3380         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3382 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3384         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3386 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
3388         PR target/85755
3389         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3390         on the correct operand.
3391         (*movdi_internal64): Ditto.
3393 2018-06-11  Martin Liska  <mliska@suse.cz>
3395         PR tree-optimization/86089
3396         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3398 2018-06-11  Julia Koval  <julia.koval@intel.com>
3400         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3401         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3402         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3404 2018-06-11  Olivier Hainque  <hainque@adacore.com>
3406         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3407         for Ada with strict dwarf2.
3409 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
3411         PR target/85755
3412         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3413         addresses.
3415 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
3417         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3419 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
3421         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3422         TARGET_ELF.
3424 2018-06-08  Martin Liska  <mliska@suse.cz>
3426         * tree-cfg.h (debug_function): Fix argument type to match
3427         implementation.
3429 2018-06-08  Martin Liska  <mliska@suse.cz>
3431         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3432         Remove usage of MPX-related (and removed) fields.
3433         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3435 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3437         * cfg.c (debug): Use TDF_NONE rather than 0.
3438         * cfghooks.c (debug): Likewise.
3439         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3440         (struct dump_option_value_info): Convert to...
3441         (struct kv_pair): ...this template type.
3442         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3443         rather than 0.
3444         (optinfo_verbosity_options): Likewise.
3445         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3446         OPTGROUP_NONE.
3447         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3448         than int for "optgroup_flags" param.
3449         (dump_generic_expr_loc): Use dump_flags_t rather than int for
3450         "dump_kind" param.
3451         (dump_dec): Likewise.
3452         (dump_finish): Use TDF_NONE rather than 0.
3453         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3454         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
3455         than 0.  Update for change to option_ptr.
3456         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3457         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
3458         0.  Update for changes to optinfo_verbosity_options and
3459         optgroup_options.
3460         (opt_info_switch_p): Convert optgroup_flags from int to
3461         optgroup_flags_t.
3462         (dump_basic_block): Use dump_flags_t rather than int
3463         for "dump_kind" param.
3464         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3465         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3466         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3467         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3468         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3469         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3470         TDF_NONE): Convert from macros to...
3471         (enum dump_flag): ...this new enum.
3472         (dump_flags_t): Update to use enum.
3473         (operator|, operator&, operator~, operator|=, operator&=):
3474         Implement for dump_flags_t.
3475         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3476         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3477         Convert from macros to...
3478         (enum optgroup_flag): ...this new enum.
3479         (optgroup_flags_t): New typedef.
3480         (operator|, operator|=): Implement for optgroup_flags_t.
3481         (struct dump_file_info): Convert field "alt_flags" to
3482         dump_flags_t.  Convert field "optgroup_flags" to
3483         optgroup_flags_t.
3484         (dump_basic_block): Use dump_flags_t rather than int for param.
3485         (dump_generic_expr_loc): Likewise.
3486         (dump_dec): Likewise.
3487         (dump_register): Convert param "optgroup_flags" to
3488         optgroup_flags_t.
3489         (opt_info_enable_passes): Likewise.
3490         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3491         than 0.
3492         * gimple-pretty-print.c (debug): Likewise.
3493         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3494         (merged_store_group::apply_stores): Likewise.
3495         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3496         * gimple.c (verify_gimple_pp): Likewise.
3497         * graphite-poly.c (print_pbb_body): Likewise.
3498         * passes.c (pass_manager::register_one_dump_file): Convert
3499         local "optgroup_flags" to optgroup_flags_t.
3500         * print-tree.c (print_node): Use TDF_NONE rather than 0.
3501         (debug): Likewise.
3502         (debug_body): Likewise.
3503         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3504         to optgroup_flags_t.
3505         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3506         than 0.
3507         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3508         (convert_mult_to_fma): Likewise.
3509         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3510         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3511         * tree-vect-data-refs.c (dump_lower_bound): Convert param
3512         "dump_kind" to dump_flags_t.
3514 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3516         * config/rs6000/rs6000.c (min, max): Delete.
3518 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3520         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3521         -mabi=spe and -mabi=no-spe.
3523 2018-06-08  Martin Liska  <mliska@suse.cz>
3525         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3526         where we expect an existing summary.
3528 2018-06-08  Martin Liska  <mliska@suse.cz>
3530         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3531         * ipa-inline.h (estimate_edge_growth): Likewise.
3533 2018-06-08  Martin Liska  <mliska@suse.cz>
3535         * cgraph.c (function_version_hasher::hash): Use
3536         cgraph_node::get_uid ().
3537         (function_version_hasher::equal):
3538         * cgraph.h (cgraph_node::get_uid): New method.
3539         * ipa-inline.c (update_caller_keys): Use
3540         cgraph_node::get_uid ().
3541         (update_callee_keys): Likewise.
3542         * ipa-utils.c (searchc): Likewise.
3543         (ipa_reduced_postorder): Likewise.
3544         * lto-cgraph.c (input_node): Likewise.
3545         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3546         * symbol-summary.h (symtab_insertion): Likewise.
3547         (symtab_removal): Likewise.
3548         (symtab_duplication): Likewise.
3549         * tree-pretty-print.c (dump_function_header): Likewise.
3550         * tree-sra.c (convert_callers_for_node): Likewise.
3552 2018-06-08  Martin Liska  <mliska@suse.cz>
3554         * cgraph.c (symbol_table::create_edge): Always assign a new
3555         unique number.
3556         (symbol_table::free_edge): Do not recycle numbers.
3557         * cgraph.h (cgraph_edge::get): New method.
3558         * symbol-summary.h (symtab_removal): Use it.
3559         (symtab_duplication): Likewise.
3560         (call_summary::hashable_uid): Remove.
3562 2018-06-08  Martin Liska  <mliska@suse.cz>
3564         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3565         (initialize_growth_caches): Remove.
3566         (free_growth_caches): Likewise.
3567         (do_estimate_edge_time): Use edge_growth_cache.
3568         (do_estimate_edge_size): Likewise.
3569         (do_estimate_edge_hints): Likewise.
3570         * ipa-inline.c (reset_edge_caches): Likewise.
3571         (recursive_inlining): Likewise.
3572         (inline_small_functions): Likewise.
3573         * ipa-inline.h (initialize_growth_caches): Remove.
3574         (estimate_edge_size): Likewise.
3575         (estimate_edge_time): Likewise.
3576         (estimate_edge_hints): Likewise.
3577         (reset_edge_growth_cache): Likewise.
3578         * symbol-summary.h (call_summary::remove): New method.
3580 2018-06-08  Martin Liska  <mliska@suse.cz>
3582         * ipa-cp.c (class edge_clone_summary): New summary.
3583         (grow_edge_clone_vectors): Remove.
3584         (ipcp_edge_duplication_hook): Remove.
3585         (class edge_clone_summary_t): New call_summary class.
3586         (ipcp_edge_removal_hook): Remove.
3587         (edge_clone_summary_t::duplicate): New function.
3588         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3589         (create_specialized_node): Likewise.
3590         (ipcp_driver): Initialize edge_clone_summaries and do not
3591         register hooks.
3593 2018-06-08  Martin Liska  <mliska@suse.cz>
3595         * symbol-summary.h (get): New function.
3596         (call_summary::m_initialize_when_cloning): New class member.
3598 2018-06-08  Martin Liska  <mliska@suse.cz>
3600         * cgraph.c (cgraph_node::remove): Do not recycle uid.
3601         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3602         (symbol_table::allocate_cgraph_symbol): Do not set uid.
3603         * passes.c (uid_hash_t): Record removed_nodes by their uids.
3604         (remove_cgraph_node_from_order): Use the removed_nodes set.
3605         (do_per_function_toporder): Likwise.
3606         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3607         instead of summary_uid.
3608         (symtab_removal): Likewise.
3609         (symtab_duplication): Likewise.
3611 2018-06-08  Martin Liska  <mliska@suse.cz>
3613         * ipa-cp.c (ipcp_store_bits_results): Use
3614         ipcp_transformation_sum.
3615         (ipcp_store_vr_results): Likewise.
3616         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3617         to ...
3618         (ipcp_transformation_initialize): ... this.
3619         (ipa_set_node_agg_value_chain):
3620         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3621         (write_ipcp_transformation_info): Likewise.
3622         (read_ipcp_transformation_info): Likewise.
3623         (ipcp_update_bits): Likewise.
3624         (ipcp_update_vr): Likewise.
3625         (ipcp_transform_function): Likewise.
3626         * ipa-prop.h: Rename ipcp_transformation_summary to
3627         ipcp_transformation.
3628         (class ipcp_transformation_t): New function summary.
3629         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3630         (ipa_get_agg_replacements_for_node): Likewise.
3632 2018-06-08  Martin Liska  <mliska@suse.cz>
3634         * ipa-pure-const.c (struct funct_state_d): Do it class instead
3635         of struct.
3636         (class funct_state_summary_t): New function_summary class.
3637         (has_function_state): Remove.
3638         (get_function_state): Likewise.
3639         (set_function_state): Likewise.
3640         (add_new_function): Likewise.
3641         (funct_state_summary_t::insert): New function.
3642         (duplicate_node_data): Remove.
3643         (remove_node_data): Remove.
3644         (funct_state_summary_t::duplicate): New function.
3645         (register_hooks): Create new funct_state_summaries.
3646         (pure_const_generate_summary): Use it.
3647         (pure_const_write_summary): Likewise.
3648         (pure_const_read_summary): Likewise.
3649         (propagate_pure_const): Likewise.
3650         (propagate_nothrow): Likewise.
3651         (dump_malloc_lattice): Likewise.
3652         (propagate_malloc): Likewise.
3653         (execute): Do not register hooks, just remove summary
3654         instead.
3655         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3656         constructor.
3658 2018-06-08  Martin Liska  <mliska@suse.cz>
3660         * ipa-reference.c (remove_node_data): Remove.
3661         (duplicate_node_data): Likewise.
3662         (class ipa_ref_var_info_summary_t): New class.
3663         (class ipa_ref_opt_summary_t): Likewise.
3664         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3665         (get_reference_optimization_summary): Use
3666         ipa_ref_opt_sum_summaries.
3667         (set_reference_vars_info): Remove.
3668         (set_reference_optimization_summary): Likewise.
3669         (ipa_init): Create summaries.
3670         (init_function_info): Use function summary.
3671         (ipa_ref_opt_summary_t::duplicate): New function.
3672         (ipa_ref_opt_summary_t::remove): New function.
3673         (get_read_write_all_from_node): Fix GNU coding style.
3674         (propagate): Use function summary.
3675         (write_node_summary_p): Fix GNU coding style.
3676         (stream_out_bitmap): Likewise.
3677         (ipa_reference_read_optimization_summary): Use function summary.
3678         (ipa_reference_c_finalize): Do not release hooks.
3680 2018-06-08  Martin Liska  <mliska@suse.cz>
3682         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3683         (analyze_function_body): Extract multiple calls of get_create.
3684         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3685         * ipa-inline.c (recursive_inlining): Use ::get method.
3686         * ipa-inline.h (estimate_edge_growth): Likewise.
3688 2018-06-08  Martin Liska  <mliska@suse.cz>
3690         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3691         HSA_INVALID.
3692         (hsa_function_summary::hsa_function_summary): Use the new enum
3693         value.
3694         (hsa_gpu_implementation_p): Use hsa_summaries::get.
3695         * hsa-gen.c (hsa_get_host_function): Likewise.
3696         (get_brig_function_name): Likewise.
3697         * ipa-hsa.c (process_hsa_functions): Likewise.
3698         (ipa_hsa_write_summary): Likewise.
3699         * symbol-summary.h (symtab_duplication): Use ::get function/
3700         (get): New function.
3702 2018-06-08  Martin Liska  <mliska@suse.cz>
3704         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3705         of get.
3706         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3707         (hsa_register_kernel): Likewise.
3708         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3709         * hsa-gen.c (hsa_get_host_function): Likewise.
3710         (get_brig_function_name): Likewise.
3711         (generate_hsa): Likewise.
3712         (pass_gen_hsail::execute): Likewise.
3713         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3714         (devirtualization_time_bonus): Likewise.
3715         (ipcp_propagate_stage): Likewise.
3716         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3717         (edge_set_predicate): Likewise.
3718         (evaluate_conditions_for_known_args): Likewise.
3719         (evaluate_properties_for_edge): Likewise.
3720         (ipa_fn_summary::reset): Likewise.
3721         (ipa_fn_summary_t::duplicate): Likewise.
3722         (dump_ipa_call_summary): Likewise.
3723         (ipa_dump_fn_summary): Likewise.
3724         (analyze_function_body): Likewise.
3725         (compute_fn_summary): Likewise.
3726         (estimate_edge_devirt_benefit): Likewise.
3727         (estimate_edge_size_and_time): Likewise.
3728         (estimate_calls_size_and_time): Likewise.
3729         (estimate_node_size_and_time): Likewise.
3730         (inline_update_callee_summaries): Likewise.
3731         (remap_edge_change_prob): Likewise.
3732         (remap_edge_summaries): Likewise.
3733         (ipa_merge_fn_summary_after_inlining): Likewise.
3734         (ipa_update_overall_fn_summary): Likewise.
3735         (read_ipa_call_summary): Likewise.
3736         (inline_read_section): Likewise.
3737         (write_ipa_call_summary): Likewise.
3738         (ipa_fn_summary_write): Likewise.
3739         (ipa_free_fn_summary): Likewise.
3740         * ipa-hsa.c (process_hsa_functions): Likewise.
3741         (ipa_hsa_write_summary): Likewise.
3742         (ipa_hsa_read_section): Likewise.
3743         * ipa-icf.c (sem_function::merge): Likewise.
3744         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3745         (do_estimate_edge_time): Likewise.
3746         (estimate_size_after_inlining): Likewise.
3747         (estimate_growth): Likewise.
3748         (growth_likely_positive): Likewise.
3749         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3750         (inline_call): Likewise.
3751         * ipa-inline.c (caller_growth_limits): Likewise.
3752         (can_inline_edge_p): Likewise.
3753         (can_inline_edge_by_limits_p): Likewise.
3754         (compute_uninlined_call_time): Likewise.
3755         (compute_inlined_call_time): Likewise.
3756         (want_inline_small_function_p): Likewise.
3757         (edge_badness): Likewise.
3758         (update_caller_keys): Likewise.
3759         (update_callee_keys): Likewise.
3760         (recursive_inlining): Likewise.
3761         (inline_small_functions): Likewise.
3762         (inline_to_all_callers_1): Likewise.
3763         (dump_overall_stats): Likewise.
3764         (early_inline_small_functions): Likewise.
3765         (early_inliner): Likewise.
3766         * ipa-inline.h (estimate_edge_growth): Likewise.
3767         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3768         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3769         * ipa-prop.h (IPA_NODE_REF): Likewise.
3770         (IPA_EDGE_REF): Likewise.
3771         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3772         (propagate_malloc): Likewise.
3773         * ipa-split.c (execute_split_functions): Likewise.
3774         * symbol-summary.h: Rename get to get_create.
3775         (get): Likewise.
3776         (get_create): Likewise.
3777         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3779 2018-06-08  Martin Liska  <mliska@suse.cz>
3781         * symbol-summary.h (release): Move definition out of class
3782         declaration.
3783         (symtab_removal): Likewise.
3784         (symtab_duplication): Likewise.
3786 2018-06-08  Martin Liska  <mliska@suse.cz>
3788         * symbol-summary.h (function_summary): Move constructor
3789         implementation out of class declaration.
3790         (release): Likewise.
3791         (symtab_insertion): Likewise.
3792         (symtab_removal): Likewise.
3793         (symtab_duplication): Likewise.
3794         (get): Likewise.
3796 2018-06-08  Martin Liska  <mliska@suse.cz>
3798         * Makefile.in: Remove support for MPX (macros, related functions,
3799         fields in cgraph_node, ...).
3800         * builtin-types.def (BT_BND): Likewise.
3801         (BT_FN_BND_CONST_PTR): Likewise.
3802         (BT_FN_CONST_PTR_BND): Likewise.
3803         (BT_FN_VOID_PTR_BND): Likewise.
3804         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3805         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3806         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3807         (expand_builtin_mempcpy_with_bounds): Likewise.
3808         (expand_builtin_memset_with_bounds): Likewise.
3809         (expand_builtin_memset_args): Likewise.
3810         (std_expand_builtin_va_start): Likewise.
3811         (expand_builtin): Likewise.
3812         (expand_builtin_with_bounds): Likewise.
3813         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3814         (DEF_LIB_BUILTIN_CHKP): Likewise.
3815         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3816         (DEF_CHKP_BUILTIN): Likewise.
3817         (BUILT_IN_MEMCPY): Likewise.
3818         (BUILT_IN_MEMMOVE): Likewise.
3819         (BUILT_IN_MEMPCPY): Likewise.
3820         (BUILT_IN_MEMSET): Likewise.
3821         (BUILT_IN_STPCPY): Likewise.
3822         (BUILT_IN_STRCAT): Likewise.
3823         (BUILT_IN_STRCHR): Likewise.
3824         (BUILT_IN_STRCPY): Likewise.
3825         (BUILT_IN_STRLEN): Likewise.
3826         (BUILT_IN_MEMCPY_CHK): Likewise.
3827         (BUILT_IN_MEMMOVE_CHK): Likewise.
3828         (BUILT_IN_MEMPCPY_CHK): Likewise.
3829         (BUILT_IN_MEMSET_CHK): Likewise.
3830         (BUILT_IN_STPCPY_CHK): Likewise.
3831         (BUILT_IN_STRCAT_CHK): Likewise.
3832         (BUILT_IN_STRCPY_CHK): Likewise.
3833         * calls.c (store_bounds): Likewise.
3834         (emit_call_1): Likewise.
3835         (special_function_p): Likewise.
3836         (maybe_warn_nonstring_arg): Likewise.
3837         (initialize_argument_information): Likewise.
3838         (finalize_must_preallocate): Likewise.
3839         (compute_argument_addresses): Likewise.
3840         (expand_call): Likewise.
3841         * cfgexpand.c (expand_call_stmt): Likewise.
3842         (expand_return): Likewise.
3843         (expand_gimple_stmt_1): Likewise.
3844         (pass_expand::execute): Likewise.
3845         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
3846         (cgraph_node::remove): Likewise.
3847         (cgraph_node::dump): Likewise.
3848         (cgraph_node::verify_node): Likewise.
3849         * cgraph.h (chkp_function_instrumented_p): Likewise.
3850         (symtab_node::get_alias_target): Likewise.
3851         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
3852         (cgraph_local_p): Likewise.
3853         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
3854         (cgraph_edge::rebuild_references): Likewise.
3855         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
3856         (walk_polymorphic_call_targets): Likewise.
3857         (cgraph_node::expand_thunk): Likewise.
3858         (symbol_table::output_weakrefs): Likewise.
3859         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
3860         (ix86_handle_option): Likewise.
3861         * config/i386/constraints.md: Likewise.
3862         * config/i386/i386-builtin-types.def (BND): Likewise.
3863         (VOID): Likewise.
3864         (PVOID): Likewise.
3865         (ULONG): Likewise.
3866         * config/i386/i386-builtin.def (BDESC_END): Likewise.
3867         (BDESC_FIRST): Likewise.
3868         (BDESC): Likewise.
3869         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3870         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3871         * config/i386/i386.c (enum reg_class): Likewise.
3872         (ix86_target_string): Likewise.
3873         (ix86_option_override_internal): Likewise.
3874         (ix86_conditional_register_usage): Likewise.
3875         (ix86_valid_target_attribute_inner_p): Likewise.
3876         (ix86_set_indirect_branch_type): Likewise.
3877         (ix86_set_current_function): Likewise.
3878         (ix86_function_arg_regno_p): Likewise.
3879         (init_cumulative_args): Likewise.
3880         (ix86_function_arg_advance): Likewise.
3881         (ix86_function_arg): Likewise.
3882         (ix86_pass_by_reference): Likewise.
3883         (ix86_function_value_regno_p): Likewise.
3884         (ix86_function_value_1): Likewise.
3885         (ix86_function_value_bounds): Likewise.
3886         (ix86_return_in_memory): Likewise.
3887         (ix86_setup_incoming_vararg_bounds): Likewise.
3888         (ix86_va_start): Likewise.
3889         (indirect_thunk_need_prefix): Likewise.
3890         (print_reg): Likewise.
3891         (ix86_print_operand): Likewise.
3892         (ix86_expand_call): Likewise.
3893         (ix86_output_function_return): Likewise.
3894         (reg_encoded_number): Likewise.
3895         (BDESC_VERIFYS): Likewise.
3896         (ix86_init_mpx_builtins): Likewise.
3897         (ix86_init_builtins): Likewise.
3898         (ix86_emit_cmove): Likewise.
3899         (ix86_emit_move_max): Likewise.
3900         (ix86_expand_builtin): Likewise.
3901         (ix86_builtin_mpx_function): Likewise.
3902         (ix86_get_arg_address_for_bt): Likewise.
3903         (ix86_load_bounds): Likewise.
3904         (ix86_store_bounds): Likewise.
3905         (ix86_load_returned_bounds): Likewise.
3906         (ix86_store_returned_bounds): Likewise.
3907         (ix86_class_likely_spilled_p): Likewise.
3908         (ix86_hard_regno_mode_ok): Likewise.
3909         (x86_order_regs_for_local_alloc): Likewise.
3910         (ix86_mitigate_rop): Likewise.
3911         (ix86_bnd_prefixed_insn_p): Likewise.
3912         (ix86_mpx_bound_mode): Likewise.
3913         (ix86_make_bounds_constant): Likewise.
3914         (ix86_initialize_bounds): Likewise.
3915         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3916         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3917         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3918         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3919         (TARGET_CHKP_BOUND_MODE): Likewise.
3920         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3921         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3922         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3923         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3924         * config/i386/i386.h (TARGET_MPX): Likewise.
3925         (TARGET_MPX_P): Likewise.
3926         (VALID_BND_REG_MODE): Likewise.
3927         (FIRST_BND_REG): Likewise.
3928         (LAST_BND_REG): Likewise.
3929         (enum reg_class): Likewise.
3930         (BND_REG_P): Likewise.
3931         (BND_REGNO_P): Likewise.
3932         (BNDmode): Likewise.
3933         (ADJUST_INSN_LENGTH): Likewise.
3934         * config/i386/i386.md: Likewise.
3935         * config/i386/i386.opt: Likewise.
3936         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3937         (defined): Likewise.
3938         (LINK_MPX): Likewise.
3939         (MPX_SPEC): Likewise.
3940         (LIBMPX_SPEC): Likewise.
3941         (LIBMPXWRAPPERS_SPEC): Likewise.
3942         (CHKP_SPEC): Likewise.
3943         * config/i386/predicates.md: Likewise.
3944         * dbxout.c (dbxout_type): Likewise.
3945         * doc/extend.texi: Likewise.
3946         * doc/invoke.texi: Likewise.
3947         * doc/md.texi: Likewise.
3948         * doc/tm.texi: Likewise.
3949         * doc/tm.texi.in: Likewise.
3950         * dwarf2out.c (is_base_type): Likewise.
3951         (gen_formal_types_die): Likewise.
3952         (gen_subprogram_die): Likewise.
3953         (gen_type_die_with_usage): Likewise.
3954         (gen_decl_die): Likewise.
3955         (dwarf2out_late_global_decl): Likewise.
3956         * expr.c (expand_assignment): Likewise.
3957         (emit_storent_insn): Likewise.
3958         (store_expr_with_bounds): Likewise.
3959         (store_expr): Likewise.
3960         (expand_expr_real_1): Likewise.
3961         * expr.h (store_expr_with_bounds): Likewise.
3962         * function.c (use_register_for_decl): Likewise.
3963         (struct bounds_parm_data): Likewise.
3964         (assign_parms_augmented_arg_list): Likewise.
3965         (assign_parm_find_entry_rtl): Likewise.
3966         (assign_parm_is_stack_parm): Likewise.
3967         (assign_parm_load_bounds): Likewise.
3968         (assign_bounds): Likewise.
3969         (assign_parms): Likewise.
3970         (expand_function_start): Likewise.
3971         * gcc.c (CHKP_SPEC): Likewise.
3972         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3973         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3974         (wrestrict_dom_walker::check_call): Likewise.
3975         * gimple.c (gimple_build_call_from_tree): Likewise.
3976         * gimple.h (enum gf_mask): Likewise.
3977         (gimple_call_with_bounds_p): Likewise.
3978         (gimple_call_set_with_bounds): Likewise.
3979         * gimplify.c (gimplify_init_constructor): Likewise.
3980         * ipa-cp.c (initialize_node_lattices): Likewise.
3981         (propagate_constants_across_call): Likewise.
3982         (find_more_scalar_values_for_callers_subset): Likewise.
3983         * ipa-hsa.c (process_hsa_functions): Likewise.
3984         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3985         * ipa-icf.c (sem_function::merge): Likewise.
3986         * ipa-inline.c (early_inliner): Likewise.
3987         * ipa-pure-const.c (warn_function_noreturn): Likewise.
3988         (warn_function_cold): Likewise.
3989         (propagate_pure_const): Likewise.
3990         * ipa-ref.h (enum GTY): Likewise.
3991         * ipa-split.c (find_retbnd): Likewise.
3992         (consider_split): Likewise.
3993         (split_function): Likewise.
3994         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3995         * ipa.c (walk_polymorphic_call_targets): Likewise.
3996         (symbol_table::remove_unreachable_nodes): Likewise.
3997         (process_references): Likewise.
3998         (cgraph_build_static_cdtor_1): Likewise.
3999         * lto-cgraph.c (lto_output_node): Likewise.
4000         (output_refs): Likewise.
4001         (compute_ltrans_boundary): Likewise.
4002         (input_overwrite_node): Likewise.
4003         (input_node): Likewise.
4004         (input_cgraph_1): Likewise.
4005         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4006         * passes.c (pass_manager::execute_early_local_passes): Likewise.
4007         (class pass_chkp_instrumentation_passes): Likewise.
4008         (make_pass_chkp_instrumentation_passes): Likewise.
4009         * passes.def: Likewise.
4010         * rtl.h (struct GTY): Likewise.
4011         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4012         * stor-layout.c (layout_type): Likewise.
4013         * symtab.c: Likewise.
4014         * target.def: Likewise.
4015         * targhooks.c (default_chkp_bound_type): Likewise.
4016         (default_chkp_bound_mode): Likewise.
4017         (default_builtin_chkp_function): Likewise.
4018         (default_chkp_function_value_bounds): Likewise.
4019         (default_chkp_make_bounds_constant): Likewise.
4020         (default_chkp_initialize_bounds): Likewise.
4021         * targhooks.h (default_chkp_bound_type): Likewise.
4022         (default_chkp_bound_mode): Likewise.
4023         (default_builtin_chkp_function): Likewise.
4024         (default_chkp_function_value_bounds): Likewise.
4025         (default_chkp_make_bounds_constant): Likewise.
4026         (default_chkp_initialize_bounds): Likewise.
4027         * toplev.c (compile_file): Likewise.
4028         (process_options): Likewise.
4029         * tree-core.h (DEF_BUILTIN): Likewise.
4030         (DEF_BUILTIN_CHKP): Likewise.
4031         * tree-inline.c (declare_return_variable): Likewise.
4032         (remap_gimple_stmt): Likewise.
4033         (copy_bb): Likewise.
4034         (initialize_inlined_parameters): Likewise.
4035         (expand_call_inline): Likewise.
4036         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4037         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4038         (make_pass_ipa_chkp_produce_thunks): Likewise.
4039         (make_pass_chkp): Likewise.
4040         (make_pass_chkp_opt): Likewise.
4041         (make_pass_chkp_instrumentation_passes): Likewise.
4042         * tree-pretty-print.c (dump_generic_node): Likewise.
4043         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4044         * tree-ssa-dce.c (propagate_necessity): Likewise.
4045         (eliminate_unnecessary_stmts): Likewise.
4046         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4047         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4048         * tree-ssa-sccvn.h: Likewise.
4049         * tree-ssa-strlen.c (get_string_length): Likewise.
4050         (valid_builtin_call): Likewise.
4051         (adjust_last_stmt): Likewise.
4052         (handle_builtin_strchr): Likewise.
4053         (handle_builtin_strcpy): Likewise.
4054         (handle_builtin_stxncpy): Likewise.
4055         (handle_builtin_memcpy): Likewise.
4056         (handle_builtin_strcat): Likewise.
4057         (strlen_check_and_optimize_stmt): Likewise.
4058         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4059         * tree-streamer-in.c: Likewise.
4060         * tree-streamer.c (record_common_node): Likewise.
4061         * tree.c (tree_code_size): Likewise.
4062         (wide_int_to_tree_1): Likewise.
4063         (type_contains_placeholder_1): Likewise.
4064         (build_common_tree_nodes): Likewise.
4065         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4066         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4067         (POINTER_BOUNDS_P): Likewise.
4068         (BOUNDED_TYPE_P): Likewise.
4069         (BOUNDED_P): Likewise.
4070         (CALL_WITH_BOUNDS_P): Likewise.
4071         (pointer_bounds_type_node): Likewise.
4072         * value-prof.c (gimple_ic): Likewise.
4073         * var-tracking.c (vt_add_function_parameters): Likewise.
4074         * varasm.c (make_decl_rtl): Likewise.
4075         (assemble_start_function): Likewise.
4076         (output_constant): Likewise.
4077         (maybe_assemble_visibility): Likewise.
4078         * varpool.c (ctor_for_folding): Likewise.
4079         * chkp-builtins.def: Remove.
4080         * ipa-chkp.c: Remove.
4081         * ipa-chkp.h: Remove.
4082         * rtl-chkp.c: Remove.
4083         * rtl-chkp.h: Remove.
4084         * tree-chkp-opt.c: Remove.
4085         * tree-chkp.c: Remove.
4086         * tree-chkp.h: Remove.
4088 2018-06-07  Carl Love  <cel@us.ibm.com>
4090         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4091         vextract_fp_from_shortl): Add BE support.
4093 2018-06-07  Paul Koning  <ni1d@arrl.net>
4095         * compare-elim.c (try_merge_compare): Don't merge compare if
4096         address contains a side effect.
4097         (try_eliminate_compare): Likewise.
4099 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
4101         * config.gcc: Support "tremont".
4102         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4103         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4104         PROCESSOR_TREMONT.
4105         * config/i386/i386.c (m_TREMONT): Define.
4106         (processor_target_table): Add "tremont".
4107         (PTA_TREMONT): Define.
4108         (ix86_lea_outperforms): Add TARGET_TREMONT.
4109         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4110         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4111         and M_INTEL_GOLDMONT_PLUS.
4112         (fold_builtin_cpu): Add "tremont".
4113         (ix86_add_stmt_cost): Add TARGET_TREMONT.
4114         (ix86_option_override_internal): Add "tremont".
4115         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4116         (processor_type): Add PROCESSOR_TREMONT.
4117         * config/i386/x86-tune.def: Add m_TREMONT.
4118         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4120 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4122         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4123         symbol defined for msp430i* devices to be lower case.
4125         gcc/testsuite/gcc.target/msp430/
4126         * msp430i-device-symbol.c: New test.
4127         * msp430f-device-symbol.c: New test.
4128         * msp430.h: New test header file.
4130 2018-06-07  Richard Biener  <rguenther@suse.de>
4132         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4133         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
4134         Properly wrap signed arithmetic if overflow wraps.
4136 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
4138         PR tree-optimization/69615
4139         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4140         of a cast from a same precision integral SSA_NAME in a bb dominated
4141         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
4142         cast to utype if rhs2 has already a compatible type.
4144 2018-06-07  Richard Biener  <rguenther@suse.de>
4146         PR tree-optimization/85935
4147         * graphite-scop-detection.c (find_params_in_bb): Analyze
4148         condition operands with respect to the correct loop.  Assert
4149         the analysis doesn't fail.
4151 2018-06-04  Carl Love  <cel@us.ibm.com>
4153         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4154         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
4155         as it is slightly cheaper.
4156         (first_match_or_eos_index_<mode>):
4157         Calculate index using natural element order.
4158         (first_match_index_<mode>):
4159         Calculate index using natural element order.
4160         (first_match_or_eos_index_<mode>):
4161         Calculate index using natural order.
4162         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4163         for BE and LE modes.
4164         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4165         P9V_BUILTIN_VCLZLSBB_V16QI.
4166         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4167         specific.
4169 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4171         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4172         indentation and line wrap for many prototypes.  Add missing
4173         @smallexample directives around block of prototypes for vec_xl and
4174         vec_xst.
4176 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
4178         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4179         track if we pass or return IEEE 128-bit floating point.
4180         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4181         C++ mangling that is compatible with GCC 8.1.
4182         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4183         (init_cumulative_args): Note if we pass or return IEEE 128-bit
4184         floating point types.
4185         (rs6000_function_arg_advance_1): Likewise.
4186         (rs6000_mangle_type): Optionally generate mangled names that match
4187         what GCC 8.1 generated for IEEE 128-bit floating point types.
4188         (rs6000_globalize_decl_name): If we have an external function that
4189         passes or returns IEEE 128-bit types, generate a weak reference
4190         from the mangled name used in GCC 8.1 to the current mangled
4191         name.
4192         (rs6000_init_builtins): Make __ibm128 use the long double type if
4193         long double is IBM extended double.  Make __float128 use the long
4194         double type if long double is IEEE 128-bit.
4196         PR target/85657
4197         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4198         macro for __ibm128 built-in functions.
4199         (PACK_IF): Add __ibm128 pack/unpack functions.
4200         (UNPACK_IF): Likewise.
4201         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4202         enable long double built-in functions if long double is IEEE
4203         128-bit floating point.
4204         (rs6000_invalid_builtin): Update long double built-in function
4205         error message.
4206         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4207         functions, adjust the built-in function to use the long double
4208         built-in function if __ibm128 and long double are the same type.
4209         * doc/extend.texi (PowerPC builtins): Update documention for
4210         __builtin_{,un}pack_longdouble.  Add documentation for
4211         __builtin_{,un}pack_ibm128.
4213 2018-06-06  Jim Wilson  <jimw@sifive.com>
4215         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4216         (struct machine_function): New field interrupt_mode.
4217         (riscv_handle_type_attribute): New function.  Add forward declaration.
4218         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4219         (riscv_expand_epilogue): Check interrupt_mode field.
4220         (riscv_set_current_function): Check interrupt attribute args and
4221         set interrupt_mode field.
4222         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4223         (riscv_sret, riscv_uret): New.
4224         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4225         new arguments to interrupt attribute.
4227 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
4229         PR target/63177
4230         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4231         Don't handle -mcpu=power8 if -mpower9-vector is also used.
4233 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4235         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4236         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4237         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4238         several redundant entries.
4240 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
4242         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4243         type from "rtx" to "rtx_insn *".
4244         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4245         for local "call_insn", removing cast.
4246         (ix86_expand_call): Likewise, introducing a "call_insn" local.
4248 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4250         PR tree-optimization/86066
4251         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4252         for BIT_INSERT_EXPR stores.
4254 2018-06-06  Richard Biener  <rguenther@suse.de>
4256         PR tree-optimization/86062
4257         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4258         component refs ontop
4259         of to be offsetted base.
4261 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4263         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4264         to be static and remove check on interrupt attribute name.
4266         gcc/testsuite/gcc.target/msp430/
4267         * function-attributes-4.c: New test.
4268         * static-interrupts.c: New test.
4270 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4272         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4273         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4275 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
4277         PR target/79924
4278         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4279         second argument.
4280         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4281         Remove second argument, change how error is called.
4282         (aarch64_layout_arg): Remove second argument from
4283         aarch64_err_no_fpadvsimd call.
4284         (aarch64_init_cumulative_args): Ditto.
4285         (aarch64_gimplify_va_arg_expr): Ditto.
4286         * config/aarch64/aarch64.md (mov<mode>): Ditto.
4288 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
4290         * config/i386/i386.md (simple_return_indirect_internal): New expander.
4291         (*simple_return_indirect_internal<mode>): Rename from
4292         simple_return_indirect_internal.  Use W mode iterator.
4293         (rstorssp): New expander.
4294         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
4295         (clrssbsy): New expander.
4296         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
4298 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4300         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4301         __typeof__.
4302         (cmse_check_pointed_object): Likewise.
4304 2018-06-05  Martin Liska  <mliska@suse.cz>
4306         PR gcov-profile/47618
4307         * doc/invoke.texi: Document how -fprofile-dir format
4308         is extended.
4310 2018-06-05  Richard Biener  <rguenther@suse.de>
4312         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4313         removal pretend DOM info isn't available so we do not update
4314         it and only remove edges, not dominated blocks.  Actually free
4315         DOM info in case we removed something.  Remove unreachable blocks.
4316         (mfb_keep_latches): Work with either DOM info or marked backedges.
4317         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4318         first.  Mark backedges if DOM info isn't available.
4319         (Re-)compute DOM info after cleanup_control_flow_pre.
4321 2018-06-05  Richard Biener  <rguenther@suse.de>
4323         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4324         (locus_discrim_hasher::hash): Adjust.
4325         (locus_discrim_hasher::equal): Likewise.
4326         (next_discriminator_for_locus): Work on line directly.
4327         (same_line_p): Pass in expanded locus1 as well.
4328         (assign_discriminators): Avoid redundant location expansions.
4330 2018-06-05  Richard Biener  <rguenther@suse.de>
4332         PR tree-optimization/86046
4333         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4334         if required after clearing TREE_ADDRESSABLE.
4336 2018-06-05  Richard Biener  <rguenther@suse.de>
4338         PR tree-optimization/86047
4339         * tree-ssa-loop.c (for_each_index): Glob handling of all
4340         decls and constants and really handle all of them.
4342 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4344         PR target/81497
4345         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4346         qualifier_void_pointer and qualifier_const_void_pointer.
4347         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4348         (arm_init_builtins): Handle the above.
4349         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4350         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4351         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4352         void intrinsics.
4354 2018-06-05  Martin Liska  <mliska@suse.cz>
4356         * auto-profile.c (read_autofdo_file): Do not use
4357         gcov_ctr_summary struct.
4358         (afdo_callsite_hot_enough_for_early_inline): Likewise.
4359         * coverage.c (struct counts_entry): Likewise.
4360         (read_counts_file): Read just single summary entry.
4361         (get_coverage_counts): Use gcov_summary struct.
4362         * coverage.h (get_coverage_counts): Likewise.
4363         * gcov-dump.c (dump_working_sets): Likewise.
4364         (tag_summary): Dump just single summary.
4365         * gcov-io.c (gcov_write_summary): Write just histogram
4366         summary.
4367         (gcov_read_summary): Read just single summary.
4368         (compute_working_sets): Use gcov_summary struct.
4369         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4370         of GCOV_COUNTERS_SUMMABLE.
4371         (GCOV_COUNTERS_SUMMABLE): Remove.
4372         (GCOV_FIRST_VALUE_COUNTER): Replace with
4373         GCOV_COUNTER_V_INTERVAL.
4374         (struct gcov_ctr_summary): Remove.
4375         (struct gcov_summary): Directly use fields of former
4376         gcov_ctr_summary.
4377         (compute_working_sets): Use gcov_summary struct.
4378         * gcov.c (read_count_file): Do not use ctrs fields.
4379         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4380         struct.
4381         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4382         struct.
4383         * profile.c: Likewise.
4384         * profile.h: Likewise.
4386 2018-06-05  Martin Liska  <mliska@suse.cz>
4388         PR gcov-profile/84846
4389         * gcov.c (output_lines): Print working directory only
4390         in intermediate format.
4392 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
4394         * config/s390/s390-builtin-types.def: Add void function type.
4395         * config/s390/s390-builtins.def: Use the function type for the
4396         tbeginc builtin.
4398 2018-06-04  Jim Wilson  <jimw@sifive.com>
4400         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4401         to int.
4402         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4403         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
4404         handle EH_RETURN_DATA_REGNO registers properly.
4405         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4406         (riscv_expand_epilogue): Update comment.  Change argument name and
4407         type.  Update code to use new name and type.  Pass new args to
4408         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
4409         EXCEPTION_RETURN.
4410         * config/riscv/riscv.md (NORMAL_RETURN): New.
4411         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4412         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4413         (eh_return): Call gen_eh_return_internal and emit barrier.
4414         (eh_return_internal): Call riscv_expand_epilogue.
4416 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
4418         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4419         bit_insertion field and declare can_be_merged_into method.
4420         (merged_store_group::can_be_merged_into): New method.
4421         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4422         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
4423         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4425 2018-06-04  Richard Biener  <rguenther@suse.de>
4427         PR tree-optimization/85955
4428         * builtins.c (fold_builtin_sincos): Convert pointers to
4429         destination to appropriate type before dereferencing.
4431 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
4433         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4435 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
4437         * expr.c (expand_expr_real_1): Force the operand into memory if
4438         its TYPE_MODE is BLKmode and if there is no integer mode for
4439         the number of bits being extracted.
4441 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4443         PR target/85832
4444         PR target/86036
4445         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4446         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4448 2018-06-04  Richard Biener  <rguenther@suse.de>
4450         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4451         (cleanup_tree_cfg_noloop): ... single caller.  Do
4452         start_recording_case_labels later.
4454 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
4456         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4457         to _IMMINTRIN_H_INCLUDED.
4458         * config/i386/pconfigintrin.h: Ditto.
4459         * config/i386/waitpkgintrin.h: Ditto.
4460         * config/i386/immintrin.h: Add includes for sgxintrin.h,
4461         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4462         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4463         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4464         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4465         waitpkgintrin.h and cldemoteintrin.h.
4467 2018-06-04  Richard Biener  <rguenther@suse.de>
4469         PR tree-optimization/86038
4470         * tracer.c (find_best_successor): Check probability for
4471         being initialized, bail out if not.
4473 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
4475         PR target/86003
4476         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4477         of bits to ignore when comparing architectures.
4479 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4481         PR tree-optimization/69615
4482         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4483         maximum or minimum of the type, try to merge it also as if
4484         range1 is + [-, x - 1] or + [x + 1, -].
4486         PR c++/86025
4487         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4489 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
4491         PR tree-optimization/86034
4492         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4493         the unsigned bitfield type in a bit insertion sequence if it does not
4494         have a larger precision than the bitfield size.
4495         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4497 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
4499         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4501 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4503         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4504         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4505         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4506         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4508 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4510         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4511         Disable -fdelete-null-pointer-checks for ELF toolchain.
4513 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4514             Kito Cheng  <kito.cheng@gmail.com>
4516         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4517         (nds32le-*-*, nds32be-*-*): Integrate checking process.
4518         (nds32*-*-*): Add glibc and uclibc conditions.
4519         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4520         (TARGET_EXCEPT_UNWIND_INFO): Define.
4521         * config/nds32/elf.h: New file.
4522         * config/nds32/linux.h: New file.
4523         * config/nds32/nds32-elf.opt: New file.
4524         * config/nds32/nds32-linux.opt: New file.
4525         * config/nds32/nds32-fp-as-gp.c
4526         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4527         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4528         TARGET_LINUX_ABI.
4529         (nds32_asm_file_end): Ditto.
4530         (nds32_print_operand): Ditto.
4531         (nds32_insert_attributes): Ditto.
4532         (nds32_init_libfuncs): New function.
4533         (TARGET_HAVE_TLS): Define.
4534         (TARGET_INIT_LIBFUNCS): Define.
4535         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4536         spec content.
4537         (TARGET_ELF): Apply different mcmodel setting.
4538         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4539         been migrated into elf.h and linux.h files.
4540         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4541         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4542         (mcmodel): The content has been migrated into nds32-elf.opt and
4543         nds32-linux.opt files.
4544         * config/nds32/t-elf: New file.
4545         * config/nds32/t-linux: New file.
4547 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4548             Shiva Chen  <shiva0217@gmail.com>
4550         * config/nds32/constants.md (unspec_volatile_element): Add
4551         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4552         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4553         optimization.
4554         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4555         (make_pass_nds32_fp_as_gp): Declare.
4556         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4557         optmization pass.
4558         (nds32_asm_function_end_prologue): Remove unused asm output.
4559         (nds32_asm_function_begin_epilogue): Remove unused asm output.
4560         (nds32_asm_file_start): Output necessary fp_as_gp information.
4561         (nds32_option_override): Adjust register usage.
4562         (nds32_expand_prologue): Consider fp_as_gp situation.
4563         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4564         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4565         (epilogue): Ditto.
4566         (return): Ditto.
4567         (simple_return): Ditto.
4568         (omit_fp_begin): Output special directive for fp_as_gp.
4569         (omit_fp_end): Output special directive for fp_as_gp.
4570         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4571         mforbid-fp-as-gp): New options.
4573 2018-06-01  Mark Wielaard  <mark@klomp.org>
4575         * dwarf2out.c (dwarf2out_finish): Remove generation of
4576         DW_AT_loclists_base.
4578 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
4580         * gimple-ssa-store-merging.c: Include gimple-fold.h.
4581         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4582         (struct merged_store_group): Add bit_insertion field.
4583         (dump_char_array): Use standard hexadecimal format.
4584         (merged_store_group::merged_store_group): Set bit_insertion to false.
4585         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
4586         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
4587         also print the mask in the dump file.
4588         (pass_store_merging::gate): Minor tweak.
4589         (imm_store_chain_info::coalesce_immediate): Fix wrong association
4590         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
4591         stores with INTEGER_CST stores.
4592         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4593         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4594         and use it throughout.  Generate bit insertion sequences if need be.
4595         (pass_store_merging::process_store): Remove redundant condition.
4596         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4598 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
4600         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4601         the 128-bit floating point types.  Fix function comment.
4603 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4605         * config/aarch64/aarch64-simd.md
4606         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4607         mnemonics.
4608         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4609         mnemonics.
4611 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4613         PR tree-optimization/85989
4614         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4615         variable.
4616         (backprop::intersect_uses): Check it when deciding whether this
4617         is a backedge reference.
4618         (backprop::process_block): Add each phi to m_visited_phis
4619         after visiting it, then clear it at the end.
4621 2018-06-01  Richard Biener  <rguenther@suse.de>
4623         * tree-vectorizer.h (vect_dr_stmt): New function.
4624         (vect_get_load_cost): Adjust.
4625         (vect_get_store_cost): Likewise.
4626         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4627         Use vect_dr_stmt instead of DR_SMTT.
4628         (vect_record_base_alignments): Likewise.
4629         (vect_calculate_target_alignment): Likewise.
4630         (vect_compute_data_ref_alignment): Likewise and make static.
4631         (vect_update_misalignment_for_peel): Likewise.
4632         (vect_verify_datarefs_alignment): Likewise.
4633         (vector_alignment_reachable_p): Likewise.
4634         (vect_get_data_access_cost): Likewise.  Pass down
4635         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4636         (vect_get_peeling_costs_all_drs): Likewise.
4637         (vect_peeling_hash_get_lowest_cost): Likewise.
4638         (vect_enhance_data_refs_alignment): Likewise.
4639         (vect_find_same_alignment_drs): Likewise.
4640         (vect_analyze_data_refs_alignment): Likewise.
4641         (vect_analyze_group_access_1): Likewise.
4642         (vect_analyze_group_access): Likewise.
4643         (vect_analyze_data_ref_access): Likewise.
4644         (vect_analyze_data_ref_accesses): Likewise.
4645         (vect_vfa_segment_size): Likewise.
4646         (vect_small_gap_p): Likewise.
4647         (vectorizable_with_step_bound_p): Likewise.
4648         (vect_prune_runtime_alias_test_list): Likewise.
4649         (vect_analyze_data_refs): Likewise.
4650         (vect_supportable_dr_alignment): Likewise.
4651         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4652         (vect_gen_prolog_loop_niters): Likewise.
4653         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4654         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4655         modify DR_STMT.
4656         (vect_recog_mask_conversion_pattern): Likewise.
4657         (vect_try_gather_scatter_pattern): Likewise.
4658         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4659         to vect_get_store_cost.
4660         (vect_get_store_cost): Get stmt_info instead of DR.
4661         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4662         (vect_get_load_cost): Get stmt_info instead of DR.
4664 2018-06-01  Richard Biener  <rguenther@suse.de>
4666         PR middle-end/86017
4667         * gimple-fold.c (var_decl_component_p): Also allow offsetted
4668         vars wrapped in MEM_REFs.
4670 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4672         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4673         Fix subreg tests so that we only return a choice between
4674         GENERAL_REGS and FP_REGS if the original classes included both.
4676 2018-06-01  Richard Biener  <rguenther@suse.de>
4678         PR ipa/85960
4679         * tree-ssa-structalias.c (get_function_part_constraint):
4680         Handle NULL fi->decl.
4681         (find_func_aliases_for_call): Properly handle indirect
4682         fi from direct call.
4683         (find_func_clobbers): Likewise.
4684         (ipa_pta_execute): Likewise.
4685         (create_variable_info_for): For functions that are ifunc_resolver
4686         resolve to a varinfo that contains the result of the resolver call.
4687         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4688         aliases.
4690 2018-05-31  Michael Collison  <michael.collison@arm.com>
4692         * config/aarch64/aarch64.md:
4693         (*fix_to_zero_extenddfdi2): New pattern.
4694         * gcc.target/aarch64/fix_extend1.c: New testcase.
4696 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
4698         PR middle-end/78809
4699         PR middle-end/83026
4700         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4701         and BUILT_IN_STRNCMP_EQ.
4702         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4703         BUILT_IN_STRNCMP_EQ.
4704         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4705         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4706         (gimple_fold_builtin): Likewise.
4707         * tree-ssa-strlen.c (compute_string_length): New function.
4708         (determine_min_obsize): New function.
4709         (handle_builtin_string_cmp): New function to handle calls to
4710         string compare functions.
4711         (strlen_optimize_stmt): Add handling to builtin string compare
4712         calls.
4713         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4714         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4715         * tree.c (build_common_builtin_nodes): Add new defines of
4716         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4718 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
4720         PR target/85984
4721         * bb-reorder.c (pass_partition_blocks::gate): Return false for
4722         functions with naked attribute.
4724 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4726         * config/i386/sse.md (avx_vec_concat<mode>):
4727         Substitute concat_tg_mode mode attribute with xtg_mode.
4728         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4729         (concat_tg_mode): Remove mode attribute.
4731 2018-05-31  Martin Sebor  <msebor@redhat.com>
4733         PR c/82063
4734         * calls.c (alloc_max_size): Correct a logic error/typo.
4735         Treat excessive arguments as infinite.  Warn for invalid arguments.
4736         * doc/invoke.texi (-Walloc-size-larger-than): Update.
4738 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
4740         PR target/85829
4741         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4742         and movx for Haswell.
4744 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
4745             Cesar Philippidis  <cesar@codesourcery.com>
4747         PR middle-end/85879
4748         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4749         when emitting error on private/firstprivate reductions.
4750         * omp-low.c (lower_omp_target): Avoid reference-type processing
4751         on pointers for firstprivate clause.
4753 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4755         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4756         (st1x2): Likewise.
4757         (st1x3): Likewise.
4758         * config/aarch64/aarch64-simd.md
4759         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4760         (aarch64_ld1_x3_<mode>): Likewise
4761         (aarch64_st1x2<VALLDIF:mode>): Likewise
4762         (aarch64_st1_x2_<mode>): Likewise
4763         (aarch64_st1x3<VALLDIF:mode>): Likewise
4764         (aarch64_st1_x3_<mode>): Likewise
4765         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4766         (vld1_s8_x3): Likewise.
4767         (vld1_u16_x3): Likewise.
4768         (vld1_s16_x3): Likewise.
4769         (vld1_u32_x3): Likewise.
4770         (vld1_s32_x3): Likewise.
4771         (vld1_u64_x3): Likewise.
4772         (vld1_s64_x3): Likewise.
4773         (vld1_f16_x3): Likewise.
4774         (vld1_f32_x3): Likewise.
4775         (vld1_f64_x3): Likewise.
4776         (vld1_p8_x3): Likewise.
4777         (vld1_p16_x3): Likewise.
4778         (vld1_p64_x3): Likewise.
4779         (vld1q_u8_x3): Likewise.
4780         (vld1q_s8_x3): Likewise.
4781         (vld1q_u16_x3): Likewise.
4782         (vld1q_s16_x3): Likewise.
4783         (vld1q_u32_x3): Likewise.
4784         (vld1q_s32_x3): Likewise.
4785         (vld1q_u64_x3): Likewise.
4786         (vld1q_s64_x3): Likewise.
4787         (vld1q_f16_x3): Likewise.
4788         (vld1q_f32_x3): Likewise.
4789         (vld1q_f64_x3): Likewise.
4790         (vld1q_p8_x3): Likewise.
4791         (vld1q_p16_x3): Likewise.
4792         (vld1q_p64_x3): Likewise.
4793         (vst1_s64_x2): Likewise.
4794         (vst1_u64_x2): Likewise.
4795         (vst1_f64_x2): Likewise.
4796         (vst1_s8_x2): Likewise.
4797         (vst1_p8_x2): Likewise.
4798         (vst1_s16_x2): Likewise.
4799         (vst1_p16_x2): Likewise.
4800         (vst1_s32_x2): Likewise.
4801         (vst1_u8_x2): Likewise.
4802         (vst1_u16_x2): Likewise.
4803         (vst1_u32_x2): Likewise.
4804         (vst1_f16_x2): Likewise.
4805         (vst1_f32_x2): Likewise.
4806         (vst1_p64_x2): Likewise.
4807         (vst1q_s8_x2): Likewise.
4808         (vst1q_p8_x2): Likewise.
4809         (vst1q_s16_x2): Likewise.
4810         (vst1q_p16_x2): Likewise.
4811         (vst1q_s32_x2): Likewise.
4812         (vst1q_s64_x2): Likewise.
4813         (vst1q_u8_x2): Likewise.
4814         (vst1q_u16_x2): Likewise.
4815         (vst1q_u32_x2): Likewise.
4816         (vst1q_u64_x2): Likewise.
4817         (vst1q_f16_x2): Likewise.
4818         (vst1q_f32_x2): Likewise.
4819         (vst1q_f64_x2): Likewise.
4820         (vst1q_p64_x2): Likewise.
4821         (vst1_s64_x3): Likewise.
4822         (vst1_u64_x3): Likewise.
4823         (vst1_f64_x3): Likewise.
4824         (vst1_s8_x3): Likewise.
4825         (vst1_p8_x3): Likewise.
4826         (vst1_s16_x3): Likewise.
4827         (vst1_p16_x3): Likewise.
4828         (vst1_s32_x3): Likewise.
4829         (vst1_u8_x3): Likewise.
4830         (vst1_u16_x3): Likewise.
4831         (vst1_u32_x3): Likewise.
4832         (vst1_f16_x3): Likewise.
4833         (vst1_f32_x3): Likewise.
4834         (vst1_p64_x3): Likewise.
4835         (vst1q_s8_x3): Likewise.
4836         (vst1q_p8_x3): Likewise.
4837         (vst1q_s16_x3): Likewise.
4838         (vst1q_p16_x3): Likewise.
4839         (vst1q_s32_x3): Likewise.
4840         (vst1q_s64_x3): Likewise.
4841         (vst1q_u8_x3): Likewise.
4842         (vst1q_u16_x3): Likewise.
4843         (vst1q_u32_x3): Likewise.
4844         (vst1q_u64_x3): Likewise.
4845         (vst1q_f16_x3): Likewise.
4846         (vst1q_f32_x3): Likewise.
4847         (vst1q_f64_x3): Likewise.
4848         (vst1q_p64_x3): Likewise.
4850 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4852         * config/msp430/msp430.c (msp430_output_labelref): Prepend
4853         user_label_prefix to name.
4855         * tree-core.h: Update comment about the format of NAME string
4856         passed to handler in attribute_spec.
4858         * config/msp430/msp430.md: Remove erroneous subreg expression from
4859         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
4860         zero_extend{q,h}isi2.
4862 2018-05-30  Borislav Petkov  <bp@suse.de>
4864         * doc/extend.texi: Document some architecture specific
4865         constraints and sort entries.
4867 2018-05-30  Martin Sebor  <msebor@redhat.com>
4869         PR middle-end/85369
4870         * builtins.c (expand_builtin_stpcpy_1): New function.
4871         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4872         only if the former succeeds.
4874 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4876         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4877         in saphira.
4879 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4881         * doc/invoke.texi (-flinker-output): Document
4883 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4885         * passes.c (ipa_write_summaries): Only modify statements if body
4886         is in memory.
4887         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4888         incrementally linking.
4889         (ipa_passes): Likewise.
4890         * lto-cgraph.c (lto_output_node): When incrementally linking do not
4891         pass down resolution info.
4892         * common.opt (flag_incremental_link): Update info.
4893         * gcc.c (plugin specs): Turn flinker-output=* to
4894         -plugin-opt=-linker-output-known
4895         * toplev.c (compile_file): Also cut compilation when doing incremental
4896         link.
4897         * flag-types. (enum lto_partition_model): Add
4898         LTO_LINKER_OUTPUT_NOLTOREL.
4899         (invoke.texi): Add -flinker-output docs.
4900         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4901         link same way as WPA; do not stream in dead initializers.
4903         * dwarf2out.c (dwarf2out_die_ref_for_decl,
4904         darf2out_register_external_decl): Support incremental link.
4906 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4908         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4910 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4912         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4913         it down to simple_object_copy_lto_debug_sections.
4914         (run_gcc): Determine incremental LTO link time and configure
4915         lto1 into non-wpa mode, disable renaming of debug sections.
4917 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4919         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4920         descriptions of various incorrectly documented functions.
4922 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4924         Revert:
4925         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4926         address check not strict.
4928 2018-05-30  Richard Biener  <rguenther@suse.de>
4930         PR tree-optimization/85964
4931         * tracer.c (better_p): Drop initialized count check, we only
4932         call the function with initialized counts now.
4933         (find_best_successor): Do find a best edge if one
4934         has uninitialized count.
4935         (find_best_predecessor): Likewise.  Do BB frequency check only
4936         if count is initialized.
4938 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
4940         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4941         (aarch64_ldrstr_offset_compare): New.
4942         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4943         load/store orderings.
4944         (aarch64_gen_adjusted_ldpstp): Likewise.
4946 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
4948         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4949         Check for subset of GENERAL_REGS and FP_REGS.
4950         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4951         r=w alternative.
4953 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
4955         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4956         and wi::to_poly_offset.  Add the current offset and then check
4957         whether the sum fits, rather than using an unchecked addition of
4958         a checked term.  Check for a shwi rather than a uhwi.
4959         * expr.c (get_bit_range): Use tree_to_poly_uint64.
4960         (store_constructor): Use poly_int_tree_p.
4961         (expand_expr_real_1): Likewise.
4962         * function.c (assign_temp): Likewise.
4963         * fold-const.c (const_binop): Use poly_int_tree_p and
4964         wi::to_poly_offset.
4965         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
4966         division.
4967         * ipa-icf-gimple.c (func_checker::compare_operand): Use
4968         to_poly_offset for MEM offsets.
4969         * ipa-icf.c (sem_variable::equals): Likewise.
4970         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4971         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4972         wi::to_poly_offset for BIT_FIELD_REF offsets.
4973         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4974         wi::to_poly_offset.
4975         * var-tracking.c (emit_note_insn_var_location): Use
4976         tree_to_poly_uint64.
4978 2018-05-29  Jim Wilson  <jimw@sifive.com>
4980         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4982 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
4984         PR target/85950
4985         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4986         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4987         sequence.
4988         (sse4_1_round<mode>2): Use nonimmediate_operand
4989         for operand 1 predicate.
4991 2018-05-29  Martin Sebor  <msebor@redhat.com>
4992             Richard Biener  <rguenther@suse.de>
4994         PR testsuite/85888
4995         * calls.c (get_size_range): Call determine_value_range instead
4996         of get_value_range..
4997         * tree-vrp.h (determine_value_range): Declared new function.
4998         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5000 2018-05-29  Richard Biener  <rguenther@suse.de>
5002         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5003         sure to use non-pattern stmts for get_earlier_stmt arguments.
5004         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5005         called on pattern stmts.
5006         (get_later_stmt): Likewise.
5008 2018-05-29  Martin Liska  <mliska@suse.cz>
5010         PR gcov-profile/85759
5011         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5012         env variables.
5014 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
5016         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5017         VEC_UNPACK_*_EXPR.
5018         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5019         VEC_PACK_*_EXPR.
5021         PR target/85918
5022         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5023         VEC_PACK_FLOAT_EXPR): New tree codes.
5024         * tree-pretty-print.c (op_code_prio): Handle
5025         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5026         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5027         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5028         * tree-inline.c (estimate_operator_cost): Likewise.
5029         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5030         * fold-const.c (const_binop): Likewise.
5031         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5032         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5033         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5034         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5035         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5036         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5037         * expr.c (expand_expr_real_2): Likewise.
5038         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5039         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5040         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5041         optabs.
5042         * optabs.c (expand_widen_pattern_expr): For
5043         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5044         sign from result type rather than operand's type.
5045         (expand_binop_directly): For vec_packu_float_optab and
5046         vec_packs_float_optab allow result type to be different from operand's
5047         type.
5048         * optabs-tree.c (optab_for_tree_code): Handle
5049         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5050         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
5051         * tree-vect-generic.c (expand_vector_operations_1):  Handle
5052         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5053         VEC_PACK_FLOAT_EXPR.
5054         * tree-vect-stmts.c (supportable_widening_operation): Handle
5055         FIX_TRUNC_EXPR.
5056         (supportable_narrowing_operation): Handle FLOAT_EXPR.
5057         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5058         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5059         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
5060         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5061         mode attributes.
5062         (vec_pack<floatprefix>_float_<mode>): New expander.
5063         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5064         attributes.
5065         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5066         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5067         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5068         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5069         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5070         Document.
5071         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5072         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5073         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5074         VEC_PACK_FLOAT_EXPR): Document.
5076 2018-05-29  Richard Biener  <rguenther@suse.de>
5078         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5079         member.
5080         (stmt_vec_info_vec): Make pointer.
5081         (init_stmt_vec_info_vec): Remove.
5082         (free_stmt_vec_info_vec): Likewise.
5083         (set_stmt_vec_info_vec): New function.
5084         (free_stmt_vec_infos): Likewise.
5085         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5086         (set_vinfo_for_stmt): Likewise.
5087         (get_earlier_stmt): Likewise.
5088         (get_later_stmt): Likewise.
5089         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5090         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5091         (vec_info::~vec_info): Free stmt_vec_infos.
5092         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5093         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5094         (pass_slp_vectorize::execute): Likewise.
5095         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5096         (free_stmt_vec_info_vec): Likewise.
5097         (set_stmt_vec_info_vec): New function.
5098         (free_stmt_vec_infos): Likewise.
5099         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5100         the global stmt_vec_info_vec.
5101         * tree-parloops.c (gather_scalar_reductions): Use
5102         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5103         vector.
5105 2018-05-29  Richard Biener  <rguenther@suse.de>
5107         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5109 2018-05-29  Martin Liska  <mliska@suse.cz>
5110             David Malcolm  <dmalcolm@redhat.com>
5112         * vec.c (test_reverse): New.
5113         (vec_c_tests): Add new test.
5114         * vec.h (vl_ptr>::reverse): New function.
5116 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
5118         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5120         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5121         and later.
5123 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5125         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5127 2018-05-28  Richard Biener  <rguenther@suse.de>
5129         PR tree-optimization/85933
5130         * tree-vect-data-refs.c (vect_record_base_alignments): Only
5131         look at stmts marked as vectorizable.
5133 2018-05-28  Richard Biener  <rguenther@suse.de>
5135         PR tree-optimization/85934
5136         * tree-vect-generic.c (expand_vector_operations_1): Hoist
5137         vector boolean check before scalar optimization.
5139 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
5141         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5142         for armv5te.
5144 2018-05-28  Mark Wielaard  <mark@klomp.org>
5146         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5147         if it is an expression containing a minus sign.
5149 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
5151         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5153 2018-05-27  Paul Koning  <ni1d@arrl.net>
5155         * config/pdp11/pdp11.md (truncsihi2): Remove.
5157 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
5158             Chung-Ju Wu  <jasonwucj@gmail.com>
5160         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5161         implementation.
5162         (unaligned_store_dw): Ditto.
5163         * config/nds32/nds32-memory-manipulation.c
5164         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5165         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5166         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5167         (emit_setmem_word_loop): Rename to ...
5168         (emit_setmem_doubleword_loop): ... this.
5169         (nds32_gen_dup_4_byte_to_word_value): New function.
5170         (nds32_gen_dup_8_byte_to_double_word_value): New function.
5171         (nds32_expand_setmem_loop): Refine implementation.
5172         (nds32_expand_setmem_loop_v3m): Ditto.
5173         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5174         pattern.
5176 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5178         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5180 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5182         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5183         (nds32_init_machine_status): Initialize machine->attr_naked_p and
5184         machine->attr_no_prologue_p.
5185         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5186         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5187         (nds32_expand_epilogue): Consider attr_naked_p.
5188         (nds32_expand_epilogue_v3pop): Likewise.
5189         (nds32_can_use_return_insn): Likewise.
5190         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5191         attr_no_prologue_p fields.
5192         * config/nds32/nds32.opt (mret-in-naked-func): New option.
5194 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
5196         PR target/85918
5197         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5198         attributes.
5199         * config/i386/sse.md
5200         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5201         Rename to ...
5202         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5203         ... this.
5204         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5205         Rename to ...
5206         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5207         ... this.
5208         (*<floatsuffix>floatv2div2sf2): Rename to ...
5209         (*float<floatunssuffix>v2div2sf2): ... this.
5210         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5211         (float<floatunssuffix>v2div2sf2_mask): ... this.
5212         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5213         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5214         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5215         to ...
5216         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5217         ... this.
5218         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5219         Rename to ...
5220         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5221         ... this.
5222         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5223         Rename to ...
5224         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5225         ... this.
5226         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5227         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5228         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5229         gen_ufix_truncv8dfv8si2.
5230         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5231         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5232         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5233         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5234         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5235         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5236         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5237         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5239 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5241         PR target/85900
5242         PR target/85345
5243         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5245 2018-05-25  Jim Wilson  <jimw@sifive.com>
5247         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5248         * config/riscv/riscv.c (struct machine_function): Add
5249         interrupt_handler_p and attribute_checked_p fields.
5250         (riscv_attribute_table): Add interrupt.
5251         (riscv_interrupt_type_p): New.
5252         (riscv_save_reg_p): Save extra regs for interrupt handler.
5253         (riscv_use_save_libcall): Return false  for interrupt handler.
5254         (riscv_first_stack_step): Add forward declaration.
5255         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
5256         for interrupt handler with large frame.  Use it for saved reg list.
5257         (riscv_expand_prologue): Move flag_stack_usage_info support to
5258         eliminate duplication.
5259         (riscv_expand_epilogue): Generate mret for interrupt handler.
5260         (riscv_epilogue_uses): New.
5261         (riscv_can_use_return_insn): Return false for interrupt handler.
5262         (riscv_function_ok_for_sibcall): Likewise.
5263         (riscv_set_current_function): Add interrupt handler support.
5264         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5265         * config/riscv/riscv.md (UNSPECV_MRET): New.
5266         (GP_REGNUM): New.
5267         (riscv_frflags, riscv_fsflags): Use tab after opcode.
5268         (riscv_mret): New.
5269         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5271 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5273         PR tree-optimization/85712
5274         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5275         this candidate has already been replaced in-situ by a copy.
5277 2018-05-25  Jason Merrill  <jason@redhat.com>
5279         PR c++/80485 - inline function non-zero address.
5280         * symtab.c (nonzero_address): Check DECL_COMDAT.
5282 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
5284         PR target/83628
5285         * config/alpha/alpha.md (ashlsi3): New insn pattern.
5286         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
5287         extension of SImode operation.  Use const123_operand predicate.
5288         (*saddsi_1): Remove.
5289         (*saddl_se_1): Ditto.
5290         (*ssubsi_1): Ditto.
5291         (*ssubl_se_1): Ditto.
5292         * config/alpha/predicates.md (const123_operand): New predicate.
5293         * config/alpha/constraints.md (P): Use IN_RANGE.
5295 2018-05-25  Richard Biener  <rguenther@suse.de>
5297         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5298         defaulted to true.
5299         (ref_maybe_used_by_stmt_p): Likewise.
5300         (stmt_may_clobber_ref_p): Likewise.
5301         (stmt_may_clobber_ref_p_1): Likewise.
5302         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5303         and pass it along.
5304         (ref_maybe_used_by_stmt_p): Likewise.
5305         (stmt_may_clobber_ref_p): Likewise.
5306         (stmt_may_clobber_ref_p_1): Likewise.
5307         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5308         the alias oracle to disambiguate DRs with stmts DR analysis
5309         couldn't handle.
5310         (vect_analyze_data_refs): Do not give up on not analyzable
5311         DRs for BB vectorization.  Remove code truncating the dataref
5312         vector.
5314 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
5316         PR target/85832
5317         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5318         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
5319         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5321 2018-05-25  Richard Biener  <rguenther@suse.de>
5323         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5324         function, combining stmt data ref gathering and fatal analysis
5325         parts.
5326         (vect_analyze_data_refs): Remove now redudnant code and simplify.
5327         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5328         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5329         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5330         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5332 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5334         PR tree-optimization/85720
5335         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5336         SCC if all partitions are builtins.
5337         (version_loop_by_alias_check): New parameter.  Generate cancelable
5338         runtime alias check if all partitions are builtins.
5339         (distribute_loop): Update call to above function.
5341 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5343         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5344         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5345         (parm_default_def_partition_arg): Ditto.
5346         (set_parm_default_def_partition): Ditto.
5347         (get_parm_default_def_partitions): Ditto and make it static.
5348         (get_undefined_value_partitions): Ditto and make it static.
5349         (remove_ssa_form): Refactor call to init_var_map here.
5350         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5351         computation for loop region.
5352         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5353         (register_default_def): Delete.
5354         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5355         (parm_default_def_partition_arg): Ditto.
5356         (set_parm_default_def_partition): Ditto.
5357         (get_parm_default_def_partitions): Ditto and make it static.
5358         (get_undefined_value_partitions): Ditto and make it static.
5359         (coalesce_with_default, coalesce_with_default): Update comment.
5360         (create_coalesce_list_for_region): New func factored out from
5361         create_outofssa_var_map.
5362         (populate_coalesce_list_for_outofssa): New func factored out from
5363         create_outofssa_var_map and coalesce_ssa_name.
5364         (create_outofssa_var_map): Delete.
5365         (coalesce_ssa_name): Refactor to support live range computation.
5366         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5367         (get_parm_default_def_partitions): Delete.
5368         (get_undefined_value_partitions): Ditto.
5369         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5370         computation for loop region.
5371         (new_tree_live_info, loe_visit_block): Ditto.
5372         (live_worklist, set_var_live_on_entry): Ditto.
5373         (calculate_live_on_exit, verify_live_on_entry): Ditto.
5374         * tree-ssa-live.h (struct _var_map): New fields.
5375         (init_var_map): Change decl.
5376         (region_contains_p): New.
5378 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5380         * tree-ssa-live.h (live_merge_and_clear): Delete.
5382 2018-05-25  Richard Biener  <rguenther@suse.de>
5384         PR c++/85912
5385         * tree-dump.c (dequeue_and_dump): Remove access to removed
5386         operand 2 of a SWITCH_EXPR.
5388 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5390         * doc/sourcebuild.texi (vect_double_cond_arith): Include
5391         multiplication and division.
5392         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5393         (cond_udiv@var{m}, cond_umod@var{m}): Document.
5394         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5395         (cond_udiv_optab, cond_umod_optab): New optabs.
5396         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5397         (IFN_COND_RDIV): New internal functions.
5398         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5399         TRUNC_MOD_EXPR and RDIV_EXPR.
5400         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5401         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5402         New unspecs.
5403         (SVE_INT_BINARY): Include mult.
5404         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5405         (optab, sve_int_op): Handle mult.
5406         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5407         UNSPEC_COND_DIV.
5408         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5409         for SVE_INT_BINARY_SD.
5411 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5413         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5414         (optab, sve_int_op): Handle div and udiv.
5415         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5416         for SVE_INT_BINARY_SD.
5417         (*<optab><mode>3): New insn for the same.
5419 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5421         * tree-vect-patterns.c: Include predict.h.
5422         (vect_recog_divmod_pattern): Restrict check for division support
5423         to when optimizing for size.
5425 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5427         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5428         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5429         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5430         (gimple_match_op::set_op): Likewise.
5431         (gimple_resimplify4): Declare.
5432         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5433         (expr::gen_transform): Likewise.
5434         (decision_tree::gen): Generate a simplification routine for 4 operands.
5435         * gimple-match-head.c (gimple_simplify): Add an overload for
5436         4 operands.  In the top-level function, handle up to 4 call
5437         arguments and call gimple_resimplify4.
5438         (gimple_resimplify4): New function.
5439         (build_call_internal): Pass a fourth operand.
5440         (maybe_push_to_seq): Likewise.
5441         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5442         Fold VEC_COND_EXPRs of an operation and a default value into
5443         an IFN_COND_* function if possible.
5444         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5445         New unspecs.
5446         (SVE_COND_FP_BINARY): Include them.
5447         (optab, sve_fp_op): Handle them.
5448         (SVE_INT_BINARY_REV): New code iterator.
5449         (SVE_COND_FP_BINARY_REV): New int iterator.
5450         (commutative): New int attribute.
5451         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5452         Declare.
5453         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5454         function.
5455         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5456         (*cond_<optab><mode>): New patterns for reversed operands.
5458 2018-05-25  Richard Biener  <rguenther@suse.de>
5460         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5461         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5462         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5463         (STMT_VINFO_GROUPED_ACCESS): Adjust.
5464         * tree-vect-data-refs.c (everywhere): Adjust users.
5465         * tree-vect-loop.c (everywhere): Likewise.
5466         * tree-vect-slp.c (everywhere): Likewise.
5467         * tree-vect-stmts.c (everywhere): Likewise.
5468         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5470 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5472         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5473         Rename to...
5474         (gcc_cv_as_section_exclude): ... this.
5475         Try Solaris as #exclude syntax.
5476         * configure: Regenerate.
5477         * config.in: Regenerate.
5478         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5479         SECTION_EXCLUDE.
5480         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5481         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5483         * varasm.c (default_elf_asm_named_section): Don't check if
5484         HAVE_GAS_SECTION_EXCLUDE is defined.
5486 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5488         * doc/md.texi: Update the documentation of the cond_* optabs
5489         to mention the new final operand.  Fix GET_MODE_NUNITS call.
5490         Describe the scalar case too.
5491         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5492         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5493         instead of 2.
5494         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5495         (get_conditional_internal_fn): Update comment.
5496         * tree-vect-loop.c (vectorizable_reduction): Pass the original
5497         accumulator value as a final argument to conditional functions.
5498         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5499         a define_expand and add an "else" operand.  Assert for now that
5500         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
5501         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5502         (*cond_<optab><mode>): New patterns.
5503         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5504         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5505         (UNSPEC_COND_EOR): Delete.
5506         (optab): Remove associated mappings.
5507         (SVE_INT_BINARY): New code iterator.
5508         (sve_int_op): Remove int attribute and add "minus" to the code
5509         attribute.
5510         (SVE_COND_INT_OP): Delete.
5511         (SVE_COND_FP_OP): Rename to...
5512         (SVE_COND_FP_BINARY): ...this.
5514 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5516         * optabs.c (can_reuse_operands_p): New function.
5517         (maybe_legitimize_operands): Try to reuse the results for
5518         earlier operands.
5520 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5522         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5523         Add {q} suffix to insn mnemonic.
5525 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5527         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5528         (msp430_warn_func_return): New.
5530 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
5532         * fold-const.c (tree_nonzero_bits): New function.
5533         * fold-const.h (tree_nonzero_bits): Likewise.
5534         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5535         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5537 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5539         PR target/85900
5540         PR target/85345
5541         * varasm.c (assemble_alias): Check ifunc_resolver only on
5542         FUNCTION_DECL.
5544 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5546         PR target/85903
5547         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5548         when memory input operand is handled.
5550 2018-05-24  Luis Machado  <luis.machado@linaro.org>
5552         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5553         global.
5554         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5556 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5558         * match.pd: Delay FMA folds until after vectorization.
5560 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5562         PR target/83009
5563         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5564         address check not strict.
5566 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5568         * gimple-match.h (gimple_match_op): New class.
5569         (mprts_hook): Replace parameters with a gimple_match_op *.
5570         (maybe_build_generic_op): Likewise.
5571         (gimple_simplified_result_is_gimple_val): Replace parameters with
5572         a const gimple_match_op *.
5573         (gimple_simplify): Replace code_helper * and tree * parameters with
5574         a gimple_match_op * parameter.
5575         (gimple_resimplify1): Replace code_helper *, tree and tree *
5576         parameters with a gimple_match_op * parameter.
5577         (gimple_resimplify2): Likewise.
5578         (gimple_resimplify3): Likewise.
5579         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5580         parameters with a gimple_match_op * parameter.
5581         * gimple-match-head.c (gimple_simplify): Change prototypes of
5582         auto-generated functions to take a gimple_match_op * instead of
5583         separate code_helper * and tree * parameters.  Make the same
5584         change in the top-level overload and update calls to the
5585         gimple_resimplify routines.  Update calls to the auto-generated
5586         functions and to maybe_push_res_to_seq in the publicly-facing
5587         operation-specific gimple_simplify overloads.
5588         (gimple_match_op::MAX_NUM_OPS): Define.
5589         (gimple_resimplify1): Replace rcode and ops with a single res_op
5590         parameter.  Update call to gimple_simplify.
5591         (gimple_resimplify2): Likewise.
5592         (gimple_resimplify3): Likewise.
5593         (mprts_hook): Replace parameters with a gimple_match_op *.
5594         (maybe_build_generic_op): Likewise.
5595         (build_call_internal): Replace type, nargs and ops with
5596         a gimple_match_op *.
5597         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5598         with a single gimple_match_op *.  Update calls to mprts_hook,
5599         build_call_internal and gimple_simplified_result_is_gimple_val.
5600         Factor out code that is common to the tree_code and combined_fn cases.
5601         * genmatch.c (expr::gen_transform): Replace tem_code and
5602         tem_ops with a gimple_match_op called tem_op.  Update calls
5603         to the gimple_resimplify functions and maybe_push_res_to_seq.
5604         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5605         res_ops.  Update call to the gimple_resimplify functions.
5606         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5607         (decision_tree::gen): Make the functions take a gimple_match_op *
5608         called res_op instead of separate res_code and res_ops parameters.
5609         Update call accordingly.
5610         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5611         and ops with a single res_op parameter.  Update calls to
5612         maybe_build_generic_op and maybe_push_res_to_seq.
5613         (fold_stmt_1): Update calls to gimple_simplify and
5614         replace_stmt_with_simplification.
5615         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5616         and gimple_simplified_result_is_gimple_val.
5617         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5618         gimple_simplify.
5619         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5620         with a gimple_match_op *.
5621         (vn_nary_build_or_lookup): Likewise.  Update call to
5622         vn_nary_build_or_lookup_1.
5623         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5624         gimple_match_op *.  Update calls to the gimple_resimplify routines
5625         and to gimple_simplified_result_is_gimple_val.
5626         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5627         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5628         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5629         (visit_nary_op): Likewise.
5630         (visit_reference_op_load): Likewise.
5632 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5634         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5635         modifier for printing the step amount.
5637 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
5639         PR target/78849
5640         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5641         types.
5643 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
5645         * doc/sourcebuild.texi (Endianness): New subsubsection.
5647 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5649         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5650         <prefetch_dynamic_strides>: New const bool field.
5651         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5652         prefetch_dynamic_strides.
5653         (exynosm1_prefetch_tune): Likewise.
5654         (thunderxt88_prefetch_tune): Likewise.
5655         (thunderx_prefetch_tune): Likewise.
5656         (thunderx2t99_prefetch_tune): Likewise.
5657         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5658         false.
5659         (aarch64_override_options_internal): Update to set
5660         PARAM_PREFETCH_DYNAMIC_STRIDES.
5661         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5662         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5663         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5664         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5665         prefetch-dynamic-strides setting.
5667 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5669         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5670         <minimum_stride>: New const int field.
5671         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5672         minimum_stride field defaulting to -1.
5673         (exynosm1_prefetch_tune): Likewise.
5674         (thunderxt88_prefetch_tune): Likewise.
5675         (thunderx_prefetch_tune): Likewise.
5676         (thunderx2t99_prefetch_tune): Likewise.
5677         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5678         <default_opt_level>: Set to 3.
5679         (aarch64_override_options_internal): Update to set
5680         PARAM_PREFETCH_MINIMUM_STRIDE.
5681         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5682         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5683         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5684         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5685         stride is constant and is below the minimum stride threshold.
5687 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5689         * config/arm/arm-cpus.in (mode26): Delete.
5690         (armv4): Delete mode26 reference.
5691         * config/arm/arm.c (arm_configure_build_target): Delete use of
5692         isa_bit_mode26.
5694 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5696         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5697         New insn pattern.
5698         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5699         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
5700         for non-SSE modes.
5701         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
5702         (floatunsdidf2): Ditto.
5704 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5706         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5707         (fixuns_trunc<mode>si2_avx512f): Ditto.
5708         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5709         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5710         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5712 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5714         PR rtl-optimization/79985
5715         * df-scan.c (df_insn_refs_collect): Remove special case for
5716         global registers and asm statements.
5718 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5720         * extend.texi (Global Register Variables): Rewrite the bullet list.
5721         Note that the register is available for allocation. Note that access
5722         via inline asm must use constraints. Add note about async-signal
5723         handlers. Remove paragraph about automagic register selection.
5725 2018-05-23  Richard Biener  <rguenther@suse.de>
5727         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5728         of fixed offset from memset VN.
5730 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
5732         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5733         first_interp field.
5734         (alloc_cand_and_find_basis): Initialize first_interp field.
5735         (slsr_process_mul): Modify first_interp field.
5736         (slsr_process_add): Likewise.
5737         (slsr_process_cast): Modify first_interp field for each new
5738         interpretation.
5739         (slsr_process_copy): Likewise.
5740         (dump_candidate): Dump first_interp field.
5741         (replace_mult_candidate): Process all interpretations, not just
5742         subsequent ones.
5743         (replace_rhs_if_not_dup): Likewise.
5744         (replace_one_candidate): Likewise.
5746 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
5748         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5749         Add new boolean.
5750         (aarch64_needs_frame_chain): New function.
5751         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5753 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
5755         PR target/84882
5756         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5757         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5758         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5759         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5760         as true for strict-align.
5761         (aarch64_can_inline_p): Perform checks even when callee has no
5762         attributes to check for strict alignment.
5763         * doc/extend.texi (AArch64 Function Attributes): Document
5764         no-strict-align.
5765         * doc/invoke.texi: (AArch64 Options): Likewise.
5767 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
5769         PR tree-optimization/85853
5770         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5771         the handling of the root of the node to...
5772         (vect_slp_analyze_node_operations_1): ...this new function,
5773         and run the whole thing with the child nodes' def types
5774         set according to their SLP node's def type.
5776 2018-05-23  Richard Biener  <rguenther@suse.de>
5778         PR middle-end/85874
5779         * tree-data-ref.c (create_runtime_alias_checks): Defer
5780         and ignore overflow warnings.
5782 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
5784         PR tree-optimization/85822
5785         * tree-vrp.c (is_masked_range_test): Fix handling of negative
5786         constants.
5788 2018-05-23  Richard Biener  <rguenther@suse.de>
5790         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5791         memset constants via native_interpret_expr.
5793 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
5795         PR target/85345
5796         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5797         attribute.
5798         (cgraph_node::create_alias): Likewise.
5799         (cgraph_node::get_availability): Check ifunc_resolver instead
5800         of looking up ifunc attribute.
5801         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5802         * varasm.c (do_assemble_alias): Likewise.
5803         (assemble_alias): Likewise.
5804         (default_binds_local_p_3): Likewise.
5805         * cgraph.h (cgraph_node): Add ifunc_resolver.
5806         (cgraph_node::only_called_directly_or_aliased_p): Return false
5807         for IFUNC resolver.
5808         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5809         attribute.
5810         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5811         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5812         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5813         instead of looking up ifunc attribute.
5815 2018-05-22  Luis Machado  <luis.machado@linaro.org>
5817         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5819 2018-05-22  Martin Sebor  <msebor@redhat.com>
5821         PR middle-end/85359
5822         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5823         only when expasion succeeds.
5824         (expand_builtin_strcmp): Same.
5825         (expand_builtin_strncmp): Same.
5827 2018-05-22  Martin Sebor  <msebor@redhat.com>
5829         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5831 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5832             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5834         * config/aarch64/aarch64-ldpstp.md: Replace uses of
5835         aarch64_mem_pair_operand with memory_operand and delete operand swapping
5836         code.
5837         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5838         Add check for legitimate_address.
5839         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
5840         (aarch64_swap_ldrstr_operands): New.
5841         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
5842         Define prototype.
5844 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5845             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5847         * config/aarch64/aarch64.md: New patterns to generate stp
5848         and ldp.
5849         (store_pair_sw, store_pair_dw): New patterns to generate stp for
5850         single words and double words.
5851         (load_pair_sw, load_pair_dw): Likewise.
5852         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
5853         Delete.
5854         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
5855         Delete.
5856         * config/aarch64/aarch64-ldpstp.md: Modify peephole
5857         for different mode ldpstp and add peephole for merged zero stores.
5858         Likewise for loads.
5859         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5860         Add size check.
5861         (aarch64_gen_store_pair): Rename calls to match new patterns.
5862         (aarch64_gen_load_pair): Rename calls to match new patterns.
5863         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5864         (load_pair<DREG:mode><DREG2:mode>): ... This.
5865         (store_pair<mode>): Rename to...
5866         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5867         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5868         New mode iterators.
5869         (V_INT_EQUIV): Handle SImode.
5870         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5871         New predicate.
5873 2018-05-22  Martin Sebor  <msebor@redhat.com>
5875         PR c/85623
5876         * calls.c (maybe_warn_nonstring_arg): Use string length to set
5877         or ajust the presumed bound on an operation to avoid unnecessary
5878         warnings.
5880 2018-05-22  Martin Sebor  <msebor@redhat.com>
5882         PR tree-optimization/85826
5883         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5884         assuming that a DECL necesarily has a constant size.
5886 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
5888         PR middle-end/85862
5889         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5891 2018-05-22  Richard Biener  <rguenther@suse.de>
5893         PR tree-optimization/85834
5894         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5895         non-constant and non-zero memset arguments.
5897 2018-05-22  Martin Liska  <mliska@suse.cz>
5899         PR ipa/85607
5900         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5902 2018-05-22  Richard Biener  <rguenther@suse.de>
5904         PR tree-optimization/85863
5905         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5906         comparisons when vectype is specified.
5907         (vectorizable_condition): Do not specify vectype for
5908         vect_is_simple_cond when SLP vectorizing.
5910 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
5912         PR target/85657
5913         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5914         define __ibm128 as long double.
5915         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5916         as a distinct type when IEEE 128-bit support is enabled.
5917         (init_float128_ieee): Fix up conversions between IFmode and IEEE
5918         128-bit types to use the correct functions.
5919         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5920         convert between 128-bit floating point types that have different
5921         modes but the same representation, instead of using gen_lowpart to
5922         makean alias.
5923         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5924         KFmode.
5925         (IFKF_reg): New attributes to give the register constraints for
5926         IFmode and KFmode.
5927         (extend<mode>tf2_internal): New insns to mark an explicit
5928         conversion between 128-bit floating point types that have a
5929         different mode but share the same representation.
5931 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
5933         PR tree-optimization/85814
5934         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5935         a null return from get_strinfo when unsharing the next
5936         strinfo in the chain.
5938 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5940         PR gcc/84923
5941         * varasm.c (weak_finish): Clean up weak_decls.
5943 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5945         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5946         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5947         UNSPEC_UADALP values.
5948         * config/aarch64/iterators.md (ABAL): New int iterator.
5949         (ABDL2): Likewise.
5950         (ADALP): Likewise.
5951         (sur): Add mappings for the above.
5952         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5953         New define_insn.
5954         (aarch64_<sur>abal<mode>_4): Likewise.
5955         (aarch64_<sur>adalp<mode>_3): Likewise.
5956         (<sur>sadv16qi): New define_expand.
5958 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
5960         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5961         (*movdf_internal): Ditto.
5962         (*rcpsf2_sse): Ditto.
5963         (*rsqrtsf2_sse): Ditto.
5964         (*sqrt<mode>2_sse): Ditto.
5966 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
5968         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5969         eor3q<mode>4.
5970         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5971         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5972         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5973         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5974         vbcaxq_s64): New.
5975         * config/aarch64/arm_neon.h: Likewise.
5976         * config/aarch64/iterators.md (VQ_I): New.
5978 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
5980         * config.gcc: Add arc/t-multilib-linux to tmake_file for
5981         arc*-*-linux*.
5982         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5983         MULTILIB_DIRNAMES
5985 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5987         * config/nds32/constraints.md (S): New constraint.
5988         * config/nds32/nds32.md (call_internal): Use constraint S.
5989         (call_value_internal): Likewise.
5990         (sibcall_internal): Likewise.
5991         (sibcall_value_internal): Likewise.
5993 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5994             Chung-Ju Wu  <jasonwucj@gmail.com>
5996         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5997         into consideration.
5999 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
6000             Chung-Ju Wu  <jasonwucj@gmail.com>
6002         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6003         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6004         (nds32_rtx_costs_impl): Simplify.
6005         (nds32_address_cost_impl): Simplify.
6006         (nds32_init_rtx_costs): New function.
6007         (nds32_rtx_costs_speed_prefer): Likewise.
6008         (nds32_rtx_costs_size_prefer): Likewise.
6009         (nds32_address_cost_speed_prefer): Likewise.
6010         (nds32_address_cost_speed_fwprop): Likewise.
6011         (nds32_address_cost_size_prefer): Likewise.
6012         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6013         * config/nds32/nds32.c (nds32_option_override): Use
6014         nds32_init_rtx_costs function.
6016 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
6018         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6019         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6020         (TARGET_PIPELINE_N8): Likewise.
6021         (TARGET_PIPELINE_N10): Likewise.
6022         (TARGET_PIPELINE_N13): Likewise.
6023         (TARGET_PIPELINE_GRAYWOLF): Likewise.
6025 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
6027         * config/nds32/nds32-fpu.md: Update copyright year.
6029 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6031         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6033 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6035         * config/nds32/nds32.c
6036         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6037         * config/nds32/nds32.opt (minline-asm-r15): New option.
6039 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6041         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6042         MASK_HW_ABS.
6043         * config/nds32/nds32.md (abssi2): New pattern.
6045 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
6047         * config/i386/i386.md (rex64namesuffix): New mode attribute.
6048         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6049         Merge insn pattern from sse_cvtsi2ss<round_name> and
6050         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6051         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6052         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6053         using SWI48 mode iterator.
6054         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6055         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6056         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6057         pattern from sse_cvttss2si<round_saeonly_name>
6058         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6059         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6060         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6061         using SWI48 mode iterator.
6062         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6063         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6064         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6065         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6066         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6067         using SWI48 mode iterator.
6068         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6069         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6070         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6071         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6072         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6073         SWI48 mode iterator.
6074         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6075         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6076         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6077         pattern from sse_cvttsd2si<round_saeonly_name>
6078         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6080 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6082         * config/nds32/nds32-md-auxiliary.c
6083         (nds32_valid_smw_lwm_base_p): Refine.
6084         (nds32_output_smw_single_word): Refine.
6085         (nds32_output_smw_double_word): New.
6086         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6088 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6090         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6091         (nds32_output_stack_pop): Refine.
6092         (nds32_expand_unaligned_load): Refine.
6093         (nds32_expand_unaligned_store): Refine.
6095 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6096             Chung-Ju Wu  <jasonwucj@gmail.com>
6098         * config/nds32/constants.md: Add TP_REGNUM constant.
6099         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6100         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6101         UNSPEC_ADD32.
6102         * config/nds32/nds32-doubleword.md: Consider flag_pic.
6103         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6104         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6105         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6106         and PIC code generation.
6107         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6108         code generation.
6109         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6110         optimization.
6111         * config/nds32/nds32.md: Support TLS and PIC.
6112         * config/nds32/nds32.c: Support TLS and PIC.
6113         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6114         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6115         predicate.
6117 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6119         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6120         mode with E_ prefix.
6122 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6123             Chung-Ju Wu  <jasonwucj@gmail.com>
6125         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6126         * config/nds32/nds32-md-auxiliary.c
6127         (symbolic_reference_mentioned_p): New.
6128         (nds32_legitimize_ict_address): New.
6129         (nds32_expand_ict_move): New.
6130         (nds32_indirect_call_referenced_p): New.
6131         (nds32_symbol_binds_local_p): Delete.
6132         (nds32_long_call_p): Modify.
6133         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6134         * config/nds32/nds32-protos.h
6135         (symbolic_reference_mentioned_p): Declare.
6136         (nds32_legitimize_ict_address): Declare.
6137         (nds32_expand_ict_move): Declare.
6138         (nds32_indirect_call_referenced_p): Declare.
6139         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6140         (nds32_relax_group): Use nds32_ict_const_p as condition.
6141         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6142         (nds32_asm_file_start): Output ict_model directive in asm code.
6143         (nds32_legitimate_address_p): Consider indirect call.
6144         (nds32_print_operand): Consider indirect call.
6145         (nds32_print_operand_address): Consider indirect call.
6146         (nds32_insert_attributes): Handle "indirect_call" attribute.
6147         (TARGET_LEGITIMATE_ADDRESS_P): Define.
6148         (TARGET_LEGITIMATE_CONSTANT_P): Define.
6149         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6150         (TARGET_DELEGITIMIZE_ADDRESS): Define.
6151         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6152         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6153         (TARGET_ICT_MODEL_SMALL): Define.
6154         (TARGET_ICT_MODEL_LARGE): Define.
6155         * config/nds32/nds32.md (movsi): Consider ict model.
6156         (call, call_value): Consider ict model.
6157         (sibcall, sibcall_value): Consider ict model.
6158         * config/nds32/nds32.opt (mict-model): New option.
6159         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6160         model.
6162 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
6163             Monk Chiang  <sh.chiang04@gmail.com>
6164             Jim Wilson <jimw@sifive.com>
6166         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6167         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
6168         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6169         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6170         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
6171         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6172         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6173         compute save_libcall_adjustment properly.
6174         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6175         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6176         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6177         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6178         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6179         (ABI_SPEC): Handle mabi=ilp32e.
6180         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6181         (RVE): Add RVE mask.
6182         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6183         <-march>: Add rv32e as an example.
6185 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
6187         PR c++/82899
6188         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6189         (intra_create_variable_infos): Handle C++ constructors.
6191 2018-05-18  Martin Liska  <mliska@suse.cz>
6193         * passes.def: Remove a redundant pass.
6195 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
6197         PR bootstrap/85838
6198         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6200 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6202         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6203         (ARMv4): Update.
6204         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6205         (ARMv6m): Update.
6206         (armv2, armv2a, armv3, armv3m): Delete architectures.
6207         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6208         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6209         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6210         Delete cpus.
6211         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6212         (*mulsidi3adddi): Likewise.
6213         (mulsidi3): Likewise.
6214         (*mulsidi3_nov6): Likewise.
6215         (umulsidi3): Likewise.
6216         (umulsidi3_nov6): Likewise.
6217         (umaddsidi4): Likewise.
6218         (*umulsidi3adddi): Likewise.
6219         (smulsi3_highpart): Likewise.
6220         (*smulsi3_highpart_nov6): Likewise.
6221         (umulsi3_highpart): Likewise.
6222         (*umulsi3_highpart_nov6): Likewise.
6223         * config/arm/arm.h (arm_arch3m): Delete.
6224         * config/arm/arm.c (arm_arch3m): Delete.
6225         (arm_option_override_internal): Update armv3-related comment.
6226         (arm_configure_build_target): Delete use of isa_bit_mode32.
6227         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6228         (arm_rtx_costs_internal): Delete check of arm_arch3m.
6229         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6230         (mulsa3): Likewise.
6231         (mulusa3): Likewise.
6232         * config/arm/arm-protos.h (arm_arch3m): Delete.
6233         * config/arm/arm-tables.opt: Regenerate.
6234         * config/arm/arm-tune.md: Likewise.
6235         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6236         deleted architectures.
6238 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6240         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6241         (armv5t, armv5te): New features.
6242         (ARMv5, ARMv5e): Delete fgroups.
6243         (ARMv5t, ARMv5te): Adjust for above changes.
6244         (ARMv6m): Likewise.
6245         (armv5, armv5e): Delete arches.
6246         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6247         arm_arch5.
6248         (*call_reg_arm): Likewise.
6249         (*call_value_reg_armv5): Likewise.
6250         (*call_value_reg_arm): Likewise.
6251         (*call_symbol): Likewise.
6252         (*call_value_symbol): Likewise.
6253         (*sibcall_insn): Likewise.
6254         (*sibcall_value_insn): Likewise.
6255         (clzsi2): Likewise.
6256         (prefetch): Likewise.
6257         (define_split and define_peephole2 dependent on arm_arch5):
6258         Likewise.
6259         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6260         arm_arch5e.
6261         (TARGET_ARM_QBIT): Likewise.
6262         (TARGET_DSP_MULTIPLY): Likewise.
6263         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6264         (arm_arch5, arm_arch5e): Delete.
6265         (arm_arch5t, arm_arch5te): Declare.
6266         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6267         (arm_arch5t): Declare.
6268         (arm_option_reconfigure_globals): Update for the above.
6269         (arm_options_perform_arch_sanity_checks): Update comment, replace
6270         use of arm_arch5 with arm_arch5t.
6271         (use_return_insn): Likewise.
6272         (arm_emit_call_insn): Likewise.
6273         (output_return_instruction): Likewise.
6274         (arm_final_prescan_insn): Likewise.
6275         (arm_coproc_builtin_available): Likewise.
6276         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6277         arm_arch5e with arm_arch5t and arm_arch5te.
6278         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6279         (arm_arch5t, arm_arch5te): Declare.
6280         * config/arm/arm-tables.opt: Regenerate.
6281         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6282         * config/arm/t-multilib: Likewise.
6283         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6284         instead of arm_arch5.
6285         (*call_reg_thumb1): Likewise.
6286         (*call_value_reg_thumb1_v5): Likewise.
6287         (*call_value_reg_thumb1): Likewise.
6288         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6289         unreachable path.
6290         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6292 2018-05-18  Martin Liska  <mliska@suse.cz>
6294         PR gcov-profile/84846
6295         * doc/gcov.texi: Document -t option of gcov tool.
6297 2018-05-18  Martin Liska  <mliska@suse.cz>
6299         PR gcov-profile/84846
6300         * gcov.c (print_usage): Add new -t option.
6301         (process_args): Handle the option.
6302         (generate_results): Use stdout as output when requested by
6303         the option.
6305 2018-05-18  Martin Liska  <mliska@suse.cz>
6307         PR gcov-profile/84846
6308         * coverage.c (coverage_init): Write PWD to .gcno file.
6309         * doc/gcov.texi: Document how working directory is printed.
6310         * gcov-dump.c (dump_gcov_file): Print PWD.
6311         * gcov.c (output_intermediate_file): Likewise.
6312         (read_graph_file): Read PWD string.
6313         (output_lines): Print PWD.
6315 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6317         PR middle-end/85817
6318         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6319         for retval and return false if all args to phi are zero.
6321 2018-05-18  Richard Biener  <rguenther@suse.de>
6323         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6324         method.
6325         (evrp_dom_walker::before_dom_children): Call it.
6327 2018-05-18  Richard Biener  <rguenther@suse.de>
6329         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6330         results when processing array refs with variable index.
6332 2018-05-18  Toon Moene  <toon@moene.org>
6334         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6335         directly after that of -floop-interchange. Indicate that both
6336         options are enabled by default when specifying -O3.
6338 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6340         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6341         iterator.  Delete separate integer-mode vec_set<mode> expander.
6342         (aarch64_simd_vec_setv2di): Delete.
6343         (vec_setv2di): Delete.
6344         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6345         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
6346         the "w, r" alternative.
6348 2018-05-18  Martin Liska  <mliska@suse.cz>
6350         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6351         * tree-pass.h (make_pass_lower_switch_O0): New function.
6352         * tree-switch-conversion.c (node_has_low_bound): Remove.
6353         (node_has_high_bound): Likewise.
6354         (node_is_bounded): Likewise.
6355         (class pass_lower_switch): Make it a template type and create
6356         two instances.
6357         (pass_lower_switch::execute): Add template argument.
6358         (make_pass_lower_switch): New function.
6359         (make_pass_lower_switch_O0): New function.
6360         (do_jump_if_equal): Remove.
6361         (emit_case_nodes): Simplify to just handle all 3 cases and leave
6362         all the hard work to tree optimization passes.
6364 2018-05-18  Martin Liska  <mliska@suse.cz>
6366         * dbgcnt.c (limit_low): Renamed from limit.
6367         (limit_high): New variable.
6368         (dbg_cnt_is_enabled): Check for upper limit.
6369         (dbg_cnt): Adjust dumping.
6370         (dbg_cnt_set_limit_by_index): Add new argument for high
6371         value.
6372         (dbg_cnt_set_limit_by_name): Likewise.
6373         (dbg_cnt_process_single_pair): Parse new format.
6374         (dbg_cnt_process_opt): Use strtok.
6375         (dbg_cnt_list_all_counters): Remove 'value' and add
6376         'limit_high'.
6377         * doc/invoke.texi: Document changes.
6379 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
6381         * doc/sourcebuild.texi (scalar_all_fma): Document.
6382         * tree.def (FMA_EXPR): Delete.
6383         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6384         * internal-fn.c (ternary_direct): New macro.
6385         (expand_ternary_optab_fn): Likewise.
6386         (direct_ternary_optab_supported_p): Likewise.
6387         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6388         * builtins.c (fold_builtin_fma): Delete.
6389         (fold_builtin_3): Don't call it.
6390         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6391         * expr.c (expand_expr_real_2): Likewise.
6392         * fold-const.c (operand_equal_p): Likewise.
6393         (fold_ternary_loc): Likewise.
6394         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6395         * gimple.c (DEFTREECODE): Likewise.
6396         * gimplify.c (gimplify_expr): Likewise.
6397         * optabs-tree.c (optab_for_tree_code): Likewise.
6398         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6399         * tree-eh.c (operation_could_trap_p): Likewise.
6400         (stmt_could_throw_1_p): Likewise.
6401         * tree-inline.c (estimate_operator_cost): Likewise.
6402         * tree-pretty-print.c (dump_generic_node): Likewise.
6403         (op_code_prio): Likewise.
6404         * tree-ssa-loop-im.c (stmt_cost): Likewise.
6405         * tree-ssa-operands.c (get_expr_operands): Likewise.
6406         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6407         * fold-const-call.h (fold_fma): Delete.
6408         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6409         CFN_FNMA and CFN_FNMS.
6410         (fold_fma): Delete.
6411         * genmatch.c (combined_fn): New enum.
6412         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6413         (commutative_op): New function.
6414         (commutate): Use it.  Handle more than 2 operands.
6415         (dt_operand::gen_gimple_expr): Use commutative_op.
6416         (parser::parse_expr): Allow :c to be used with non-binary
6417         operators if the commutative operand is known.
6418         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6419         CFN_FMS, CFN_FNMA and CFN_FNMS.
6420         (backprop::process_assign_use): Remove FMA_EXPR handling.
6421         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6422         (gen_hsa_fma): New function.
6423         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6424         IFN_FNMA and IFN_FNMS.
6425         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6426         * gimple-fold.h (follow_all_ssa_edges): Declare.
6427         * gimple-fold.c (follow_all_ssa_edges): New function.
6428         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6429         gimple_build interface and use follow_all_ssa_edges to fold the result.
6430         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6431         instead of checking for optabs directly.
6432         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6433         rather than FMA_EXPRs.
6434         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6435         call to IFN_FMA instead of an FMA_EXPR.
6437 2018-05-17  Jim Wilson  <jimw@sifive.com>
6439         * expr.c (do_tablejump): When converting index to Pmode, if we have a
6440         sign extended promoted subreg, and the range does not have the sign bit
6441         set, then do a sign extend.
6443         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6444         test, check for sign extended subreg and/or constant operands, and
6445         do a sign extend in that case.
6447 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
6449         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6450         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6451         Add untyped.
6452         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6453         Change logics_shift_reg to logics_shift_imm.
6454         (thunderx2t99_fp_loadpair_basic): Delete.
6455         (thunderx2t99_fp_storepair_basic): Delete.
6456         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6457         (thunderx2t99_asimd_polynomial): Delete.
6458         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6459         and neon_fp_mul_d_scalar_q.
6460         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6461         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6462         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6463         (thunderx2t99_asimd_lut): Add missing tbl types.
6464         (thunderx2t99_asimd_ext): Delete.
6465         (thunderx2t99_asimd_load1_1_mult): Delete.
6466         (thunderx2t99_asimd_load1_2_mult): Delete.
6467         (thunderx2t99_asimd_load1_ldp): New.
6468         (thunderx2t99_asimd_load1): New.
6469         (thunderx2t99_asimd_load2): Add missing *load2* types.
6470         (thunderx2t99_asimd_load3): New.
6471         (thunderx2t99_asimd_load4): New.
6472         (thunderx2t99_asimd_store1_1_mult): Delete.
6473         (thunderx2t99_asimd_store1_2_mult): Delete.
6474         (thunderx2t99_asimd_store2_mult): Delete.
6475         (thunderx2t99_asimd_store2_onelane): Delete.
6476         (thunderx2t99_asimd_store_stp): New.
6477         (thunderx2t99_asimd_store1): New.
6478         (thunderx2t99_asimd_store2): New.
6479         (thunderx2t99_asimd_store3): New.
6480         (thunderx2t99_asimd_store4): New.
6482 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
6484         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6485         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
6487 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
6488             Segher Boessenkool  <segher@kernel.crashing.org>
6490         PR target/85698
6491         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6492         operand.
6494 2018-05-17  Richard Biener  <rguenther@suse.de>
6496         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6497         for pruning loop and prune defs feeding only already visited PHIs.
6499 2018-05-17  Richard Biener  <rguenther@suse.de>
6501         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6503 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
6504             Richard Biener  <rguenther@suse.de>
6506         PR tree-optimization/85793
6507         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6508         for VMAT_ELEMENTWISE.
6510 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6512         * internal-fn.h (lookup_internal_fn): Declare
6513         * internal-fn.c (lookup_internal_fn): New function.
6514         * gimple.c (gimple_build_call_from_tree): Handle calls to
6515         internal functions.
6516         * gimple-pretty-print.c (dump_gimple_call): Print "." before
6517         internal function names.
6518         * tree-pretty-print.c (dump_generic_node): Likewise.
6519         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6521 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6523         * gimple-fold.h (gimple_build): Make the function forms take
6524         combined_fn rather than built_in_function.
6525         (gimple_simplify): Likewise.
6526         * gimple-match-head.c (gimple_simplify): Likewise.
6527         * gimple-fold.c (gimple_build): Likewise.
6528         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6529         rather than gimple_build_call_internal.
6530         (get_initial_defs_for_reduction): Likewise.
6531         (vect_create_epilog_for_reduction): Likewise.
6532         (vectorizable_live_operation): Likewise.
6534 2018-05-17  Martin Liska  <mliska@suse.cz>
6536         * gimple-ssa-sprintf.c (format_directive): Do not use
6537         space in between 'G_' and '('.
6539 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
6541         PR target/85323
6542         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6543         even if the mask is not all ones.
6545         PR target/85323
6546         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6547         vector.
6548         (ix86_gimple_fold_builtin): Likewise.
6550         PR target/85323
6551         * config/i386/i386.c: Include tree-vector-builder.h.
6552         (ix86_vector_shift_count): New function.
6553         (ix86_fold_builtin): Fold shift builtins by scalar count.
6554         (ix86_gimple_fold_builtin): Likewise.
6556         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6557         _mm512_setzero): New intrinsics.
6559 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
6560             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6562         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6563         code generation for cases where splatting a value is not useful.
6564         * simplify-rtx.c (simplify_ternary_operation): Simplify
6565         vec_merge across a vec_duplicate and a paradoxical subreg forming
6566         a vector mode to a vec_concat.
6568 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
6570         * config.gcc: Support "goldmont-plus".
6571         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6572         "goldmont-plus".
6573         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6574         PROCESSOR_GOLDMONT_PLUS.
6575         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6576         (processor_target_table): Add "goldmont-plus".
6577         (PTA_GOLDMONT_PLUS): Define.
6578         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6579         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6580         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6581         (fold_builtin_cpu): Add "goldmont-plus".
6582         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6583         (ix86_option_override_internal): Add "goldmont-plus".
6584         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6585         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6586         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6587         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6589 2018-05-17  Richard Biener  <rguenther@suse.de>
6591         PR tree-optimization/85757
6592         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6593         remove defs that only feed that PHI from further processing.
6595 2018-05-16  Jim Wilson  <jimw@sifive.com>
6597         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6598         asterisk to name.
6599         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6601 2018-05-16  Mark Wielaard  <mark@klomp.org>
6603         * dwarf2out.c (count_index_strings): New function.
6604         (output_indirect_strings): Call count_index_strings and generate
6605         header for dwarf_version >= 5.
6607 2018-05-16  Mark Wielaard  <mark@klomp.org>
6609         * dwarf2out.c (dwarf_FORM): New function.
6610         (set_indirect_string): Use dwarf_FORM.
6611         (reset_indirect_string): Likewise.
6612         (size_of_die): Likewise.
6613         (value_format): Likewise.
6614         (output_die): Likewise.
6615         (add_skeleton_AT_string): Likewise.
6616         (output_macinfo_op): Likewise.
6617         (index_string): Likewise.
6618         (output_index_string_offset): Likewise.
6619         (output_index_string): Likewise.
6620         (count_index_strings): Likewise.
6622 2018-05-16  Carl Love  <cel@us.ibm.com>
6624         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6625         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6627 2018-05-16  Martin Jambor  <mjambor@suse.cz>
6629         * ipa-prop.c (ipa_free_all_edge_args): Remove.
6630         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6632 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
6634         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6635         (fnma<mode>4): Likewise.
6636         (fms<mode>4): Likewise.
6637         (fnms<mode>4): Likewise.
6638         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6639         (aarch64_fnma<mode>4): Likewise.
6640         (aarch64_fms<mode>4): Likewise.
6641         (aarch64_fnms<mode>4): Likewise.
6642         (aarch64_fnmadd<mode>4): Likewise.
6644 2018-05-16  Jason Merrill  <jason@redhat.com>
6646         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
6648 2018-05-16  Richard Biener  <rguenther@suse.de>
6650         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6651         (dump_stmt_cost): Declare.
6652         (add_stmt_cost): Dump cost we add.
6653         (add_stmt_costs): New function.
6654         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6655         No longer exported.
6656         (vect_analyze_stmt): Adjust prototype.
6657         (vectorizable_condition): Likewise.
6658         (vectorizable_live_operation): Likewise.
6659         (vectorizable_reduction): Likewise.
6660         (vectorizable_induction): Likewise.
6661         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6662         cost vector to pass to vectorizable_ and record afterwards.
6663         (vect_model_reduction_cost): Take cost vector argument and adjust.
6664         (vect_model_induction_cost): Likewise.
6665         (vectorizable_reduction): Likewise.
6666         (vectorizable_induction): Likewise.
6667         (vectorizable_live_operation): Likewise.
6668         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6669         SLP_TREE_NUMBER_OF_VEC_STMTS.
6670         (vect_analyze_slp_cost_1): Remove.
6671         (vect_analyze_slp_cost): Likewise.
6672         (vect_slp_analyze_node_operations): Take visited args and
6673         a target cost vector.  Avoid processing already visited stmt sets.
6674         (vect_slp_analyze_operations): Use a local cost vector to gather
6675         costs and register those of non-discarded instances.
6676         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6677         (vect_schedule_slp_instance): Remove copying of
6678         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
6679         zero.
6680         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6681         adding cost.  Record cost entry location.
6682         (vect_prologue_cost_for_slp_op): Function to compute cost of
6683         a constant or invariant generated for SLP vect in the prologue,
6684         split out from vect_analyze_slp_cost_1.
6685         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
6686         (vect_model_promotion_demotion_cost): Likewise.
6687         (vect_model_store_cost): Likewise, make static.
6688         (vect_model_load_cost): Likewise.
6689         (vectorizable_bswap): Add cost vector arg and adjust.
6690         (vectorizable_call): Likewise.
6691         (vectorizable_simd_clone_call): Likewise.
6692         (vectorizable_conversion): Likewise.
6693         (vectorizable_assignment): Likewise.
6694         (vectorizable_shift): Likewise.
6695         (vectorizable_operation): Likewise.
6696         (vectorizable_store): Likewise.
6697         (vectorizable_load): Likewise.
6698         (vectorizable_condition): Likewise.
6699         (vectorizable_comparison): Likewise.
6700         (can_vectorize_live_stmts): Likewise.
6701         (vect_analyze_stmt): Likewise.
6702         (vect_transform_stmt): Adjust calls to vectorizable_*.
6703         * tree-vectorizer.c: Include gimple-pretty-print.h.
6704         (dump_stmt_cost): New function.
6706 2018-05-16  Richard Biener  <rguenther@suse.de>
6708         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6709         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6710         * tree-ssa-dse.c: Include tree-ssa-loop.h.
6711         (check_name): New callback.
6712         (dse_classify_store): Track cycles via a visited bitmap of PHI
6713         defs and simplify handling of in-loop and across loop dead stores
6714         and properly fail for loop-variant refs.  Handle byte-tracking with
6715         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6716         limiting the walk.
6718 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
6720         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6721         (vect_get_mask_type_for_stmt): Likewise.
6722         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6723         split out from...
6724         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
6725         to determine the statement's vector type and the vector type that
6726         should be used for calculating nunits.  Deal with cases in which
6727         the type has to be deferred.
6728         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6729         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6730         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6731         (vect_determine_vf_for_stmt): New functions, split out from...
6732         (vect_determine_vectorization_factor): ...here.
6733         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6734         (vect_get_mask_type_for_stmt): New functions, split out from
6735         vect_determine_vectorization_factor.
6737 2018-05-16  Richard Biener  <rguenther@suse.de>
6739         * tree-cfg.c (verify_gimple_assign_ternary): Properly
6740         verify the [VEC_]COND_EXPR embedded comparison.
6742 2018-05-15  Martin Sebor  <msebor@redhat.com>
6744         PR tree-optimization/85753
6745         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6746         RECORD_TYPE in addition to ARRAY_TYPE.
6748 2018-05-15  Martin Sebor  <msebor@redhat.com>
6750         PR middle-end/85643
6751         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6753 2018-05-15  Richard Biener  <rguenther@suse.de>
6755         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6756         add by_clobber_p one.  Change algorithm to collect all defs
6757         representing uses we need to walk and try reducing them to
6758         a single one before failing.
6759         (dse_dom_walker::dse_optimize_stmt): Adjust.
6761 2018-05-13  Mark Wielaard  <mark@klomp.org>
6763         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6764         (size_of_loc_descr): Likewise.
6765         (output_loc_operands): Likewise.
6766         (output_loc_operands_raw): Likewise.
6767         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6768         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6769         (hash_loc_operands): Likewise.
6770         (compare_loc_operands): Likewise.
6772 2018-05-14  Mark Wielaard  <mark@klomp.org>
6774         * dwarf2out.c (count_index_addrs): New function.
6775         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6777 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6779         PR tree-optimization/83648
6780         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6781         return value as malloc candidate.
6783 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6785         PR ipa/85734
6786         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6787         param as true in call to suggest_attribute.
6789 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
6791         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6792         -mreadonly-in-sdata.
6794 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6796         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6797         New pattern.
6798         (aarch64_crypto_aesd_fused): Likewise.
6800 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
6802         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6803         (movsi_aarch64): Likewise.
6804         (load_pairsi): Likewise.
6805         (load_pairdi): Likewise.
6806         (store_pairsi): Likewise.
6807         (store_pairdi): Likewise.
6808         (load_pairsf): Likewise.
6809         (load_pairdf): Likewise.
6810         (store_pairsf): Likewise.
6811         (store_pairdf): Likewise.
6812         (zero_extend): Likewise.
6813         (trunc): Swap alternatives.
6814         (fcvt_target): Add '?' to prefer w over r.
6816 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
6818         PR target/85756
6819         * config/i386/i386.md: Disallow non-commutative arithmetics in
6820         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6821         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
6822         in the peephole2 before it.
6824 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
6826         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6827         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6828         (ix86_handle_option): Handle -mcldemote.
6829         * config.gcc: New header.
6830         * config/i386/cldemoteintrin.h: New file.
6831         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6832         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6833         -mcldemote.
6834         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6835         OPTION_MASK_ISA_CLDEMOTE.
6836         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
6837         (ix86_valid_target_attribute_inner_p): Ditto.
6838         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
6839         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
6840         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
6841         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
6842         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
6843         (cldemote): New.
6844         * config/i386/i386.opt: Add -mcldemote.
6845         * config/i386/x86intrin.h: New header.
6846         * doc/invoke.texi: Add -mcldemote.
6848 2018-05-14  Richard Biener  <rguenther@suse.de>
6850         * doc/match-and-simplify.texi: Adjust :s documentation.
6852 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
6854         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
6855         intended memcpy size.
6856         (REORDER_45): Likewise.
6858 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
6860         * sort.cc: New file.
6861         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6862         * vec.c (qsort_chk): Use gcc_qsort.
6863         * Makefile.in (OBJS-libcommon): Add sort.o.
6864         (build/sort.o): New target.  Use it...
6865         (BUILD_RTL): ... here, and...
6866         (build/gencfn-macros): ... here, and...
6867         (build/genmatch): ... here.
6869 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6870             Chung-Ju Wu  <jasonwucj@gmail.com>
6872         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6873         * config/nds32/nds32-graywolf.md: New file.
6874         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6875         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6876         pipeline.
6877         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6878         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6879         * config/nds32/nds32.md (pipeline_model): Add graywolf.
6880         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6881         * config/nds32/pipelines.md: Include n15 settings.
6883 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6884             Chung-Ju Wu  <jasonwucj@gmail.com>
6886         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6887         * config/nds32/nds32-n13.md: New file.
6888         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6889         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6890         pipeline.
6891         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6892         * config/nds32/nds32.md (pipeline_model): Add n13.
6893         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6894         * config/nds32/pipelines.md: Include n13 settings.
6896 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6897             Chung-Ju Wu  <jasonwucj@gmail.com>
6899         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6900         * config/nds32/nds32-n10.md: New file.
6901         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6902         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6903         pipeline.
6904         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6905         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6906         * config/nds32/nds32.md (pipeline_model): Add n10.
6907         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6908         * config/nds32/pipelines.md: Include n10 settings.
6910 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
6911             Kito Cheng  <kito.cheng@gmail.com>
6912             Chung-Ju Wu  <jasonwucj@gmail.com>
6914         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6915         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6916         Add enum values for DSP extension instructions.
6917         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6918         New constraints.
6919         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6920         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6921         New code iterators.
6922         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6923         * config/nds32/nds32-dspext.md: New file for DSP implementation.
6924         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6925         * config/nds32/nds32-intrinsic.md: Likewise.
6926         * config/nds32/nds32_intrinsic.h: Likewise.
6927         * config/nds32/nds32-md-auxiliary.c: Likewise.
6928         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6929         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6930         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6931         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6932         * config/nds32/nds32-protos.h: New declarations for DSP extension.
6933         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6934         TYPE_DMAC in switch statement.
6935         * config/nds32/nds32.c: New checking and implementation for DSP
6936         extension instructions.
6937         * config/nds32/nds32.h: Likewise.
6938         * config/nds32/nds32.md: Likewise.
6939         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6940         * config/nds32/predicates.md: Implement new predicates for DSP
6941         extension.
6943 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
6945         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6946         Reformat alternatives and attributes so it is easier to identify
6947         which constraints/attributes go with which instruction.
6948         (mov<mode>_hardfloat32, FMOVE64): Likewise.
6949         (mov<mode>_softfloat32, FMOVE64): Likewise.
6950         (mov<mode>_hardfloat64, FMOVE64): Likewise.
6951         (mov<mode>_softfloat64, FMOVE64): Likewise.
6953 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6955         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6956         subsection.
6957         (Basic PowerPC Built-in Functions): The new name of the
6958         subsection previously known as "PowerPC Built-in Functions".
6959         (Basic PowerPC Built-in Functions Available on all Configurations):
6960         New subsubsection.
6961         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6962         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6963         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6964         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6966 2018-05-11  Martin Jambor  <mjambor@suse.cz>
6968         PR ipa/85655
6969         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6970         single const.
6972 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6974         PR target/85733
6975         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6977 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
6979         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6980         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6981         (ix86_handle_option): Handle -mwaitpkg.
6982         * config.gcc: New header.
6983         * config/i386/cpuid.h (bit_WAITPKG): New bit.
6984         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6985         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6986         function type.
6987         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6988         OPTION_MASK_ISA_WAITPKG.
6989         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6990         (ix86_option_override_internal): Add PTA_WAITPKG.
6991         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6992         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6993         IX86_BUILTIN_TPAUSE.
6994         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6995         __builtin_ia32_umwait and __builtin_ia32_tpause.
6996         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6997         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6998         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6999         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7000         UNSPECV_TPAUSE): New.
7001         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7002         * config/i386/i386.opt: Add -mwaitpkg.
7003         * config/i386/waitpkgintrin.h: New file.
7004         * config/i386/x86intrin.h: New header.
7005         * doc/invoke.texi: Add -mwaitpkg.
7007 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
7009         PR target/85606
7010         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7011         equivalent.
7012         (cortex-m0): Use armv6s-m isa.
7013         (cortex-m0plus): Likewise.
7014         (cortex-m1): Likewise.
7015         (cortex-m0.small-multiply): Likewise.
7016         (cortex-m0plus.small-multiply): Likewise.
7017         (cortex-m1.small-multiply): Likewise.
7019 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
7020             Jakub Jelinek  <jakub@redhat.com>
7022         PR tree-optimization/85692
7023         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7024         source permute as well.
7026 2018-05-11  Martin Liska  <mliska@suse.cz>
7028         PR sanitizer/85556
7029         * doc/extend.texi: Document LLVM style format for no_sanitize
7030         attribute.
7032 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
7034         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7035         mode_supports_vsx_dform_quad to mode_supports_dq_form.
7036         (mode_supports_vsx_dform_quad): Likewise.
7037         (mode_supports_vmx_dform): Move these functions to be next to the
7038         other mode_supports functions.
7039         (mode_supports_dq_form): Likewise.
7040         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7041         mode_supports_dq_form.
7042         (reg_offset_addressing_ok_p): Likewise.
7043         (offsettable_ok_by_alignment): Likewise.
7044         (rs6000_legitimate_offset_address_p): Likewise.
7045         (legitimate_lo_sum_address_p): Likewise.
7046         (rs6000_legitimize_address): Likewise.
7047         (rs6000_legitimize_reload_address): Likewise.
7048         (rs6000_secondary_reload_inner): Likewise.
7049         (rs6000_preferred_reload_class): Likewise.
7050         (rs6000_output_move_128bit): Likewise.
7052 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7054         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7055         Generate SImode target register for null target.
7056         <case IX86_BUILTIN_XGETBV>: Ditto.
7057         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7058         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7060 2018-05-10  Carl Love  <cel@us.ibm.com>
7062         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7063         dcbtt and dcbtstt if operands[2] is 0.
7065 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7067         PR target/85693
7068         * config/i386/sse.md (usadv64qi): New expander.
7070 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
7072         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7073         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7074         -maltivec=be support.
7075         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7076         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7077         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7078         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7079         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7080         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7081         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7082         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7083         altivec_vsumsws): Adjust.
7084         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7085         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7086         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7087         support.
7088         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7089         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7090         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7091         (altivec_lve<VI_char>x): Delete expand.
7092         (*altivec_lve<VI_char>x_internal): Rename to...
7093         (altivec_lve<VI_char>x): ... this.
7094         (altivec_lvxl_<mode>): Delete expand.
7095         (*altivec_lvxl_<mode>_internal): Rename to ...
7096         (altivec_lvxl_<mode>): ... this.
7097         (altivec_stvxl_<mode>): Delete expand.
7098         (*altivec_stvxl_<mode>_internal): Rename to ...
7099         (altivec_stvxl_<mode>): ... this.
7100         (altivec_stve<VI_char>x): Delete expand.
7101         (*altivec_stve<VI_char>x_internal): Rename to ...
7102         (altivec_stve<VI_char>x): ... this.
7103         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7104         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7105         reduc_plus_scal_<mode>): Adjust.
7106         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7107         comment.
7108         (rs6000_cpu_cpp_builtins): Adjust.
7109         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7110         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7111         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7112         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7113         -maltivec=be support.
7114         (rs6000_split_vec_extract_var): Adjust.
7115         (rs6000_split_v4si_init): Adjust.
7116         (swap_selector_for_mode): Delete.
7117         (altivec_expand_lvx_be, altivec_expand_stvx_be,
7118         altivec_expand_stvex_be): Delete.
7119         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7120         -maltivec=be support.
7121         (rs6000_gimple_fold_builtin): Ditto.
7122         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7123         Adjust.
7124         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7125         (TARGET_DIRECT_MOVE_64BIT): Adjust.
7126         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7127         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7128         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7129         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7130         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7131         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7132         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7133         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7134         anonymous split): Adjust.
7135         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7136         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7138 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
7140         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7141         when --with-gxx-include-dir is also specified.
7142         * configure: Regenerate.
7144 2018-05-09  Jim Wilson  <jimw@sifive.com>
7146         PR target/84797
7147         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7148         * config/riscv/t-withmultilib: New.
7149         * config/riscv/withmultilib.h: New.
7150         * doc/install.texi: Document RISC-V --with-multilib-list support.
7152 2018-05-09  Richard Biener  <rguenther@suse.de>
7154         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7155         vector.
7156         (vect_bb_vectorization_profitable_p): Adjust.  Compute
7157         actual scalar cost using the cost vector and the add_stmt_cost
7158         machinery.
7160 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7162         PR rtl-optimization/85645
7163         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7164         in the REG_CFA_REGISTER note for LR, don't leave it empty.
7166 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7168         PR rtl-optimization/85645
7169         * shrink-wrap.c (spread_components): Return a boolean saying if
7170         anything was changed.
7171         (try_shrink_wrapping_separate): Iterate spread_components until
7172         nothing changes anymore.
7174 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7176         PR rtl-optimization/85645
7177         * regrename.c (build_def_use): Also kill the chains that include the
7178         destination of a REG_CFA_REGISTER note.
7180 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7182         PR rtl-optimization/85645
7183         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7184         insn that has a REG_CFA_REGISTER note.
7186 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
7188         * cfgexpand.c (expand_clobber): New function.
7189         (expand_gimple_stmt_1): Use it.
7190         * tree-vect-stmts.c (vect_clobber_variable): New function,
7191         split out from...
7192         (vectorizable_simd_clone_call): ...here.
7193         (vectorizable_store): Emit a clobber either side of an
7194         IFN_STORE_LANES sequence.
7195         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7197 2018-05-09  Tom de Vries  <tom@codesourcery.com>
7199         PR target/85626
7200         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7201         (define_insn "trap_if_false"): Add exit after trap.
7203 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
7205         PR rtl-optimization/85638
7206         * bb-reorder.c: Include common/common-target.h.
7207         (create_forwarder_block): New function extracted from...
7208         (fix_up_crossing_landing_pad): ...here.  Rename into...
7209         (dw2_fix_up_crossing_landing_pad): ...this.
7210         (sjlj_fix_up_crossing_landing_pad): New function.
7211         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7212         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7213         from both partitions and exit the loop after one iteration.
7215 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7217         Revert:
7218         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7219         subsection.
7220         (Basic PowerPC Built-in Functions): The new name of the
7221         subsection previously known as "PowerPC Built-in Functions".
7222         (Basic PowerPC Built-in Functions Available on all Configurations):
7223         New subsubsection.
7224         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7225         subsubsection.
7226         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7227         subsubsection.
7228         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7229         subsubsection.
7230         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7231         subsubsection.
7233 2018-05-08  Jim Wilson  <jimw@sifive.com>
7235         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7236         (LD_EMUL_SUFFIX): New.
7237         (LINK_SPEC): Use it.
7239 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7241         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7242         subsection.
7243         (Basic PowerPC Built-in Functions): The new name of the
7244         subsection previously known as "PowerPC Built-in Functions".
7245         (Basic PowerPC Built-in Functions Available on all Configurations):
7246         New subsubsection.
7247         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7248         subsubsection.
7249         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7250         subsubsection.
7251         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7252         subsubsection.
7253         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7254         subsubsection.
7256 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7258         PR target/85683
7259         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7260         after cmpelim optimization.
7262 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
7264         * config.gcc: Support "goldmont".
7265         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7266         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7267         PROCESSOR_GOLDMONT.
7268         * config/i386/i386.c (m_GOLDMONT): Define.
7269         (processor_target_table): Add "goldmont".
7270         (PTA_GOLDMONT): Define.
7271         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7272         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7273         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7274         (fold_builtin_cpu): Add "goldmont".
7275         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7276         (ix86_option_override_internal): Add "goldmont".
7277         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7278         (processor_type): Add PROCESSOR_GOLDMONT.
7279         * config/i386/i386.md: Add CPU "glm".
7280         * config/i386/glm.md: New file.
7281         * config/i386/x86-tune.def: Add m_GOLDMONT.
7282         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7284 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7286         PR target/85572
7287         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7288         E_V4DImode.
7289         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7290         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
7291         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
7293         PR target/85317
7294         * config/i386/i386.c (ix86_fold_builtin): Handle
7295         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7297         PR target/85480
7298         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7299         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7301 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
7303         PR target/85658
7304         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7305         (check_arch): Likewise.
7306         (check_fpu): Return the result rather than printing it.
7307         (end arch): Fix operator precedence.
7308         (end cpu): Likewise.
7309         (END): Print the result from check_fpu.
7311 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7312             Alan Hayward  <alan.hayward@arm.com>
7313             David Sherwood  <david.sherwood@arm.com>
7315         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7316         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7317         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7318         (*fcmuo<mode>_and): New patterns.
7320 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7322         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7323         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7324         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7325         (cmp_op, sve_imm_con): New code attributes.
7326         (SVE_COND_INT_CMP, imm_con): Delete.
7327         (cmp_op): Remove above unspecs from int attribute.
7328         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7329         to...
7330         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
7331         comparison-specific unspecs.
7332         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7333         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7334         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7335         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7336         (*vec_fcm<cmp_op><mode>): Rename to...
7337         (*fcm<cmp_op><mode>): ...this and adjust likewise.
7338         (*vec_fcmuo<mode>): Rename to...
7339         (*fcmuo<mode>): ...this and adjust likewise.
7340         (*pred_fcm<cmp_op><mode>): New pattern.
7341         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7342         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7343         functions.
7344         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7345         and UNORDERED.
7346         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7347         (aarch64_emit_sve_predicated_cond): New function.
7348         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7349         (aarch64_emit_unspec_cond_or): Replace with...
7350         (aarch64_emit_sve_or_conds): ...this new function.  Use
7351         aarch64_emit_sve_ptrue_op for the individual comparisons and
7352         aarch64_emit_binop to OR them together.
7353         (aarch64_emit_inverted_unspec_cond): Replace with...
7354         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
7355         aarch64_emit_sve_ptrue_op for the comparison and
7356         aarch64_emit_unop to invert the result.
7357         (aarch64_expand_sve_vec_cmp_float): Update after the above
7358         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
7360 2018-05-07  Nathan Sidwell  <nathan@acm.org>
7362         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7363         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7364         (Backwards Compatibility): Likewise.
7366 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7368         PR bootstrap/85681
7369         Revert:
7370         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7372         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7373         <prefetch_dynamic_strides>: New const bool field.
7374         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7375         prefetch_dynamic_strides.
7376         (exynosm1_prefetch_tune): Likewise.
7377         (thunderxt88_prefetch_tune): Likewise.
7378         (thunderx_prefetch_tune): Likewise.
7379         (thunderx2t99_prefetch_tune): Likewise.
7380         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7381         to false.
7382         (aarch64_override_options_internal): Update to set
7383         PARAM_PREFETCH_DYNAMIC_STRIDES.
7384         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7385         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7386         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7387         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7388         prefetch-dynamic-strides setting.
7390         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7392         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7393         <minimum_stride>: New const int field.
7394         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7395         minimum_stride field.
7396         (exynosm1_prefetch_tune): Likewise.
7397         (thunderxt88_prefetch_tune): Likewise.
7398         (thunderx_prefetch_tune): Likewise.
7399         (thunderx2t99_prefetch_tune): Likewise.
7400         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7401         (aarch64_override_options_internal): Update to set
7402         PARAM_PREFETCH_MINIMUM_STRIDE.
7403         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7404         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7405         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7406         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7407         stride is constant and is below the minimum stride threshold.
7409 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7411         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7412         to 512.
7414 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7416         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7417         <prefetch_dynamic_strides>: New const bool field.
7418         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7419         prefetch_dynamic_strides.
7420         (exynosm1_prefetch_tune): Likewise.
7421         (thunderxt88_prefetch_tune): Likewise.
7422         (thunderx_prefetch_tune): Likewise.
7423         (thunderx2t99_prefetch_tune): Likewise.
7424         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7425         to false.
7426         (aarch64_override_options_internal): Update to set
7427         PARAM_PREFETCH_DYNAMIC_STRIDES.
7428         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7429         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7430         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7431         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7432         prefetch-dynamic-strides setting.
7434 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7436         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7437         <minimum_stride>: New const int field.
7438         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7439         minimum_stride field.
7440         (exynosm1_prefetch_tune): Likewise.
7441         (thunderxt88_prefetch_tune): Likewise.
7442         (thunderx_prefetch_tune): Likewise.
7443         (thunderx2t99_prefetch_tune): Likewise.
7444         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7445         (aarch64_override_options_internal): Update to set
7446         PARAM_PREFETCH_MINIMUM_STRIDE.
7447         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7448         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7449         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7450         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7451         stride is constant and is below the minimum stride threshold.
7453 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
7455         PR c++/85659
7456         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7457         the type is addressable.  Don't force op into register if it has
7458         BLKmode.
7460 2018-05-05  Roland McGrath  <mcgrathr@google.com>
7462         PR other/77609
7463         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7464         any section for which we don't know a specific type it should have,
7465         regardless of name.  Previously this was done only for the exact
7466         names ".init_array", ".fini_array", and ".preinit_array".
7467         (default_elf_asm_named_section): Add comment about
7468         relationship with default_section_type_flags and SECTION_NOTYPE.
7469         (get_section): Don't consider it a type conflict if one side has
7470         SECTION_NOTYPE and the other doesn't, as long as neither has the
7471         SECTION_BSS et al used in the default_section_type_flags logic.
7473 2018-05-05  Tom de Vries  <tom@codesourcery.com>
7475         PR target/85653
7476         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7477         (workaround_barsyncs): New function.
7478         (nvptx_reorg): Use workaround_barsyncs.
7479         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7480         (define_expand "nvptx_membar_cta"): New define_expand.
7481         (define_insn "*nvptx_membar_cta"): New insn.
7483 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
7485         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7486         To improve optimization opportunities.
7487         * builtin-types.def: The new needed builtin types for the above.
7489 2018-05-04  Richard Biener  <rguenther@suse.de>
7491         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7492         * gimple-ssa-store-merging.c
7493         (imm_store_chain_info::output_merged_store): Remove redundant create,
7494         release split_store vector contents on failure.
7495         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7496         scalar stmt vector on cache hit.
7498 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
7500         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7501         Xilinx FP support.
7502         * config.gcc (powerpc-xilinx-eabi*): Remove.
7503         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7504         support.
7505         (fusion_addis_mem_combo_load): Ditto.
7506         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7507         FP support.
7508         (rs6000_cpu_cpp_builtins): Ditto.
7509         * config/rs6000/rs6000-linux.c
7510         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7511         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7512         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7513         support.
7514         (rs6000_setup_reg_addr_masks): Ditto.
7515         (rs6000_init_hard_regno_mode_ok): Ditto.
7516         (rs6000_option_override_internal): Ditto.
7517         (legitimate_lo_sum_address_p): Ditto.
7518         (rs6000_legitimize_address): Ditto.
7519         (rs6000_legitimize_reload_address): Ditto.
7520         (rs6000_legitimate_address_p): Ditto.
7521         (abi_v4_pass_in_fpr): Ditto.
7522         (setup_incoming_varargs): Ditto.
7523         (rs6000_gimplify_va_arg): Ditto.
7524         (rs6000_split_multireg_move): Ditto.
7525         (rs6000_savres_strategy): Ditto.
7526         (rs6000_emit_prologue_components): Ditto.
7527         (rs6000_emit_epilogue_components): Ditto.
7528         (rs6000_emit_prologue): Ditto.
7529         (rs6000_emit_epilogue): Ditto.
7530         (rs6000_elf_file_end): Ditto.
7531         (rs6000_function_value): Ditto.
7532         (rs6000_libcall_value): Ditto.
7533         * config/rs6000/rs6000.h: Ditto.
7534         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7535         (TARGET_MINMAX): ... this.  New.
7536         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7537         * config/rs6000/rs6000.md: Remove Xilinx FP support.
7538         (*movsi_internal1_single): Delete.
7539         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7540         mfpu=, mxilinx-fpu): Delete.
7541         * config/rs6000/singlefp.h: Delete.
7542         * config/rs6000/sysv4.h: Remove Xilinx FP support.
7543         * config/rs6000/t-rs6000: Ditto.
7544         * config/rs6000/t-xilinx: Delete.
7545         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7546         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7547         (VStype_simple): Delete.
7548         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7549         * config/rs6000/xfpu.h: Delete.
7550         * config/rs6000/xfpu.md: Delete.
7551         * config/rs6000/xilinx.h: Delete.
7552         * config/rs6000/xilinx.opt: Delete.
7553         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7554         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7556 2018-05-04  Tom de Vries  <tom@codesourcery.com>
7558         PR libgomp/85639
7559         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7560         if ignore == 0.
7562 2018-05-04  Richard Biener  <rguenther@suse.de>
7564         PR middle-end/85627
7565         * tree-complex.c (update_complex_assignment): We are always in SSA form.
7566         (expand_complex_div_wide): Likewise.
7567         (expand_complex_operations_1): Likewise.
7568         (expand_complex_libcall): Preserve EH info of the original stmt.
7569         (tree_lower_complex): Handle removed blocks.
7570         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7571         on complex multiplication and division libcall builtins.
7573 2018-05-04  Richard Biener  <rguenther@suse.de>
7575         PR middle-end/85574
7576         * fold-const.c (negate_expr_p): Restrict negation of operand
7577         zero of a division to when we know that can happen without
7578         overflow.
7579         (fold_negate_expr_1): Likewise.
7581 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
7583         PR libstdc++/85466
7584         * real.h (real_nextafter): Declare.
7585         * real.c (real_nextafter): New function.
7586         * fold-const-call.c (fold_const_nextafter): New function.
7587         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7588         CASE_CFN_NEXTTOWARD.
7589         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7590         even when arg1_mode is different from arg0_mode.
7592 2018-05-03  Nathan Sidwell  <nathan@acm.org>
7594         * doc/extend.texi (Deprecated Features): Remove
7595         -ffriend-injection.
7596         (Backwards Compatibility): Likewise.
7597         * doc/invoke.texi (C++ Language Options): Likewise.
7598         (C++ Dialect Options): Likewise.
7600 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
7602         PR target/85530
7603         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7604         _mm512_mask_mullox_epi64): New intrinsics.
7606 2018-05-03  Tom de Vries  <tom@codesourcery.com>
7608         PR testsuite/85106
7609         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7610         dump files): Add offload-tree.
7612 2018-05-03  Richard Biener  <rguenther@suse.de>
7614         PR tree-optimization/85615
7615         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7616         to loops not nested in BBs loop father to avoid creating multi-entry
7617         loops.
7619 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7621         PR tree-optimization/70291
7622         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7623         arguments.  Change return type to tree.  Emit libcall as a new
7624         statement rather than replacing existing one when inplace_p is true.
7625         (expand_complex_multiplication_components): New function.
7626         (expand_complex_multiplication): Expand floating-point complex
7627         multiplication using the above.
7628         (expand_complex_division): Rename inner_type parameter to type.
7629         Update expand_complex_libcall call-site.
7630         (expand_complex_operations_1): Update expand_complex_multiplication
7631         and expand_complex_division call-sites.
7633 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7635         PR target/85582
7636         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7637         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7638         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7639         the highest significant bit of the shift count mask is clear.  In
7640         check whether and[sq]i3 is needed verify that all significant bits
7641         of the shift count other than the highest are set.
7643 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7645         PR libgomp/82428
7646         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7647         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7648         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7649         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7650         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7651         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7652         __builtin_goacc_parlevel_size.
7654 2018-05-02  Richard Biener  <rguenther@suse.de>
7656         PR tree-optimization/85597
7657         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7658         do not use split vect_get_vec_defs call but call vect_get_slp_defs
7659         directly.
7661 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7663         PR testsuite/85106
7664         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7665         dump files): Add ltrans-tree.
7667 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7669         PR testsuite/85106
7670         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7671         dump files): Add wpa-ipa.
7673 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
7675         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
7676         powerpc*-*-linux*paired* target.
7677         * config/rs6000/750cl.h: Delete.
7678         * config/rs6000/paired.h: Delete.
7679         * config/rs6000/paired.md: Delete.
7680         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7681         float support.
7682         * config/rs6000/rs6000-builtin.def: Remove paired float support.
7683         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7684         comment.  Remove paired float support.
7685         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7686         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7687         VECTOR_PAIRED.
7688         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7689         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7690         declarations.
7691         * config/rs6000/rs6000.c: Remove paired float support.
7692         (paired_expand_vector_init, paired_expand_vector_move,
7693         paired_emit_vector_compare, paired_emit_vector_cond_expr,
7694         (paired_expand_lv_builtin, paired_expand_stv_builtin,
7695         paired_expand_builtin, paired_expand_predicate_builtin,
7696         paired_init_builtins): Delete.
7697         * config/rs6000/rs6000.h: Remove paired float support.
7698         * config/rs6000/rs6000.md: Remove paired float support.
7699         (move_from_CR_ov_bit): Delete.
7700         * config/rs6000/rs6000.opt (mpaired): Delete.
7701         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7702         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7704 2018-05-02  Richard Biener  <rguenther@suse.de>
7706         PR middle-end/85567
7707         * gimplify.c (gimplify_save_expr): When in SSA form allow
7708         SAVE_EXPRs to compute to SSA vars.
7710 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7712         PR target/85582
7713         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7714         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7715         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7716         clobber operands[2], instead use a new pseudo.  Formatting fixes.
7718 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
7720         PR tree-optimization/85586
7721         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7722         exit early for statements in the same group if the accesses are
7723         not strided.
7725 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7727         PR lto/85451
7728         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7729         error message.
7731 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
7733         PR tree-optimization/85143
7734         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7736 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7738         PR lto/85451
7739         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7740         not found" error message.
7742 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7744         PR other/83786
7745         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7746         * vec.c (test_ordered_remove_if): New function.
7747         (vec_c_tests): Call test_ordered_remove_if.
7748         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7749         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7750         * tree-vect-patterns.c (vect_pattern_recog_1): Use
7751         VEC_ORDERED_REMOVE_IF.
7753 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7755         PR tree-optimization/82665
7756         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7757         pointer subtraction where arguments come from a memchr call.
7759 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
7761         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7762         --push-state --as-needed and --pop-state instead of --as-needed and
7763         --no-as-needed if ld supports it.
7764         * configure: Regenerated.
7766         PR web/85578
7767         * doc/install.texi2html: Replace _002d with - and _002a with * in
7768         generated html files using sed.
7770 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7772         PR c++/85523
7773         * gcc-rich-location.c (blank_line_before_p): New function.
7774         (use_new_line): New function.
7775         (gcc_rich_location::add_fixit_insert_formatted): New function.
7776         * gcc-rich-location.h
7777         (gcc_rich_location::add_fixit_insert_formatted): New function.
7779 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7781         * selftest.c (assert_streq): Rename "expected" and "actual" to
7782         "val1" and "val2".  Extend NULL-handling to cover both inputs
7783         symmetrically, while still requiring both to be non-NULL for a pass.
7784         * selftest.h (assert_streq): Rename "expected" and "actual" to
7785         "val1" and "val2".
7786         (ASSERT_EQ): Likewise.
7787         (ASSERT_EQ_AT): Likewise.
7788         (ASSERT_KNOWN_EQ): Likewise.
7789         (ASSERT_KNOWN_EQ_AT): Likewise.
7790         (ASSERT_NE): Likewise.
7791         (ASSERT_MAYBE_NE): Likewise.
7792         (ASSERT_MAYBE_NE_AT): Likewise.
7793         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
7794         the assertion to pass.
7795         (ASSERT_STREQ_AT): Likewise.
7797 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7799         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7800         interaction with -pie.
7802 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7804         * selftest.h: Fix alphabetization of per-source-file selftest
7805         declarations.
7807 2018-04-30  Jason Merrill  <jason@redhat.com>
7809         PR c++/61982 - dead stores to destroyed objects.
7810         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7811         of clobber.
7813 2018-04-30  Jason Merrill  <jason@redhat.com>
7815         * tree.c (build_clobber): New.
7816         * tree.h: Declare it.
7817         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7819 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7821         * diagnostic-show-locus.c (layout::layout): Update for
7822         location_get_source_line returning a char_span.
7823         (struct char_span): Move to input.h.
7824         (struct correction): Update for fields in char_span becoming
7825         private.
7826         (struct source_line): Update for location_get_source_line
7827         returning a char_span.
7828         (layout::print_line): Likewise.
7829         * edit-context.c (edited_file::print_content): Likewise.
7830         (edited_file::print_diff_hunk): Likewise.
7831         (edited_file::print_run_of_changed_lines): Likewise.
7832         (edited_file::get_num_lines): Likewise.
7833         (edited_line::edited_line): Likewise.
7834         * final.c (asm_show_source): Likewise.
7835         * input.c (location_get_source_line): Convert return type
7836         from const char * to char_span, losing the final "line_len"
7837         param.
7838         (dump_location_info): Update for the above.
7839         (get_substring_ranges_for_loc): Likewise.  Use a char_span
7840         when handling the literal within the line.
7841         (test_reading_source_line): Update for location_get_source_line
7842         returning a char_span.
7843         * input.h (class char_span): Move here from
7844         diagnostic-show-locus.c, converting from a struct to a class.
7845         Make data members private.
7846         (char_span::operator bool): New.
7847         (char_span::length): New.
7848         (char_span::get_buffer): New.
7849         (char_span::operator[]): New.
7850         (char_span::subspan): Make const.
7851         (char_span::xstrdup): New.
7852         (location_get_source_line): Convert return type from const char *
7853         to char_span, losing the final "line_size" param.
7855 2018-04-30  Jan Hubicka  <jh@suse.cz>
7857         * lto-wrapper.c (ltrans_priorities): New static var.
7858         (cmp_priority): New.
7859         (run_gcc): Read priorities and if doing parallel build order
7860         the Makefile by them.
7862 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7864         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7866 2018-04-30  Richard Biener  <rguenther@suse.de>
7868         * tree-cfg.c (verify_address): Remove base argument, add
7869         flag whether to check TREE_ADDRESSABLE and do that.
7870         (verify_expr): Remove.
7871         (verify_types_in_gimple_reference): Add pieces from verify_expr.
7872         (verify_gimple_assign_single): Likewise.
7873         (verify_gimple_switch): Likewise.
7874         (verify_expr_location_1): Dereference tp once.  Add (disabled)
7875         piece from verify_expr.
7876         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7878 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7880         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7882 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7884         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7885         (small_data_pattern): Likewise.
7886         (arc_rewrite_small_data): Likewise.
7887         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7888         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7889         (get_symbol_alignment): New function.
7890         (legitimate_small_data_address_p): Likewise.
7891         (legitimate_scaled_address): Update, call
7892         legitimate_small_data_address_p.
7893         (output_sdata): New static variable.
7894         (arc_print_operand): Update how we handle small data operands.
7895         (arc_print_operand_address): Likewise.
7896         (arc_legitimate_address_p): Update, use
7897         legitimate_small_data_address_p.
7898         (arc_rewrite_small_data_p): Remove.
7899         (arc_rewrite_small_data_1): Likewise.
7900         (arc_rewrite_small_data): Likewise.
7901         (small_data_pattern): Likewise.
7902         (compact_sda_memory_operand): Update to use
7903         legitimate_small_data_address_p and get_symbol_alignment.
7904         (prepare_move_operands): Don't rewite sdata pattern.
7905         (prepare_extend_operands): Remove.
7906         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7907         pattern.
7908         (zero_extendqisi2): Likewise.
7909         (zero_extendhisi2): Likewise.
7910         (extendqihi2): Likewise.
7911         (extendqisi2): Likewise.
7912         (extendhisi2): Likewise.
7913         (addsi3): Likewise.
7914         (subsi3): Likewise.
7915         (andsi3): Likewise.
7916         * config/arc/constraints.md (Usd): Change it to memory constraint.
7918 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7920         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7921         as source of std instructions.
7922         * config/arc/arc.md (movsi_insn): Update pattern predicate to
7923         allow 6-bit constants as source for store instructions.
7924         (movdi_insn): Update instruction pattern to allow 6-bit constants
7925         as source for store instructions.
7927 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7929         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7931 2018-04-30  Nathan Sidwell  <nathan@acm.org>
7932             Sandra Loosemore <sandra@codesourcery.com>
7934         * dumpfile.c (dump_open): Allow '-' for stdout.
7935         * doc/invoke.texi (Developer Options): Document dump filename
7936         determination early.  Document stdin/stdout selection.
7938 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
7940         Microblaze Target: PIC data text relative
7942         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7943         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7944         Add declaration.
7945         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7946         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7947         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7948         New addressing mode for data-text relative position indepenedent code.
7949         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7950         'ADDRESS_SYMBOLIC_TXT_REL'.
7951         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7952         (microblaze_legitimate_pic_operand): Exclude function calls from
7953         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7954         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7955         addresses cases.
7956         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7957         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7958         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7959         for 'address + offset'.
7960         (microblaze_expand_prologue): Add new function prologue call for
7961         'r20' assignation.
7962         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7963         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7964         table in case of TARGET_PIC_DATA_TEXT_REL.
7965         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7966         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7967         Add new macros 'UNSPEC_TEXT',
7968         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7969         + exclude function calls from 'UNSPEC_PLT' in case of data text
7970         relative mode.
7971         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7972         new target hook for generating address diff vector tables in case of
7973         flag_pic.
7974         * doc/tm.texi : Regenerate.
7975         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7976         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7977         of addr diff vector generation.
7978         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7979         target hook definition.
7980         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7981         Add default function for generate_pic_addr_diff_vec -> flag_pic.
7982         * doc/invoke.texi (Add new pic option): Add new microblaze pic
7983         option for data text relative.
7985 2018-04-30  Richard Biener  <rguenther@suse.de>
7987         * tree-chrec.h (evolution_function_is_constant_p): Remove
7988         redundant check.
7989         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7991 2018-04-30  Richard Biener  <rguenther@suse.de>
7993         PR bootstrap/85571
7994         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7996 2018-04-30  Richard Biener  <rguenther@suse.de>
7998         PR tree-optimization/28364
7999         PR tree-optimization/85275
8000         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8001         copying first exit test.
8003 2018-04-28  Mark Wielaard  <mark@klomp.org>
8005         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8006         dwarf_version >= 5.
8007         (dwarf_AT): Handle DW_AT_addr_base.
8008         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8010 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
8012         PR target/84431
8013         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8014         (*ashl<dwi>3_doubleword_mask_1): Ditto.
8015         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8016         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8018 2018-04-28  Richard Biener  <rguenther@suse.de>
8020         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8021         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8022         to reflect use.  Only add interesting stmts.
8024 2018-04-27  Martin Jambor  <mjambor@suse.cz>
8026         PR ipa/85549
8027         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8028         the jump function allows for passing through aggregate values.
8030 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
8032         * input.h (in_system_header_at): Convert from macro to inline
8033         function.
8034         (from_macro_expansion_at): Likewise.
8035         (from_macro_definition_at): Likewise.
8037 2018-04-27  Jeff Law  <law@redhat.com>
8039         * config.gcc: Mark tile* targets as deprecated/obsolete.
8041 2018-04-27  Richard Biener  <rguenther@suse.de>
8043         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8044         fix for ILP32.
8046 2018-04-27  Richard Biener  <rguenther@suse.de>
8048         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8050 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
8052         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8053         with Yd constraint. Set "preferred_for_speed" attribute from
8054         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8055         with Yd constraint.
8056         (*movdi_internal): Ditto.
8057         (movti_interunit splitters): Remove
8058         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8059         (movdi_interunit splitters): Ditto.
8060         * config/i386/constraints.md (Ye): Remove.
8061         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8063 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8065         PR target/85512
8066         * config/aarch64/constraints.md (Usg): Limit to 31.
8067         (Usj): Limit to 63.
8069 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
8071         PR tree-optimization/85529
8072         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8073         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8074         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8075         zero extension or masking of the MSB bit.
8076         (optimize_range_tests): Add FIRST_BB argument, pass it through
8077         to optimize_range_tests_var_bound.
8078         (maybe_optimize_range_tests, reassociate_bb): Adjust
8079         optimize_range_tests callers.
8081 2018-04-26  Richard Biener  <rguenther@suse.de>
8082             Jakub Jelinek  <jakub@redhat.com>
8084         * cgraph.h (symbol_table): Just declare debug method here.
8085         * symtab.c (symbol_table::debug): Define.
8087 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
8089         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8091 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
8093         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8094         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8095         (*movdi_internal): Substitute Yi and Yj constraint with x
8096         and Ym and Yn constraint with y constraint.  Update "isa"
8097         attribute and set "preferred_for_speed" attribute from
8098         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8099         (*movsi_internal): Ditto.
8100         (*movdf_internal): Ditto.
8101         (*movsf_internal): Ditto.
8102         (*zero_extendsidi2): Ditto.
8103         * config/i386/sse.md (vec_set<mode>_0): Ditto.
8104         (sse2_loadld): Ditto.
8105         (*vec_extract<ssevecmodelower>_0): Ditto.
8106         (*vec_extractv4si_0_zext_sse4): Ditto.
8107         (vec_concatv2di): Ditto.
8108         (*vec_dup<mode>): Ditto.
8109         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8110         * config/i386/constraints.md (Yi): Remove.
8111         (Yj): Remove.
8112         (Ym): Remove.
8113         (Yn): Remove.
8115 2018-04-26  Nathan Sidwell  <nathan@acm.org>
8117         * dumpfile.c (dump_open): New.
8118         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8119         (dump_finish): Detect stdio/stderr by value not name.
8121 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
8123         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8125 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8127         PR target/84952
8128         * config/nvptx/nvptx.c (verify_neutering_jumps)
8129         (verify_neutering_labels): New function
8130         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8132 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8134         PR target/84025
8135         * config/nvptx/nvptx.c (needs_neutering_p): New function.
8136         (nvptx_single): Use needs_neutering_p to skip over insns that do not
8137         need neutering.
8139 2018-04-26  Richard Biener <rguenther@suse.de>
8140             Tom de Vries  <tom@codesourcery.com>
8142         PR lto/85422
8143         * lto-streamer-out.c (output_function): Fixup loops if required to match
8144         discovery done in the reader.
8146 2018-04-26  Richard Biener  <rguenther@suse.de>
8148         PR tree-optimization/85116
8149         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8150         have a loop exit from the single latch predecessor.  Remove
8151         case of header with just condition.
8152         (ch_base::copy_headers): Exclude infinite loops from any
8153         processing.
8154         (pass_ch::execute): Record exits.
8156 2018-04-26  Richard Biener  <rguenther@suse.de>
8158         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8159         prologue cost vector and pass it to vect_get_load_cost.
8160         (vect_get_peeling_costs_all_drs): Likewise.
8161         (vect_peeling_hash_get_lowest_cost): Likewise.
8162         (vect_enhance_data_refs_alignment): Likewise.
8164 2018-04-26  Richard Biener  <rguenther@suse.de>
8166         PR middle-end/85450
8167         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8168         checking of integer<->pointer conversions.
8169         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8170         sign-/zero-extending pointer types.
8171         (expand_omp_for_static_chunk): Likewise.
8173 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
8174             Jean Lee  <xiaoyur347@gmail.com>
8176         * config/mips/mips.c (mips_asan_shadow_offset): New function.
8177         (TARGET_ASAN_SHADOW_OFFSET): Define.
8178         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8179         true for -fsanitize=address.
8181 2018-04-25  Mark Wielaard  <mark@klomp.org>
8183         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8184         shorter ones.
8186 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8188         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8189         than "alu", remove explicit "memory" and "imm_disp" attributes.
8190         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8192         PR middle-end/85414
8193         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8194         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8195         gen_lowpart_no_emit.
8197 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
8199         PR target/85473
8200         * config/i386/i386.c (ix86_expand_builtin): Change memory
8201         operand to XI, extend p0 to Pmode.
8202         * config/i386/i386.md: Change unspec volatile and operand
8203         1 mode to XI, change operand 0 mode to P.
8205 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8207         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8208         GET_MODE_MASK before any checking.
8209         (nds32_can_use_bset_p): Likewise.
8210         (nds32_can_use_btgl_p): Likewise.
8212 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8214         * config/nds32/nds32-doubleword.md: New define_split pattern for
8215         illegal register number.
8217 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8219         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8221 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8223         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8225 2018-04-25  Richard Biener  <rguenther@suse.de>
8227         * lto-streamer.h (LTO_major_version): Bump to 8.
8229 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8231         * BASE-VER: Set to 9.0.0.
8233 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
8235         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8236         in __abskf2 and __powikf2.
8238 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8240         PR target/85512
8241         * config/aarch64/constraints.md (Usg, Usj): New constraints.
8242         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8243         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8244         Use the above on operand 2.  Reindent.
8245         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8247 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8249         PR target/85485
8250         * common/config/i386/i386-common.c (ix86_handle_option): Don't
8251         handle OPT_mcet.
8252         * config/i386/i386.opt (mcet): Removed.
8253         * doc/install.texi: Remove -mcet documentation.
8254         * doc/invoke.texi: Likewise.
8256 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8258         PR target/85485
8259         * doc/install.texi: Remove -mcet from bootstrap-cet.
8261 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8263         PR target/85511
8264         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8265         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8266         if TARGET_64BIT.
8268         PR target/85503
8269         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8270         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8271         containing a CONST_VECTOR.
8273 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
8275         * doc/install.texi: Update newlib dependency for nvptx.
8277 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8279         PR target/85508
8280         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8281         instead of INTVAL when shifting x left.
8283 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
8285         PR tree-optimization/85478
8286         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8287         vect_grouped_store_supported for single element vectors.
8289 2018-04-24  Richard Biener  <rguenther@suse.de>
8291         PR target/85491
8292         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8293         load cost increase to the case of non-constant step.
8295 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8297         PR target/84828
8298         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8299         destination if any_malformed_asm.
8301 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8303         PR middle-end/85496
8304         * expr.c (store_field): In the bitfield case, if the value comes from
8305         a function call and is returned in registers by means of a PARALLEL,
8306         do not change the mode of the temporary unless BLKmode and VOIDmode.
8308 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
8310         PR rtl-optimization/85423
8311         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8312         dependencies to debug insns when the previous insn is non-debug.
8314 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8316         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8317         enums into a single definition.
8318         (fls): Fix predicates and printing.
8319         (seti): Likewise.
8321 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8323         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8324         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8325         and short u6 immediate.
8326         (check_if_valid_sleep_operand): Remove.
8327         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8329 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8331         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8332         flag_always_save_lp condition.
8333         * config/nds32/nds32.opt (malways-save-lp): New option.
8335 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8337         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8338         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8339         * config/nds32/nds32.h
8340         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8341         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8343 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8345         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8346         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8348 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8349             Chung-Ju Wu  <jasonwucj@gmail.com>
8351         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8352         Declare.
8353         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8354         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8356 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8358         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8360 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8362         * config/nds32/nds32-protos.h (nds32_data_alignment,
8363         nds32_local_alignment): Declare.
8364         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8365         nds32_local_alignment): New functions.
8366         (TARGET_CONSTANT_ALIGNMENT): Define.
8367         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8369 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8371         * config/nds32/nds32.c
8372         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8373         (TARGET_MODES_TIEABLE_P): Likewise.
8375 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8377         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8378         level Ofast and Og.
8380 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
8381             Chung-Ju Wu  <jasonwucj@gmail.com>
8383         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8384         for unaligned access.
8385         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8386         unaligned access.
8387         * config/nds32/nds32-intrinsic.md: Likewise.
8388         * config/nds32/nds32_intrinsic.h: Likewise.
8389         * config/nds32/nds32.h (nds32_builtins): Likewise.
8390         * config/nds32/nds32.opt (munaligned-access): New option.
8391         * config/nds32/nds32.c (nds32_asm_file_start): Display
8392         flag_unaligned_access status.
8394 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8396         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8397         -mno-relax is present.
8398         * config/riscv/linux.h (LINK_SPEC): Ditto.
8400 2018-04-20  Martin Sebor  <msebor@redhat.com>
8402         PR c/85365
8403         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8404         for null pointers.
8405         (gimple_fold_builtin_stxcpy_chk): Same.
8406         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8408 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
8410         PR target/85456
8411         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8412         __powikf2 when long double is IEEE 128-bit.
8414 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8416         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8417         step to make sure stack always aligned.
8419 2018-04-20  Carl Love  <cel@us.ibm.com>
8421         PR target/83402
8422         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8423         size check for arg0.
8425 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8426             Tom de Vries  <tom@codesourcery.com>
8428         PR target/85445
8429         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8430         Emit insns for calls too.
8431         (nvptx_find_par): Always look for worker-level predecessor insn.
8432         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
8433         calls.
8434         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8435         (nvptx_process_pars): Propagate frames for calls.
8437 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
8439         PR target/85469
8440         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8441         Removed.
8442         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8443         (ix86_handle_option): Don't handle OPT_mibt.
8444         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8445         __SHSTK__.
8446         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8447         has_ibt and ibt.
8448         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8449         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8450         (ix86_target_macros): Define __CET__ with flag_cf_protection
8451         for -fcf-protection.
8452         * config/i386/i386.c (isa2_opts): Remove -mibt.
8453         * config/i386/i386.h (TARGET_IBT): Removed.
8454         (TARGET_IBT_P): Likewise.
8455         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8456         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8457         * config/i386/i386.opt (mcet): Update help message.
8458         (mshstk): Likewise.
8459         (mibt): Removed.
8460         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
8461         -mcet as an alias for -mshstk.
8463 2018-04-20  Richard Biener <rguenther@suse.de>
8465         PR middle-end/85475
8466         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8467         complexity by forcing a single use of the multiply operand.
8469 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8471         ipa/85449
8472         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8473         recursion dependency to only apply to non-clones.
8475 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8477         ipa/85447
8478         * ipa-cp.c (create_specialized_node): Check that clones of
8479         self-recursive edges exist during IPA-CP.
8481 2018-04-19  Toon Moene  <toon@moene.org>
8483         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8484         by -O3.
8486 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8488         PR tree-optimization/85467
8489         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8490         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
8491         VECTOR_CST element to type.
8493 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8495         PR target/85397
8496         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8497         * config/i386/i386.md (builtin_setjmp_setup): Removed.
8498         (builtin_longjmp): Likewise.
8499         (save_stack_nonlocal): New pattern.
8500         (restore_stack_nonlocal): Likewise.
8502 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8504         PR target/85404
8505         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8506         Replace ASM_OUTPUT_LABEL with fprintf.
8508 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8510         PR target/85417
8511         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8512         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8513         * config/i386/i386-c.c (ix86_target_macros_internal): Also
8514         define __IBT__ and __SHSTK__ for -fcf-protection.
8515         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8516         TARGET_IBT.
8517         (ix86_trampoline_init): Likewise.
8518         (x86_output_mi_thunk): Likewise.
8519         (ix86_notrack_prefixed_insn_p): Likewise.
8520         (ix86_option_override_internal): Don't disallow -fcf-protection.
8521         * config/i386/i386.md (rdssp<mode>): Also enable for
8522         -fcf-protection.
8523         (incssp<mode>): Likewise.
8524         (nop_endbr): Likewise.
8525         * config/i386/i386.opt (mcet): Change help message to built-in
8526         functions only.
8527         (mibt): Likewise.
8528         (mshstk): Likewise.
8529         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8530         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
8531         enable CET built-in functions.
8533 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
8535         * common/config/i386/i386-common.c
8536         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8537         OPTION_MASK_ISA_MOVDIRI_UNSET,
8538         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8539         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8540         * config.gcc (movdirintrin.h): New header.
8541         * config/i386/cpuid.h (bit_MOVDIRI,
8542         bit_MOVDIR64B): New bits.
8543         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8544         and -mmvodir64b.
8545         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8546         (VOID, PVOID, PCVOID)): New function types.
8547         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8548         __builtin_ia32_directstoreu_u64,
8549         __builtin_ia32_movdir64b): New builtins.
8550         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8551         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8552         and -mmovdiri.
8553         (ix86_valid_target_attribute_inner_p): Ditto.
8554         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8555         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8556         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8557         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8558         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8559         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8560         (movdiri<mode>, movdir64b_<mode>): New.
8561         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8562         * config/i386/immintrin.h: Include movdirintrin.h.
8563         * config/i386/movdirintrin.h: New file.
8564         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8566 2018-04-19  Richard Biener  <rguenther@suse.de>
8568         PR middle-end/85455
8569         * cfg.c (clear_bb_flags): When loop state says we have
8570         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8572 2018-04-19  Richard Biener  <rguenther@suse.de>
8574         PR tree-optimization/84737
8575         * tree-vect-data-refs.c (vect_copy_ref_info): New function
8576         copying restrict info.
8577         (vect_setup_realignment): Use it.
8578         * tree-vectorizer.h (vect_copy_ref_info): Declare.
8579         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8580         the first DR to all generated stores.
8581         (vectorizable_load): Likewise for loads.
8583 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8585         PR tree-optimization/85446
8586         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8587         the integral and pointer types to have the same precision.
8589         * doc/install.texi: Document --disable-cet being the default and
8590         --enable-cet=auto.
8592 2018-04-18  Martin Liska  <mliska@suse.cz>
8594         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8595         style.
8597 2018-04-18  Martin Liska  <mliska@suse.cz>
8599         Revert
8600         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
8602         PR ipa/83983
8603         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8604         arguments if they are comparable.
8606 2018-04-18  Martin Liska  <mliska@suse.cz>
8608         Revert
8609         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8611         PR lto/84805
8612         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8613         incomplete types.
8615 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
8617         PR target/85388
8618         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8619         ENDBR after calling __morestack.
8621 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
8623         PR jit/85384
8624         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8625         by using gcc_base_ver to generate a gcc_driver_version, and use
8626         it when generating GCC_DRIVER_NAME.
8627         * configure: Regenerate.
8629 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
8631         PR target/81084
8632         * config.gcc: Obsolete powerpc*-*-*spe*.
8634 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8636         PR debug/84637
8637         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8638         (stabstr_D): Change type of unum from unsigned int to
8639         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
8640         type.
8642 2018-04-17  Jim Wilson  <jimw@sifive.com>
8644         PR 84856
8645         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8646         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8647         Set arg_pointer_offset after using pretend_args_size.
8649 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8651         PR rtl-optimization/85431
8652         * dse.c (record_store): Ignore zero width stores.
8654         PR sanitizer/85230
8655         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
8656         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8657         __builtin_stack_restore rather than after it.
8658         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8659         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8660         argument instead of virtual_dynamic_stack_rtx.
8662 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8664         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8665         New prototype.
8666         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8667         Add note to error message to explain internal mapping of overloaded
8668         built-in function name to non-overloaded built-in function name.
8669         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8670         function.
8672 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
8674         PR target/85424
8675         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8676         where the inputs overlap with the output.
8678 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8680         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8681         (=v, v) alternative and explicit "memory" attribute.
8682         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
8683         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8684         attributes.
8685         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8686         "sselog1" type instead of "sselog".
8687         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8688         "sselog".  Remove explicit "memory" attribute.
8689         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8690         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8691         attributes.
8692         (vec_extract_hi_v32hi): Merge all alternatives into one, use
8693         "sselog1" type instead of "sselog".  Remove explicit "memory"
8694         attribute.
8695         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8696         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8697         attribute.
8698         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8699         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8700         attributes.
8701         (vec_extract_hi_v64qi): Merge all alternatives into one, use
8702         "sselog1" type instead of "sselog".  Remove explicit "memory"
8703         attribute.
8704         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8705         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8706         attribute.
8708         PR target/85430
8709         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8711         PR middle-end/85414
8712         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8713         on a SUBREG.
8715 2018-04-17  Martin Jambor  <mjambor@suse.cz>
8717         PR ipa/85421
8718         * ipa-cp.c (create_specialized_node): Call
8719         expand_all_artificial_thunks if necessary.
8721 2018-04-17  Martin Liska  <mliska@suse.cz>
8723         PR lto/85405
8724         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8725         in message, remote space in between '_G' and '('.
8727 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8729         PR target/85281
8730         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8731         avx512f_vmcmp<mode>3<round_saeonly_name>,
8732         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8733         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8734         avx512f_rndscale<mode><round_saeonly_name>,
8735         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8736         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8737         Use %<iptr>2 instead of %2 for -masm=intel.
8738         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8739         avx512f_vcvttss2usi<round_saeonly_name>,
8740         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8741         -masm=intel.
8742         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8743         avx512f_vcvttsd2usi<round_saeonly_name>,
8744         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8745         Use %q1 instead of %1 for -masm=intel.
8746         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8747         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8748         of %3 for -masm=intel.
8749         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8750         -masm=intel.
8751         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8752         -masm=intel.
8753         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8754         -masm=intel.
8755         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8756         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8757         %g1.
8758         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8759         -masm=intel.
8760         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8761         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8762         %g1 and one with %0 and %1.
8763         (avx512er_vmrcp28<mode><round_saeonly_name>,
8764         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8765         %1 for -masm=intel.
8766         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8767         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8768         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8769         of %0 and %{%4%} for -masm=intel.
8770         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8771         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8772         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8773         order of %0 and %{%5%}%{z%} for -masm=intel.
8775 2018-04-17  Jan Hubicka  <jh@suse.cz>
8777         PR lto/85405
8778         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8780 2018-04-17  Martin Liska  <mliska@suse.cz>
8782         PR ipa/85329
8783         * multiple_target.c (create_dispatcher_calls): Set apostrophes
8784         for target_clone error message.  Make default implementation
8785         clone to be a local declaration.
8786         (separate_attrs): Add new argument and check for an empty
8787         string.
8788         (expand_target_clones): Handle it.
8789         (ipa_target_clone): Make redirection just for target_clones
8790         functions.
8792 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
8793             Tom de Vries  <tom@codesourcery.com>
8795         PR middle-end/84955
8796         * omp-expand.c (expand_oacc_for): Add dummy false branch for
8797         tiled basic blocks without omp continue statements.
8799 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
8801         PR target/83660
8802         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8803         vec_extract expression as having side effects to make sure it gets
8804         a cleanup point.
8806 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
8808         PR target/85403
8809         * config/i386/i386.c (get_builtin_code_for_version): Check
8810         error_mark_node.
8812 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
8814         PR target/84331
8815         * gcc/config.gcc: Support "skylake".
8816         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8817         PROCESSOR_SKYLAKE.
8818         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8819         (processor_target_table): Add "skylake".
8820         (ix86_option_override_internal): Add "skylake".
8821         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8822         PROCESSOR_CANNONLAKE.
8823         (get_builtin_code_for_version): Fix priority for
8824         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8825         PROCESSOR_SKYLAKE-AVX512.
8826         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8827         (processor_type): Add PROCESSOR_SKYLAKE.
8829 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
8830             Jason Merrill  <jason@redhat.com>
8832         PR c++/85112
8833         * convert.c (convert_to_integer_1): Use direct recursion for
8834         enumeral types and types with a precision less than the number
8835         of bits in their mode.
8837 2018-04-16  Julia Koval  <julia.koval@intel.com>
8839         PR target/84413
8840         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
8841         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
8843 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
8845         PR target/85293
8846         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
8847         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
8848         and -mno-direct-move.
8850 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
8852         PR target/83402
8853         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
8854         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
8855         Ensure negative shifts result in {0}.
8857 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
8859         PR rtl-optimization/79916
8860         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
8861         regs (if any) to define how to gnerate SD moves when LRA is in
8862         progress.
8864 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
8866         PR rtl-optimization/85393
8867         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8868         * except.c (expand_dw2_landing_pad_for_region): Make static.
8869         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8870         a label and unconditional jump to old_bb, rather than
8871         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8872         basic block.
8874         PR rtl-optimization/85376
8875         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8876         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8877         instead of a specific value.
8879 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8880             Bin Cheng  <bin.cheng@arm.com>
8882         PR tree-optimization/82965
8883         PR tree-optimization/83991
8884         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8885         by_profile_only parameter.
8886         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8887         information if the loop was predicted to iterate too many times.
8888         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8890 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8892         PR lto/71991
8893         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8894         always inline.
8896 2018-04-13  Martin Liska  <mliska@suse.cz>
8897             Jakub Jelinek  <jakub@redhat.com>
8899         PR middle-end/81657
8900         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8901         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8902         * builtins.c (expand_builtin_memory_copy_args): Use
8903         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8904         handle dest_addr == pc_rtx.
8906 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
8908         PR target/85291
8909         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8910         asked to not generate direct moves.
8911         (fix_trunc<mode>si2_stfiwx): Similar.
8912         (fix_trunc<mode>si2_internal): Similar.
8914 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8916         PR debug/83157
8917         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8918         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8919         lookup if dest in some wider mode is known to be const0_rtx and
8920         if so, record permanent equivalence for it to be ZERO_EXTEND of
8921         the narrower mode destination.
8923 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8925         * lto-streamer-out.c (output_function): Revert 259346.
8926         * omp-expand.c (expand_oacc_for): Likewise.
8928 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
8930         PR rtl-optimization/85354
8931         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8932         * sel-sched.c (sel_global_init): ... here.
8934 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
8936         PR target/85238
8937         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8938         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8939         mode for PE-COFF targets.
8940         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8941         (i386_pe_asm_lto_end): Likewise.
8942         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8943         (TARGET_ASM_LTO_END): Likewise.
8944         * config/i386/winnt.c (saved_debug_info_level): New static variable.
8945         (i386_pe_asm_lto_start): New function.
8946         (i386_pe_asm_lto_end): Likewise.
8948 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8949             Richard Biener  <rguenther@suse.de>
8951         PR middle-end/84955
8952         * lto-streamer-out.c (output_function): Fix CFG loop state before
8953         streaming out.
8954         * omp-expand.c (expand_oacc_for): Handle calls to internal
8955         functions like regular functions.
8957 2018-04-12  Richard Biener  <rguenther@suse.de>
8959         PR lto/85371
8960         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8961         for the early LTO debug to properly generate references to it
8962         during DIE emission.  Do not re-use that for the skeleton for
8963         split-dwarf.
8964         (dwarf2out_early_finish): Likewise.
8966 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8968         PR target/85328
8969         * config/i386/sse.md
8970         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8971         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8972         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8973         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8974         and output is a reg, avoid creating invalid lowpart subreg, but
8975         instead split into a 512-bit move.  Don't split if not AVX512VL,
8976         input is xmm16+ reg and output is a mem.
8977         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8978         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8979         xmm16+ reg and output is a mem.
8981 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8983         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8984         also for flag_dwarf2_cfi_asm.
8986 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8988         PR rtl-optimization/85342
8989         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8990         a bool scalar var inside of the loop instead.  Don't try to update
8991         recog_data.operand after failed apply_change_group.
8993 2018-04-12  Tom de Vries  <tom@codesourcery.com>
8995         PR target/85296
8996         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8997         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
8998         array with flexible array member as array without given dimension.
8999         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9000         argument for undefined param to true.
9002 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
9004         PR target/85321
9005         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9006         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9007         from PowerPC section.
9008         * config/rs6000/sysv4.opt (mcall-): Improve help text.
9009         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9010         help text that is too long.
9011         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9012         help text that is too long.
9013         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9014         help text that is too long.
9016 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
9018         * config/alpha/alpha.md (stack_probe_internal): Rename
9019         from "probe_stack".  Update all callers.
9021 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9023         PR rtl-optimization/84566
9024         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9025         sched_macro_fuse_insns.
9027 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9029         PR target/84301
9030         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9031         (compute_block_dependences): ... from here.
9033 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9035         PR tree-optimization/85331
9036         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9037         from int to HOST_WIDE_INT.
9039 2018-04-11  Martin Jambor  <mjambor@suse.cz>
9041         PR ipa/84149
9042         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9043         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9044         not the same as the source val.
9045         (cgraph_edge_brings_value_p): New parameter.
9046         (gather_edges_for_value): Pass destination value to
9047         cgraph_edge_brings_value_p.
9048         (perhaps_add_new_callers): Likewise.
9049         (get_info_about_necessary_edges): Likewise and exclude values brought
9050         only by self-recursive edges.
9051         (create_specialized_node): Redirect only clones of self-calling edges.
9052         (+self_recursive_pass_through_p): New function.
9053         (find_more_scalar_values_for_callers_subset): Use it.
9054         (find_aggregate_values_for_callers_subset): Likewise.
9055         (known_aggs_to_agg_replacement_list): Removed.
9056         (decide_whether_version_node): Re-calculate known constants for all
9057         remaining context clones.
9059 2018-04-11  Richard Biener  <rguenther@suse.de>
9061         PR lto/85339
9062         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9063         from early DWARF output.
9064         (dwarf2out_early_finish): Output line info unconditionally into
9065         early DWARF and add reference to it.
9067 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9069         PR target/85281
9070         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9071         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9072         other than V2DFmode using iptr mode attribute.
9073         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9075 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9077         PR rtl-optimization/84659
9078         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9080 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9082         PR debug/85302
9083         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9084         SIZEP is NULL.
9085         (output_loc_list): Pass address of a dummy size variable even in the
9086         locview handling loop.
9087         (index_location_lists): Add comment on why skip_loc_list_entry can't
9088         call size_of_locs.
9090 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9092         PR target/85261
9093         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9094         into register.
9096 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
9098         PR target/85321
9099         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9100         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9101         and -mstring-compare-inline-limit.
9103 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9105         PR target/85287
9106         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9107         for stack clash protection in a register whenever we need it to be in
9108         a register.
9110 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9112         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9113         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9115 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9117         PR target/85321
9118         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9119         the help text.
9120         (mlong-double-): Ditto.
9121         * config/rs6000/sysv4.opt (msdata=): Ditto.
9122         (mtls-size=): Ditto.
9124 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9126         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9127         erroneous entries for
9128         "vector int vec_ldl (int, long int *)", and
9129         "vector unsigned int vec_ldl (int, unsigned long int *)".
9130         Add comments and entries for
9131         "vector bool char vec_ldl (int, bool char *)",
9132         "vector bool short vec_ldl (int, bool short *)",
9133         "vector bool int vec_ldl (int, bool int *)",
9134         "vector bool long long vec_ldl (int, bool long long *)",
9135         "vector pixel vec_ldl (int, pixel *)",
9136         "vector long long vec_ldl (int, long long *)",
9137         "vector unsigned long long vec_ldl (int, unsigned long long *)".
9138         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9139         type tree bool_long_long_type_node and correct definition of
9140         bool_V2DI_type_node to make reference to this new type tree.
9141         (rs6000_mangle_type): Replace erroneous reference to
9142         bool_long_type_node with bool_long_long_type_node.
9143         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9144         comments to emphasize sign distinctions for char and int types and
9145         replace RS6000_BTI_bool_long constant with
9146         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
9147         use of RS6000_BTI_pixel.
9148         (bool_long_type_node): Remove this macro definition.
9149         (bool_long_long_type_node): New macro definition
9151 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9153         PR rtl-optimization/85300
9154         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9155         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9156         simplify_unary_operation fails.
9158 2018-04-10  Martin Liska  <mliska@suse.cz>
9160         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9161         cgraph_edge and ipa_ref.
9163 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9165         PR target/85177
9166         PR target/85255
9167         * config/i386/sse.md
9168         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9169         computation of the VEC_MERGE selector from mask.
9170         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9171         Fix decoding of the VEC_MERGE selector into mask.
9173 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9175         PR tree-optimization/85286
9176         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9178 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9180         * final.c (final_1): Set insn_last_address as well as
9181         insn_current_address.
9183 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9185         PR target/85173
9186         * explow.c (emit_stack_probe): Call validize_mem on memory location
9187         before passing it to gen_probe_stack.  Create address operand and
9188         legitimize it for the probe_stack_address case.
9190 2018-04-09  Jan Hubicka  <jh@suse.cz>
9192         PR lto/85078
9193         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9194         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9195         * tree.c (free_lang_data_in_type): Fix handling of binfos;
9196         walk basetypes.
9197         (free_lang_data): Rebuild type inheritance graph.
9199 2018-04-09  Martin Sebor  <msebor@redhat.com>
9201         * invoke.texi (-finline-small-functions): Mention other optimization
9202         options.
9203         (-findirect-inlining, -fpartial-inlining): Same.
9204         (-finline-functions-called-once): Same.
9205         (-freorder-blocks-and-partition): Same.
9207 2018-04-09  Jan Hubicka  <jh@suse.cz>
9209         PR rtl/84058
9210         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9211         jumps; choose last target that matches the criteria (i.e.
9212         no partition changes for non-crossing jumps).
9213         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9214         support for redirecting crossing jumps to non-crossing.
9216 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
9218         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9219         also for naked functions.
9221 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
9223         * config/arc/arc.md (add_shift): New pattern.
9224         (add_shift2): Likewise.
9225         (sub_shift): Likewise.
9226         (sub_shift_cmp0_noout): Likewise.
9227         (compare_si_ashiftsi): Likewise.
9228         (xbfu_cmp0_noout): New combine pattern.
9229         (xbfu_cmp0"): Likewise.
9230         (movsi_set_cc_insn): Place the predicable variant first.
9231         (commutative_binary_cmp0_noout): Remove clobber.
9232         (commutative_binary_cmp0): New pattern.
9233         (noncommutative_binary_cmp0): Likewise.
9234         (noncommutative_binary_cmp0_noout): Likewise.
9235         (noncommutative_binary_comparison_result_used): Removed.
9236         (rsub_cmp0): New pattern.
9237         (rsub_cmp0_noout): Likewise.
9238         (extzvsi): Changed, keep only meaningful variants.
9239         (SQH, SEZ): New iterators.
9240         (SQH_postfix): New mode attribute.
9241         (SEZ_prefix): New code attribute.
9242         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9243         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9244         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9245         of numerical value.
9246         (noncommutative_operator): Check the availability of barrel
9247         shifter option.
9249 2018-04-09  Richard Biener  <rguenther@suse.de>
9251         PR tree-optimization/85284
9252         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9253         Only use the niter constraining form of simple_iv when the exit
9254         is always executed.
9256 2018-04-09  Tom de Vries  <tom@codesourcery.com>
9258         PR target/84041
9259         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9260         (define_expand "*memory_barrier"): New define_expand.
9261         (define_insn "memory_barrier"): New insn.
9263 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9265         PR rtl-optimization/80463
9266         PR rtl-optimization/83972
9267         PR rtl-optimization/83480
9269         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9270         correct producer for the insn.
9271         (tidy_control_flow): Fixup seqnos in case of debug insns.
9273 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9275         PR rtl-optimization/83913
9277         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9278         different sched-times when merging exprs.
9280 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9282         PR rtl-optimization/83962
9284         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9285         tidy_fallthru_edge and tidy_control_flow.
9287 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9289         PR rtl-optimization/83530
9291         * sel-sched.c (force_next_insn): New global variable.
9292         (remove_insn_for_debug): When force_next_insn is true, also leave only
9293         next insn in the ready list.
9294         (sel_sched_region): When the region wasn't scheduled, make another pass
9295         over it with force_next_insn set to 1.
9297 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9299         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9300         into tm_file.
9301         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9302         for interrupt control.
9303         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9304         functions for interrupt control.
9305         * config/nds32/nds32-intrinsic.md: Likewise.
9306         * config/nds32/nds32_intrinsic.h: Likewise.
9307         * config/nds32/nds32.h (nds32_builtins): Likewise.
9309 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9311         * config/nds32/nds32.c (nds32_init_machine_status,
9312         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9313         strict_aligned_p field.
9314         (nds32_expand_to_rtl_hook): New function.
9315         (TARGET_EXPAND_TO_RTL_HOOK): Define.
9316         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9318 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9319             Chung-Ju Wu  <jasonwucj@gmail.com>
9321         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9322         * config/nds32/nds32-n7.md: New file.
9323         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9324         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9325         pipeline.
9326         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9327         * config/nds32/nds32.md (pipeline_model): Add n7.
9328         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9329         * config/nds32/pipelines.md: Include n7 settings.
9331 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9332             Chung-Ju Wu  <jasonwucj@gmail.com>
9334         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9335         * config/nds32/nds32-e8.md: New file.
9336         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9337         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9338         pipeline.
9339         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9340         * config/nds32/nds32.md (pipeline_model): Add e8.
9341         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9342         * config/nds32/pipelines.md: Include e8 settings.
9344 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9345             Chung-Ju Wu  <jasonwucj@gmail.com>
9347         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9348         * config/nds32/nds32-n8.md: New file.
9349         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9350         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9351         pipeline.
9352         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9353         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9354         * config/nds32/nds32.md (pipeline_model): Add n8.
9355         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9356         * config/nds32/pipelines.md: Include n8 settings.
9358 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9359             Chung-Ju Wu  <jasonwucj@gmail.com>
9361         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9362         * config/nds32/nds32-n9-2r1w.md: New file.
9363         * config/nds32/nds32-n9-3r2w.md: New file.
9364         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9365         nds32_register_ports): New or modify for cpu n9.
9366         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9367         pipeline.
9368         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9369         * config/nds32/nds32-utils.c: New file.
9370         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9371         TARGET_MUL_SLOW): Define.
9372         * config/nds32/nds32.md (pipeline_model): New attribute.
9373         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9374         New options that support cpu n9.
9375         * config/nds32/pipelines.md: Include n9 settings.
9376         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9378 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9380         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9381         information if necessary.
9382         (output_cond_branch_compare_zero): Likewise.
9383         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9384         (nds32_target_alignment): Refine for alignment.
9385         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9386         (FUNCTION_BOUNDARY): Modify.
9387         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9388         align case.
9389         * config/nds32/nds32.opt (malways-align, malign-functions): New.
9391 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9393         * config/nds32/constants.md (unspec_volatile_element): Add values for
9394         TLB operation and data prefetch.
9395         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9396         functions for TLB operation and data prefetch.
9397         * config/nds32/nds32-intrinsic.md: Likewise.
9398         * config/nds32/nds32_intrinsic.h: Likewise.
9399         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9400         (nds32_print_operand): Likewise.
9401         * config/nds32/nds32.h (nds32_builtins): Likewise.
9403 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
9404         Andrew Pinski <pinsika@gcc.gnu.org>
9406         PR middle-end/82976
9407         * match.pd: Use constant_boolean_node of correct type instead of
9408         boolean_true_node or boolean_false_node for simplifying
9409         pointer comparisons to zero.
9411 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9413         PR tree-optimization/80021
9414         * tree.c (verify_type_variant): Make error call in verify_variant_match
9415         translatable and remove final full stop.
9417 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9419         * config/nds32/constants.md (unspec_volatile_element): Add
9420         UNSPEC_VOLATILE_EH_RETURN.
9421         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9422         nds32_output_stack_pop): Support dwarf exception handling process.
9423         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9424         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9425         exception handling process.
9426         (nds32_compute_stack_frame): Likewise.
9427         (nds32_return_addr_rtx): Likewise.
9428         (nds32_initial_elimination_offset): Likewise.
9429         (nds32_expand_prologue): Likewise.
9430         (nds32_expand_epilogue): Likewise.
9431         (nds32_dynamic_chain_address): New function.
9432         * config/nds32/nds32.h (machine_function): Add fields for dwarf
9433         exception handling.
9434         (DYNAMIC_CHAIN_ADDRESS): Define.
9435         (EH_RETURN_DATA_REGNO): Define.
9436         (EH_RETURN_STACKADJ_RTX): Define.
9437         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9438         patterns for dwarf exception handling.
9440 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9442         * config/nds32/nds32.h: Clean up obsolete macros.
9444 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9446         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9447         Add enum values for particular instructions.
9448         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9449         particular intrinsic functions.
9450         * config/nds32/nds32-intrinsic.md: Likewise.
9451         * config/nds32/nds32_intrinsic.h: Likewise.
9452         * config/nds32/nds32.h (nds32_builtins): Likewise.
9453         * config/nds32/nds32.md (type): Add pbsad and pbsada.
9454         (btst, ave): New patterns for particular instructions.
9456 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9458         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9459         Add enum values for atomic load/store and memory sync.
9460         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9461         and memory sync.
9462         * config/nds32/nds32-intrinsic.md: Likewise.
9463         * config/nds32/nds32_intrinsic.h: Likewise.
9464         * config/nds32/nds32.h (nds32_builtins): Likewise.
9466 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9468         PR tree-optimization/85257
9469         * fold-const.c (native_encode_vector): If not all elts could fit
9470         and off is -1, return 0 rather than offset.
9471         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9472         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9473         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
9474         adjust buffer in native_interpret_expr call.
9476 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9478         * config/nds32/constants.md (unspec_volatile_element): Add cache
9479         control enum values.
9480         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9481         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9482         * config/nds32/nds32.c (nds32_cctl_names): New.
9483         (nds32_print_operand): Handle cache control register names.
9484         * config/nds32/nds32.h (nds32_builtins): New enum values.
9485         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9486         macros.
9487         * config/nds32/nds32.md (type): Add mmu.
9488         * config/nds32/pipelines.md (simple_insn): Add mmu.
9490 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9492         * config/nds32/nds32.md (type): Remove call.
9493         * config/nds32/pipelines.md (simple_insn): Likewise.
9495 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9497         * config/nds32/constants.md (unspec_volatile_element): Add
9498         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9499         UNSPEC_VOLATILE_FMFCFG.
9500         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9501         description for fmfcfg and fmfcsr.
9502         (bdesc_1arg): Add fmtcsr.
9503         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9504         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9505         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9506         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9507         unspec_fmfcfg): New patterns.
9508         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9509         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9510         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9511         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9512         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9513         __nds32__fmfcfg): Define.
9515 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9517         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9518         intrinsic register names.
9519         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9520         intrinsic register enum values and macros.
9522 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9524         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9525         for load/store addressing form.
9526         (nds32_print_operand_address): Likewise.
9528 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
9530         PR target/85196
9531         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9532         based on LABEL_REF.  Remove useless assertion.
9533         (pic_address_needs_scratch): Fix formatting.
9534         (sparc_legitimize_pic_address): Minor tweaks.
9535         (sparc_delegitimize_address): Adjust assertion accordingly.
9536         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9537         into symbolic_operand.
9538         (movsi_high_pic_label_ref): Likewise.
9539         (movsi_lo_sum_pic_label_ref): Likewise.
9540         (movdi_pic_label_ref): Likewise.
9541         (movdi_high_pic_label_ref): Likewise.
9542         (movdi_lo_sum_pic_label_ref): Likewise.
9544 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
9546         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9547         custom LIB_SPEC setup.
9549 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
9550             Kito Cheng  <kito.cheng@gmail.com>
9552         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9553         * config/riscv/freebsd.h: New.
9555 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9557         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9558         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9559         file.
9561 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9562             Kito Cheng  <kito.cheng@gmail.com>
9564         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9565         nds32_output_call, nds32_symbol_binds_local_p): New functions.
9566         * config/nds32/nds32-protos.h (nds32_output_call,
9567         nds32_output_return): Declare.
9568         * config/nds32/nds32.md: Refine all the call and return patterns.
9570 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9572         PR debug/85252
9573         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9574         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9576         PR rtl-optimization/84872
9577         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9578         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9579         EDGE_CROSSING edge.
9581 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
9583         * expr.c (copy_blkmode_to_reg): Revert 254862.
9584         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9586 2018-04-06  Richard Biener  <rguenther@suse.de>
9588         PR middle-end/85244
9589         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9590         after seeing a component reference with an adjacent field.  Treat
9591         refs to arrays at struct end of external decls similar to
9592         refs to unconstrained commons.
9594 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9596         PR sanitizer/85213
9597         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9598         look through SAVE_EXPRs with non-side-effects argument.  Adjust
9599         recursive calls.
9600         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9601         save_p here.
9603 2018-04-06  Richard Biener  <rguenther@suse.de>
9605         PR middle-end/85180
9606         * alias.c (find_base_term): New wrapper around find_base_term
9607         unwinding CSELIB_VAL_PTR changes.
9608         (find_base_term): Do not restore CSELIB_VAL_PTR during the
9609         recursion.
9611 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9613         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9614         instructions.
9615         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9616         constant definitions.
9617         ("nop"): lr 0,0 -> nopr r0
9618         ("nop_lr0", "nop_lr1"): New insn definitions.
9620 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9622         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9623         NDS32_V3PUSH_AVAILABLE_P macro.
9625 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
9626             Chung-Ju Wu  <jasonwucj@gmail.com>
9628         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9629         (nds32*-*-*): Add float and fpu_config into supported_defaults.
9630         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9631         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9632         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9633         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9634         * config/nds32/constraints.md: New constraints and checking for hard
9635         float configuration.
9636         * config/nds32/iterators.md: New mode iterator and attribute for hard
9637         float configuration.
9638         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9639         patterns.
9640         * config/nds32/nds32-fpu.md: New file.
9641         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9642         deal with hard float code generation.
9643         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9644         ARCH_V3S.
9645         (abi_type, float_reg_number): New enum type.
9646         * config/nds32/nds32-predicates.c: New predicates for hard float.
9647         * config/nds32/nds32-protos.h: Declare functions for hard float.
9648         * config/nds32/nds32.c: Implementation for hard float configuration.
9649         * config/nds32/nds32.h: Definitions for hard float configuration.
9650         * config/nds32/nds32.md: Include hard float machine description and
9651         modify patterns for hard float configuration.
9652         * config/nds32/nds32.opt: New options for hard float configuration.
9653         * config/nds32/predicates.md: New predicates for hard float
9654         configuration.
9656 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9658         * common/config/nds32/nds32-common.c
9659         (nds32_option_optimization_table): Enable -mreleax-hint by default.
9661 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
9663         PR middle-end/85195
9664         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9665         CONSTRUCTOR_ELT (ctor, ...)->value.
9667 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
9669         PR target/85193
9670         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9672 2018-04-05  Tom de Vries  <tom@codesourcery.com>
9674         PR target/85204
9675         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9676         cond jump.
9678 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9679             Kito Cheng  <kito.cheng@gmail.com>
9681         * config/nds32/constraints.md (U33): Fine-tune checking condition.
9682         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9683         * config/nds32/nds32.h (nds32_16bit_address_type): Add
9684         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9686 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9687             Kito Cheng  <kito.cheng@gmail.com>
9689         * config/nds32/constraints.md (Ufe): New memory constraint.
9690         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9691         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9692         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9693         operands.
9694         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9695         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9697 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9699         * config/nds32/nds32.md: Use optimize_size in the condition for
9700         alu-shift instructions.
9702 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9704         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9706 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9708         * config/nds32/nds32.md (negsi2): Refine pattern.
9710 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9711             Chung-Ju Wu  <jasonwucj@gmail.com>
9713         * config/nds32/iterators.md (shift_rotate): New code iterator.
9714         (shift): New code attribute.
9715         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9716         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9717         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9718         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9719         bit-wise operations.
9720         (andsi3, *andsi3): Ditto.
9721         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9722         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9723         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9724         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9725         nds32_ior_operand, nds32_xor_operand): New predicates.
9727 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9729         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9730         (addsi3, subsi3): ... this.
9732 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9734         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9736 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9738         * config/nds32/nds32.md: Adjust indention.
9740 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9742         * config/nds32/nds32.md (feature): New attribute.
9744 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9746         * config/nds32/nds32.md (subtype): New attribute.
9748 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9750         PR target/85203
9751         * config/arm/arm-builtins.c (arm_expand_builtin): Change
9752         expansion to perform a bitwise AND of the argument followed by a
9753         boolean negation of the result.
9755 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
9757         PR rtl-optimization/84878
9758         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9759         the basic block.  Assert the use reference is not artificial and that
9760         it has an associated insn.
9762 2018-04-04  Michael Matz  <matz@suse.de>
9764         * builtins.c (compute_objsize): Pass correct operand
9765         to array_at_struct_end_p.
9767 2018-04-04  Richard Biener  <rguenther@suse.de>
9769         PR lto/85176
9770         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9771         from contexts for DINFO_LEVEL_TERSE and below.
9773 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9775         * config/nds32/nds32-doubleword.md (move_<mode>): Require
9776         resiter_operand condition.
9777         * config/nds32/nds32.md (*move<mode>): Ditto.
9779 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9780             Monk Chiang  <sh.chiang04@gmail.com>
9782         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9784 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9786         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9788 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9789             Kito Cheng  <kito.cheng@gmail.com>
9791         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9792         nds32_cond_code_str, output_cond_branch,
9793         output_cond_branch_compare_zero, nds32_expand_cbranch,
9794         nds32_expand_cstore, nds32_expand_movcc,
9795         nds32_output_cbranchsi4_equality_zero,
9796         nds32_output_cbranchsi4_equality_reg,
9797         nds32_output_cbranchsi4_equality_reg_or_const_int,
9798         nds32_output_cbranchsi4_greater_less_zero: New functions.
9799         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9800         nds32_expand_cstore, nds32_expand_movcc,
9801         nds32_output_cbranchsi4_equality_zero,
9802         nds32_output_cbranchsi4_equality_reg,
9803         nds32_output_cbranchsi4_equality_reg_or_const_int,
9804         nds32_output_cbranchsi4_greater_less_zero): Declare.
9805         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9806         nds32_rimm11s_operand): New predicates.
9807         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9808         * config/nds32/nds32.md: Rewrite all the branch and conditional move
9809         patterns.
9811 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9813         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9814         * config/nds32/nds32.md: Ditto.
9815         * config/nds32/pipelines.md: Ditto.
9817 2018-04-04  Richard Biener  <rguenther@suse.de>
9819         PR tree-optimization/85168
9820         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9821         propagating abnormals.
9823 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9825         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9827 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9828             Kito Cheng  <kito.cheng@gmail.com>
9830         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9831         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9832         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9833         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9834         * config/nds32/nds32.md (sibcall_internal): New.
9835         (sibcall_register): Remove.
9836         (sibcall_immediate): Remove.
9837         (sibcall_value_internal): New.
9838         (sibcall_value_register): Remove.
9839         (sibcall_value_immediate): Remove.
9840         * config/nds32/predicates.md (nds32_general_register_operand): New.
9841         (nds32_call_address_operand): New.
9843 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9845         PR rtl-optimization/85167
9846         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
9847         bb_defs if *split_p, instead preinitialize it to NULL.
9849         PR tree-optimization/85156
9850         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
9851         evaluating the argument multiple times.
9853 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
9855         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
9856         than vector.
9857         (_mm_cvtpd_ps): Likewise.
9858         (_mm_cvttpd_epi32): Likewise.
9859         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
9860         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
9861         vector, pixel, and bool following altivec.h include.
9863 2018-04-03  Martin Sebor  <msebor@redhat.com>
9865         * doc/extend.texi (Common Function Attributes): Clarify.
9866         (const attribute): Likewise.
9867         (pure attribute): Likewise.
9869 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9871         PR target/85169
9872         * config/i386/i386.c (ix86_expand_vector_set): Use
9873         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
9875 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
9877         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9878         instructions when changing rounding bits to preserve precision bits
9879         in the x87 control word.
9881 2018-04-03  Martin Liska  <mliska@suse.cz>
9883         PR tree-optimization/82491
9884         * rtl.h (strip_offset_and_add): Replace += suboffset with
9885         poly_uint64 () + suboffset.
9887 2018-03-29  Martin Liska  <mliska@suse.cz>
9888             Martin Jambor  <mjambor@suse.cz>
9890         PR ipa/84947
9891         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9892         param_type is not an integral or pointer type.
9894 2018-04-03  Richard Biener  <rguenther@suse.de>
9896         * sese.h (recompute_all_dominators): Remove.
9898 2018-04-02  Martin Sebor  <msebor@redhat.com>
9900         * doc/invoke.texi (-Wrestrict): Fix typos.
9902 2018-04-02  Jim Wilson  <jimw@sifive.com>
9904         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9905         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9906         (<optab>di3, <optab>si3_extend): Likewise.
9907         (<optab>si3_mask, <optab>si3_mask_1): New.
9908         (<optab>di3_mask, <optab>di3_mask_1): New.
9909         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9910         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9911         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9913 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
9915         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9916         example.
9918 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9920         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9921         (nds32_canonicalize_comparison): New function.
9923 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9924             Kito Cheng  <kito.cheng@gmail.com>
9925             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9927         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9928         * config/nds32/constants.md (unspec_volatile_element): Add
9929         UNSPEC_VOLATILE_RELAX_GROUP.
9930         * config/nds32/nds32-relax-opt.c: New file.
9931         * config/nds32/nds32-predicates.c
9932         (nds32_symbol_load_store_p): New function.
9933         * config/nds32/nds32-protos.h
9934         (nds32_symbol_load_store_p): Declare function.
9935         (make_pass_nds32_relax_opt): Declare new rtl pass function.
9936         * config/nds32/nds32.c
9937         (nds32_register_pass): New function to register pass.
9938         (nds32_register_passes): New function to register passes.
9939         * config/nds32/nds32.md (relax_group): New pattern.
9940         * config/nds32/nds32.opt (mrelax-hint): New option.
9941         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9943 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
9945         * config/nds32/t-nds32: Modify files dependency.
9947 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9949         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9950         (PROFILE_HOOK): Define its implementation.
9952 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9954         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9955         type and 32-bit size.
9957 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
9959         PR middle-end/85090
9960         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9961         (V_128_256): New mode iterator.
9962         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9963         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9964         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9965         of V.
9966         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9967         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9969 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
9971         PR target/83315
9972         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9973         NaN inputs correctly.
9975 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
9977         PR target/80546
9978         * config/rs6000/vsx.md (??r): New mode attribute.
9979         (*vsx_mov<mode>_64bit): Use it.
9980         (*vsx_mov<mode>_32bit): Likewise.
9982 2018-03-30  Martin Sebor  <msebor@redhat.com>
9984         PR tree-optimization/84818
9985         * builtins.c (check_access): Use warning_n.
9987 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9989         PR target/83822
9990         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9991         condition.
9992         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9993         condition.
9995 2018-03-30  Julia Koval  <julia.koval@intel.com>
9997         PR target/84413
9998         * x86-tune.def (movx, partial_reg_dependency): Enable for
9999         m_SKYLAKE_AVX512.
10001 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
10003         PR inline-asm/84985
10004         * lra-constraints.c (process_alt_operands): Move setting
10005         this_alternative_matches below.
10007 2018-03-29  Martin Liska  <mliska@suse.cz>
10009         PR lto/84995.
10010         * doc/invoke.texi: Document how LTO works with debug info.
10011         Describe auto-load support of binutils.  Mention 'x86-64'
10012         as valid option value of -march option.
10014 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
10016         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10018         PR c/85094
10019         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10020         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10021         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10022         checking.
10024 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10026         PR target/84912
10027         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10028         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10029         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10030         for RS6000_BTM_POWERPC64.
10031         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10032         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10033         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10034         definition.
10035         (DIVDE): Use it.
10036         (DIVDEU): Likewise.
10038 2018-03-28 Carl Love  <cel@us.ibm.com>
10040         Revert
10041         2017-09-27  Carl Love  <cel@us.ibm.com>
10043         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10044         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10045         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10046         fctiw instruction.
10048 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10050         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10051         instead of __vector bool.
10052         (_mm_max_pu8): Likewise.
10053         (_mm_min_pi16): Likewise.
10055 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10057         PR target/84912
10058         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10059         (DIVWEUO): Likewise.
10060         (DIVDEO): Likewise.
10061         (DIVDEUO): Likewise.
10062         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10063         DIVWEUO and DIVDEUO.
10064         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10065         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10066         (div_extend): Likewise.
10067         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10068         builtin function.
10069         (__builtin_divweuo): Likewise.
10070         (__builtin_divdeo): Likewise.
10071         (__builtin_divdeuo): Likewise.
10073 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10075         PR target/85095
10076         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10077         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10079         PR tree-optimization/82004
10080         * gimple-match-head.c (optimize_pow_to_exp): New function.
10081         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10082         Don't fold to exp if optimize_pow_to_exp is false.
10084 2018-03-28  Martin Liska  <mliska@suse.cz>
10086         PR other/84819
10087         * calls.c (initialize_argument_information): Fix trailing space.
10088         * common.opt: Fix typo and provide better explanation for
10089         -fsanitize-coverage option.
10090         * config/i386/i386.opt: Fix typo.
10092 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10093             Martin Liska  <mliska@suse.cz>
10095         PR sanitizer/85081
10096         * gimplify.c (asan_poison_variable): Don't do the check for
10097         gimplify_omp_ctxp here.
10098         (gimplify_decl_expr): Do it here.
10099         (gimplify_target_expr): Likewise.
10101 2018-03-28  Martin Liska  <mliska@suse.cz>
10103         PR target/84988
10104         * config/i386/i386.c (ix86_function_arg_advance): Do not call
10105         chkp_type_bounds_count if MPX is not enabled.
10107 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10109         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10111 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
10113         PR target/84914
10114         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10115         function to create the function decl for complex long double
10116         multiply and divide for -mabi=ieeelongdouble.
10117         (init_float128_ieee): Call it.
10119 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
10121         PR target/85044
10122         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10123         -fcf-protection=branch -mibt.
10124         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10126 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10128         PR target/81863
10129         * config/arm/arm.c (arm_valid_symbolic_address): Handle
10130         arm_word_relocations.
10132 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
10134         PR target/85056
10135         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10136         extern array declarations.
10138 2018-03-27  Richard Biener  <rguenther@suse.de>
10140         PR middle-end/84067
10141         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10142         explicit single_use checks.
10144 2018-03-27  Richard Biener  <rguenther@suse.de>
10146         PR tree-optimization/85082
10147         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10148         Valueize the VUSE.
10150 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10152         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10153         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10154         Turn on fasynchronous-unwind-tables and funwind-tables.
10156 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
10158         PR target/85073
10159         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10160         (*bmi_blsr_<mode>_ccz): Ditto.
10162 2018-03-26  Tom de Vries  <tom@codesourcery.com>
10164         PR tree-optimization/85063
10165         * omp-general.c (offloading_function_p): New function.  Factor out
10166         of ...
10167         * omp-offload.c (pass_omp_target_link::gate): ... here.
10168         * omp-general.h (offloading_function_p): Declare.
10169         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10170         with attribute omp declare target for offloading functions.
10172 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
10174         PR tree-optimization/84005
10175         * tree-data-ref.h (get_base_for_alignment): Declare.
10176         * tree-data-ref.c (get_base_for_alignment_1): New function.
10177         (get_base_for_alignment): Likewise.
10178         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10179         get_base_for_alignment to find a suitable base object, instead
10180         of always using drb->base_address.
10182 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10184         PR inline-asm/85022
10185         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10186         known size by default.
10188 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
10190         PR inline-asm/85030
10191         * lra-constraints.c (process_alt_operands): Don't match BLKmode
10192         and non BLKmode operands.
10194 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10196         PR target/85026
10197         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10198         Clean up attributes.
10200 2018-03-23  Richard Biener  <rguenther@suse.de>
10202         PR debug/85020
10203         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10204         we are going to emit early debug for LTO.
10206 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10208         PR inline-asm/85034
10209         * function.c (match_asm_constraints_1): Don't optimize if input
10210         doesn't satisfy general_operand predicate for output's mode.
10212         PR inline-asm/85022
10213         * alias.c (write_dependence_p): Don't require for x_canonicalized
10214         non-VOIDmode if x has VOIDmode.
10216         PR sanitizer/85029
10217         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10218         just don't try to optimize it rather than assert it never happens.
10220 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10222         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10223         macro expansions for definition of ST_INTERNAL_<mode> and
10224         LD_INTERNAL_<mode> builtins.
10225         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10226         Remove prototype.
10227         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10228         function.
10229         (altivec_expand_st_builtin): Likewise.
10230         (altivec_expand_builtin): Remove calls to deleted functions.
10231         (rs6000_address_for_altivec): Delete this function.
10232         * config/rs6000/vector.md: Remove expands for
10233         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10235 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
10237         PR target/84826
10238         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10239         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10240         re-computing once computed.
10241         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10242         (arm_init_machine_status): Initialize
10243         machine->static_chain_stack_bytes.
10245 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10247         PR target/84760
10248         * doc/extend.texi: Add four new prototypes for vec_ld.
10249         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10250         definitions for more logical presentation.
10251         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10252         entries for V1TI variants of __builtin_altivec_ld builtin.
10253         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10254         handling of V1TI variant of LVX icode pattern.
10255         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10256         (rs6000_gimple_fold_builtin): Likewise.
10257         (altivec_init_builtins): Add code to define
10258         __builtin_altivec_lvx_v1ti function.
10260 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10262         PR inline-asm/84941
10263         * function.c (match_asm_constraints_1): Don't do the optimization
10264         if input isn't a REG, SUBREG, MEM or constant.
10266 2018-03-22  Tom de Vries  <tom@codesourcery.com>
10268         PR tree-optimization/84956
10269         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10270         bb_has_abnormal_pred.
10272 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10274         PR sanitizer/85018
10275         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10276         DECL_INITIAL (decl) to decl at the end.
10277         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10278         adjust the comment.
10280 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
10282         * doc/extend.texi (__builtin_tgmath): Document when complex
10283         integer types are treated as _Complex _Float64.
10285 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10287         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10289 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10291         PR tree-optimization/84960
10292         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10293         if it is ENTRY block, move them into single succ of ENTRY in that case.
10295 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
10297         PR tree-optimization/84811
10298         * poly-int.h (poly_span_traits): Remove the T3 parameter and
10299         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10300         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10301         (known_subrange_p): Update accordingly.  Cast each value involved
10302         in the size comparison, rather than casting the result of the
10303         subtraction.
10305 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10307         PR tree-optimization/84982
10308         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10309         by flipping the least significant bit rather than all bits from
10310         bitpos to bitpos + bitsize - 1.
10312 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10314         * doc/extend.texi (Deprecated Features): Remove mention of
10315         long-deleted deprecations.
10317 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10319         PR jit/84288
10320         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10321         * configure: Regenerate.
10323 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10325         PR tree-optimization/83126
10326         * tree-parloops.c (num_phis): New function.
10327         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10329 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10331         * doc/extend.texi (Deprecated Features): Update deprecated flags,
10332         mention anon-struct/union members and trailing attributes.
10334 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
10336         PR tree-optimization/84969
10337         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10338         builtin memset partitions if they set different rhs values.
10340 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10342         PR rtl-optimization/84989
10343         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10344         VEC_DUPLICATE with scalar result mode.
10346 2018-03-21  Martin Liska  <mliska@suse.cz>
10348         PR ipa/84963
10349         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10350         not intended return statement.
10352 2018-03-21  Martin Liska  <mliska@suse.cz>
10354         PR target/84988
10355         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10356         (chkp_find_bound_slots_1): Limit number of iterations.
10358 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
10360         PR target/84838
10361         * Minor grammar fixes for x86 options.
10363 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10365         PR debug/84875
10366         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10367         holding REG_CFA_RESTORE notes, instead turn them into a USE.
10369 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
10371         PR target/83789
10372         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10373         (altivec_lvx_<mode>_1op): Likewise.
10374         (altivec_stvx_<mode>_2op): Likewise.
10375         (altivec_stvx_<mode>_1op): Likewise.
10376         (altivec_lvx_<VM2:mode>): New define_expand.
10377         (altivec_stvx_<VM2:mode>): Likewise.
10378         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10379         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10380         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10381         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10382         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10383         (rs6000_gen_lvx): Likewise.
10384         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10385         (altivec_expand_stv_builtin): Likewise.
10386         (altivec_expand_builtin): Likewise.
10387         * config/rs6000/vector.md: Likewise.
10389 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10391         PR target/82518
10392         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10393         BYTES_BIG_ENDIAN.
10395 2018-03-20  Richard Biener  <rguenther@suse.de>
10397         PR target/84986
10398         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10399         sign-conversions as zero, fall back to standard scalar_stmt
10400         cost for the rest.
10402 2018-03-20  Martin Liska  <mliska@suse.cz>
10404         PR ipa/84825
10405         * predict.c (rebuild_frequencies): Handle case when we have
10406         PROFILE_ABSENT, but flag_guess_branch_prob is false.
10408 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10410         PR target/84990
10411         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10412         flag_section_anchors.
10413         * varasm.c (use_blocks_for_decl_p): Remove hack for
10414         dw2_force_const_mem.
10416         PR target/84845
10417         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10418         to ...
10419         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
10420         be created, use lowpart_subreg of operands[0] rather than operands[0]
10421         itself.
10422         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10423         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10424         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10425         and n constraint instead of aarch64_shift_imm_di and Usd.
10426         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10427         (*aarch64_<optab>_reg_minus<mode>3): ... this.
10429 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
10431         PR target/82989
10432         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10433         to favor GPR over NEON registers.
10434         (<shift>di3_neon): Likewise.
10436 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10438         PR target/84952
10439         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10440         (nvptx_process_pars): Emit bar.sync asap and alap.
10442 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10444         PR target/84954
10445         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10446         seen_label if seen_label is already set.
10448 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10450         PR target/84945
10451         * config/i386/i386.c (fold_builtin_cpu): For features above 31
10452         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10453         Use 1U instead of 1.  Formatting fixes.
10455         PR c/84953
10456         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10457         instead of TREE_TYPE (s1) for the return value.
10459 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
10461         PR tree-optimization/84946
10462         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10463         bitsize + bitsize in poly_uint64 rather than poly_int64.
10465         PR sanitizer/78651
10466         * dwarf2asm.c: Include fold-const.c.
10467         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10468         of decl rather than decl itself.
10470         PR rtl-optimization/84643
10471         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10473 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
10475         PR sanitizer/78651
10476         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10477         calling assemble_variable.
10479 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
10481         PR target/81647
10482         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10483         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10485 2018-03-19  Jim Wilson  <jimw@sifive.com>
10487         PR bootstrap/84856
10488         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10489         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10490         (riscv_first_stack_step): Likewise.
10491         (riscv_option_override): Use STACK_BOUNDARY instead of
10492         MIN_STACK_BOUNDARY.
10493         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10494         MIN_STACK_BOUNDARY.
10495         (BIGGEST_ALIGNMENT): Set to 128.
10496         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10497         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10498         STACK_BOUNDARY.
10500 2018-03-19  Richard Biener  <rguenther@suse.de>
10502         PR tree-optimization/84933
10503         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10504         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10506 2018-03-19  Richard Biener  <rguenther@suse.de>
10508         PR tree-optimization/84859
10509         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10510         (cond_if_else_store_replacement): Perform sinking operation on
10511         single-store BBs regardless of MAX_STORES_TO_SINK setting.
10512         Generalize what a BB with a single eligible store is.
10514 2018-03-19  Richard Biener  <rguenther@suse.de>
10516         PR tree-optimization/84929
10517         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10518         chrec_is_positive against non-chrec arg.
10520 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
10522         PR target/84711
10523         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10525 2018-03-18  Martin Liska  <mliska@suse.cz>
10527         PR rtl-optimization/84635
10528         * regrename.c (build_def_use): Use matches_mode only when
10529         matches >= 0.
10531 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
10533         PR tree-optimization/84913
10534         * tree-vect-loop.c (vectorizable_reduction): Don't try to
10535         vectorize chains of COND_EXPRs.
10537 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10539         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10541 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10543         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10545 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10547         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10549 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10550             Kito Cheng  <kito.cheng@gmail.com>
10552         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10553         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10554         (nds32_adjust_reg_alloc_order): New function.
10555         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10557 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
10559         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10560         nds32_print_operand, nds32_print_operand_address): Use
10561         HOST_WIDE_INT_PRINT_DEC instead.
10563 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10565         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10567 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
10569         PR target/84902
10570         * config/i386/i386.c (initial_ix86_tune_features,
10571         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10572         unsigned long long.
10573         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10574         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10575         rather than 1u << ix86_tune.  Formatting fix.
10576         (ix86_option_override_internal): Change ix86_arch_mask from
10577         unsigned int to unsigned HOST_WIDE_INT, initialize to
10578         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10579         (ix86_function_specific_restore): Likewise.
10581 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10583         PR target/84899
10584         * postreload.c (reload_combine_recognize_pattern): Perform
10585         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10586         truncate_int_for_mode the result for the destination's mode.
10588         PR c/84909
10589         * hsa-gen.c (mem_type_for_type): Fix comment typo.
10590         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10591         Likewise.
10592         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10593         Likewise.
10595 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
10597         PR target/84876
10598         * lra-assigns.c (lra_split_hard_reg_for): Don't use
10599         regno_allocno_class_array and sorted_pseudos.
10600         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10601         insns where regno is used.
10603 2018-03-16  Martin Liska  <mliska@suse.cz>
10605         PR ipa/84833
10606         * multiple_target.c (create_dispatcher_calls): Redirect
10607         reference in the symbol table.
10609 2018-03-16  Martin Liska  <mliska@suse.cz>
10611         PR ipa/84722
10612         * multiple_target.c (create_dispatcher_calls): Redirect also
10613         an alias.
10615 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10617         PR c++/79937
10618         PR c++/82410
10619         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10620         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10621         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10623 2018-03-16  Julia Koval  <julia.koval@intel.com>
10625         * doc/invoke.texi (Skylake Server): Add CLWB.
10626         Cannonlake): Remove CLWB.
10628 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10630         PR tree-optimization/84841
10631         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10632         1 << 3.
10633         (FLOAT_ONE_CONST_TYPE): Define.
10634         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10635         (sort_by_operand_rank): Put entries with higher constant_type last
10636         rather than first to match comments.
10638 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
10640         * config/nios2/nios2.md (movsi_internal): Fix thinko in
10641         split predicate.
10643 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10645         PR c++/79085
10646         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10647         check and use address of target always.
10649 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
10651         PR target/84574
10652         * config/i386/i386.c (indirect_thunk_needed): Update comments.
10653         (indirect_thunk_bnd_needed): Likewise.
10654         (indirect_thunks_used): Likewise.
10655         (indirect_thunks_bnd_used): Likewise.
10656         (indirect_return_needed): New.
10657         (indirect_return_bnd_needed): Likewise.
10658         (output_indirect_thunk_function): Add a bool argument for
10659         function return.
10660         (output_indirect_thunk_function): Don't generate alias for
10661         function return thunk.
10662         (ix86_code_end): Call output_indirect_thunk_function to generate
10663         function return thunks.
10664         (ix86_output_function_return): Set indirect_return_bnd_needed
10665         and indirect_return_needed instead of indirect_thunk_bnd_needed
10666         and indirect_thunk_needed.
10668 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
10670         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10671         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10672         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10674 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
10675             Paul Hua <paul.hua.gm@gmail.com>
10677         PR c/84852
10678         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10680 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
10682         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10683         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10684         resp. SFmode cases.
10686 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
10688         PR target/84711
10689         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10690         instead of GET_MODE_SIZE when comparing Units.
10692 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10694         PR target/68256
10695         * varasm.c (hash_section): Return an unchangeble hash value
10696         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10697         Return !aarch64_can_use_per_function_literal_pools_p ().
10699 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10701         PR target/84860
10702         * optabs.c (emit_conditional_move): Pass address of cmode's copy
10703         rather than address of cmode as last argument to prepare_cmp_insn.
10705 2018-03-15  Julia Koval  <julia.koval@intel.com>
10707         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10708         F_AVX512VNNI, F_AVX512BITALG): New.
10710 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
10712         PR target/83451
10713         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
10714         insn for floating-point loads and stores.
10716 2018-03-14  Carl Love  <cel@us.ibm.com>
10718         * config/rs6000/rs6000-c.c: Add macro definitions for
10719         ALTIVEC_BUILTIN_VEC_PERMXOR.
10720         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10721         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10722         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10723         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10724         UNSPEC_VPERMXOR.
10725         * config/doc/extend.texi: Add prototypes for vec_permxor.
10727 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
10729         PR c/84852
10730         * diagnostic-show-locus.c (class layout_point): Convert m_line
10731         from int to linenum_type.
10732         (line_span::comparator): Use linenum "compare" function when
10733         comparing line numbers.
10734         (test_line_span): New function.
10735         (layout_range::contains_point): Convert param "row" from int to
10736         linenum_type.
10737         (layout_range::intersects_line_p): Likewise.
10738         (layout::will_show_line_p): Likewise.
10739         (layout::print_source_line): Likewise.
10740         (layout::should_print_annotation_line_p): Likewise.
10741         (layout::print_annotation_line): Likewise.
10742         (layout::print_leading_fixits): Likewise.
10743         (layout::annotation_line_showed_range_p): Likewise.
10744         (struct line_corrections): Likewise for field m_row.
10745         (line_corrections::line_corrections): Likewise for param "row".
10746         (layout::print_trailing_fixits): Likewise.
10747         (layout::get_state_at_point): Likewise.
10748         (layout::get_x_bound_for_row): Likewise.
10749         (layout::print_line): Likewise.
10750         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10751         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10752         * input.c (selftest::test_linenum_comparisons): New function.
10753         (selftest::input_c_tests): Call it.
10754         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10755         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10756         * selftest.h (ASSERT_GT): New macro.
10757         (ASSERT_GT_AT): New macro.
10758         (ASSERT_LT): New macro.
10759         (ASSERT_LT_AT): New macro.
10761 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
10763         PR rtl-optimization/84780
10764         * combine.c (distribute_links): Don't make a link based on pc_rtx.
10766 2018-03-14  Martin Liska  <mliska@suse.cz>
10768         * tree.c (record_node_allocation_statistics): Use
10769         get_stats_node_kind.
10770         (get_stats_node_kind): New function extracted from
10771         record_node_allocation_statistics.
10772         (free_node): Use get_stats_node_kind.
10774 2018-03-14  Richard Biener  <rguenther@suse.de>
10776         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10777         that the value-set of ANTIC_IN doesn't grow.
10779         Revert
10780         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10781         member.
10782         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10783         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10785 2018-03-14  Julia Koval  <julia.koval@intel.com>
10787         * config.gcc (icelake-client, icelake-server): New.
10788         (icelake): Remove.
10789         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10790         (initial_ix86_arch_features): Ditto.
10791         (PTA_SKYLAKE): Add SGX.
10792         (PTA_ICELAKE): Remove.
10793         (PTA_ICELAKE_CLIENT): New.
10794         (PTA_ICELAKE_SERVER): New.
10795         (ix86_option_override_internal): Split up icelake on icelake client and
10796         icelake server.
10797         (get_builtin_code_for_version): Ditto.
10798         (fold_builtin_cpu): Ditto.
10799         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10800         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10801         * config/i386/i386.h (processor_type): Ditto.
10802         * doc/invoke.texi: Ditto.
10804 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
10806         PR sanitizer/83392
10807         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10808         INTEGER_CST offset, add it together with bitpos / 8 and
10809         sign extend based on POINTER_SIZE.
10811         PR target/84844
10812         Revert
10813         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
10815         PR target/78090
10816         * config/i386/constraints.md (Yc): New register constraint.
10817         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10818         Use Yc constraint for alternative 2 of operand 0.  Remove
10819         preferred_for_speed attribute.
10821 2018-03-14  Richard Biener  <rguenther@suse.de>
10823         PR tree-optimization/84830
10824         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10825         with the old one to avoid oscillations.
10827 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
10829         PR target/83712
10830         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10831         pseudos.
10832         (assign_by_spills): Return a flag of reload assignment failure.
10833         Do not process the reload assignment failures.  Do not spill other
10834         reload pseudos if they has the same reg class.  Update n if
10835         necessary.
10836         (lra_assign): Add a return arg.  Set up from the result of
10837         assign_by_spills call.
10838         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10839         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10840         usage_insns if it is not NULL.
10841         (spill_hard_reg_in_range): New function.
10842         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10843         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10844         function prototypes.
10845         (lra_assign): Change prototype.
10846         * lra.c (lra): Add code to deal with fails by splitting hard reg
10847         live ranges.
10849 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
10851         * config/riscv/riscv.opt (mrelax): New option.
10852         * config/riscv/riscv.c (riscv_file_start): Emit ".option
10853         "norelax" when riscv_mrelax is disabled.
10854         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
10856 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10858         PR target/84743
10859         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
10860         reassociation for int modes.
10862 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10864         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10865         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10866         for big-endian.
10867         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10868         * config/aarch64/aarch64-sve.md
10869         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10870         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10871         (*extend<mode><Vwide>2): Rename to...
10872         (aarch64_sve_extend<mode><Vwide>2): ...this.
10873         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10874         renaming the old pattern to...
10875         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
10876         unsigned packs.
10877         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10878         define_expand, renaming the old pattern to...
10879         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10880         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10881         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10882         account when deciding which SVE instruction the optab should use.
10883         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10885 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10887         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10888         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10889         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10890         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10891         (tlsdesc_small_<mode>): Turn a define_expand and use
10892         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
10893         (tlsdesc_small_advsimd_<mode>): ...this.
10894         (tlsdesc_small_sve_<mode>): New pattern.
10896 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10898         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10899         (UNSPEC_UMUL_HIGHPART): New constants.
10900         (MUL_HIGHPART): New int iteraor.
10901         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10902         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10903         define_expand.
10904         (*<su>mul<mode>3_highpart): New define_insn.
10906 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10908         PR lto/84805
10909         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10910         incomplete types.
10912 2018-03-13  Martin Liska  <mliska@suse.cz>
10914         PR ipa/84658.
10915         * (sem_item_optimizer::sem_item_optimizer): Initialize new
10916         vector.
10917         (sem_item_optimizer::~sem_item_optimizer): Release it.
10918         (sem_item_optimizer::merge_classes): Register variable aliases.
10919         (sem_item_optimizer::fixup_pt_set): New function.
10920         (sem_item_optimizer::fixup_points_to_sets): Likewise.
10921         * ipa-icf.h: Declare new variables and functions.
10923 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
10925         PR middle-end/84834
10926         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10927         integer_pow2p@2 and test integer_pow2p in condition.
10928         (A < 0 ? C : 0): Similarly for @1.
10930         PR middle-end/84831
10931         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10932         characters starting at p contain '\0' character, don't look beyond
10933         that.
10935         PR target/84827
10936         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10937         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10939         PR target/84828
10940         * reg-stack.c (change_stack): Change update_end var from int to
10941         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10942         also call set_block_for_insn on the newly added insns and rescan.
10944         PR target/84786
10945         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10946         on the last operand.
10948         PR c++/84704
10949         * tree.c (stabilize_reference_1): Return save_expr (e) for
10950         STATEMENT_LIST even if it doesn't have side-effects.
10952 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
10954         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10956 2018-03-12  Renlin Li  <renlin.li@arm.com>
10958         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10959         aarch64_output_scalar_simd_mov_immediate.
10961 2018-03-12  Martin Sebor  <msebor@redhat.com>
10963         PR tree-optimization/83456
10964         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10965         for perfectly overlapping calls to memcpy.
10966         (gimple_fold_builtin_memory_chk): Same.
10967         (gimple_fold_builtin_strcpy): Handle no-warning.
10968         (gimple_fold_builtin_stxcpy_chk): Same.
10969         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10971 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10973         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10974         parameter.  Use it for SFmode.
10975         (rs6000_function_arg_advance_1): Adjust.
10976         (rs6000_function_arg): Adjust.
10977         (rs6000_gimplify_va_arg): Pass false for that new parameter.
10979 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10981         PR rtl-optimization/84169
10982         PR rtl-optimization/84780
10983         * combine.c (can_combine_p): Check for a 2-insn combination whether
10984         the destination register is used between the two insns, too.
10986 2018-03-12  Richard Biener  <rguenther@suse.de>
10988         PR tree-optimization/84803
10989         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10990         for refs DR analysis didn't process.
10992 2018-03-12  Richard Biener  <rguenther@suse.de>
10994         PR tree-optimization/84777
10995         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10996         force-vectorize loops ignore whether we are optimizing for size.
10998 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11000         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11001         (TARGET_MD_ASM_ADJUST): Define.
11003 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
11004             Kito Cheng  <kito.cheng@gmail.com>
11005             Chung-Ju Wu  <jasonwucj@gmail.com>
11007         * config/nds32/nds32.c (nds32_compute_stack_frame,
11008         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11009         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11010         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11011         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11012         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11013         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11014         * config/nds32/nds32.md (prologue, epilogue): Use macro
11015         NDS32_V3PUSH_AVAILABLE_P to do checking.
11017 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
11019         PR debug/58150
11020         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11021         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11022         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
11023         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
11024         addition of most attributes on !orig_type_die or the attribute not
11025         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11027 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11028             Chung-Ju Wu  <jasonwucj@gmail.com>
11030         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11031         __NDS32_VH__ macro.
11032         * config/nds32/nds32.opt (mvh): New option.
11034 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11035             Chung-Ju Wu  <jasonwucj@gmail.com>
11037         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11038         function.
11039         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11040         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11041         definition.
11043 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
11044             Chung-Ju Wu  <jasonwucj@gmail.com>
11046         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11047         function.
11048         * config/nds32/nds32-multiple.md (strlensi): New pattern.
11049         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11051 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
11052             Kito Cheng  <kito.cheng@gmail.com>
11053             Chung-Ju Wu  <jasonwucj@gmail.com>
11055         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11056         UNSPEC_FFMISM and UNSPEC_FLMISM.
11057         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11058         for ffb, ffmism and flmism.
11059         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11060         (unspec_ffmism): Ditto.
11061         (unspec_flmism): Ditto.
11062         (nds32_expand_builtin_impl): Check if string extension is available.
11063         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11064         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11066 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
11068         Reverting patch:
11069         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11071         PR target/83712
11072         * lra-assigns.c (assign_by_spills): Return a flag of reload
11073         assignment failure.  Do not process the reload assignment
11074         failures.  Do not spill other reload pseudos if they has the same
11075         reg class.
11076         (lra_assign): Add a return arg.  Set up from the result of
11077         assign_by_spills call.
11078         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11079         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11080         usage_insns if it is not NULL.
11081         (spill_hard_reg_in_range): New function.
11082         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11083         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11084         function prototypes.
11085         (lra_assign): Change prototype.
11086         * lra.c (lra): Add code to deal with fails by splitting hard reg
11087         live ranges.
11089 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
11091         PR target/84807
11092         * config/i386/i386.opt: Replace Enforcment with Enforcement.
11094 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
11096         PR debug/84620
11097         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11098         (dw_val_node): Add val_symbolic_view.
11099         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11100         (symview_upper_bound): New.
11101         (new_line_info_table): Initialize symviews_since_reset.
11102         (dwarf2out_source_line): Count symviews_since_reset and set
11103         symview_upper_bound.
11104         (dw_val_equal_p): Handle symview.
11105         (add_AT_symview): New.
11106         (print_dw_val): Handle symview.
11107         (attr_checksum, attr_checksum_ordered): Likewise.
11108         (same_dw_val_p, size_of_die): Likewise.
11109         (value_format, output_die): Likewise.
11110         (add_high_low_attributes): Use add_AT_symview for entry_view.
11111         (dwarf2out_finish): Reset symview_upper_bound, clear
11112         zero_view_p.
11114 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
11116         PR target/83969
11117         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11118         Add strict argument and use it.
11119         (rs6000_split_multireg_move): Update for new strict argument.
11120         (mem_operand_gpr): Disallow all non-offsettable addresses.
11121         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11123 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
11125         PR target/84772
11126         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11127         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11128         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11130         PR c++/84767
11131         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11132         decl, use remap_type if we want to use the type.
11134 2018-03-09  Martin Sebor  <msebor@redhat.com>
11136         PR tree-optimization/84526
11137         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11138         Remove dead code.
11139         (builtin_access::generic_overlap): Be prepared to handle non-array
11140         base objects.
11142 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
11144         PR rtl-optimization/84682
11145         * lra-constraints.c (process_address_1): Check is_address flag
11146         for address constraints.
11147         (process_alt_operands): Likewise.
11148         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11149         preprocess_constraints.
11150         * recog.h (preprocess_constraints): Add oploc parameter.
11151         Adjust callers.
11152         * recog.c (preprocess_constraints): Test address_operand for
11153         CT_ADDRESS constraints.
11155 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11157         PR target/83712
11158         * lra-assigns.c (assign_by_spills): Return a flag of reload
11159         assignment failure.  Do not process the reload assignment
11160         failures.  Do not spill other reload pseudos if they has the same
11161         reg class.
11162         (lra_assign): Add a return arg.  Set up from the result of
11163         assign_by_spills call.
11164         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11165         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11166         usage_insns if it is not NULL.
11167         (spill_hard_reg_in_range): New function.
11168         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11169         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11170         function prototypes.
11171         (lra_assign): Change prototype.
11172         * lra.c (lra): Add code to deal with fails by splitting hard reg
11173         live ranges.
11175 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11177         PR target/83193
11178         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11179         Accept complain bool parameter.  Only emit errors if it is true.
11180         (arm_parse_cpu_option_name): Likewise.
11181         (arm_target_thumb_only): Adjust callers of the above.
11182         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11183         prototype to take a default true bool parameter.
11184         (arm_parse_arch_option_name): Likewise.
11186 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
11187             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
11189         PR jit/64089
11190         PR jit/84288
11191         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11192         * configure: Regenerate.
11193         * configure.ac ("linker --version-script option"): New.
11194         ("linker soname option"): New.
11196 2018-03-09  Richard Biener  <rguenther@suse.de>
11198         PR tree-optimization/84775
11199         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11200         immediate uses of predicate stmts and mark them modified.
11202         Revert
11203         PR tree-optimization/84178
11204         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11205         to caller.
11206         (version_loop_for_if_conversion): Delay update_ssa call.
11207         (tree_if_conversion): Delay update_ssa until after predicate
11208         insertion.
11210 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
11212         PR target/84763
11213         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11214         when the function accesses prior frames.
11216 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11218         PR debug/84456
11219         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11220         gen_llsym, otherwise call maybe_gen_llsym.
11222         PR inline-asm/84742
11223         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11224         has ',' character inside of it.
11226 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11228         PR target/84748
11229         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11230         as clobbering CC_REGNUM.
11232 2018-03-08  Richard Biener  <rguenther@suse.de>
11234         PR middle-end/84552
11235         * tree-scalar-evolution.c: Include tree-into-ssa.h.
11236         (follow_copies_to_constant): Do not follow SSA names registered
11237         for update.
11239 2018-03-08  Richard Biener  <rguenther@suse.de>
11241         PR tree-optimization/84178
11242         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11243         to caller.
11244         (version_loop_for_if_conversion): Delay update_ssa call.
11245         (tree_if_conversion): Delay update_ssa until after predicate
11246         insertion.
11248 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
11250         PR tree-optimization/84178
11251         * tree-if-conv.c (release_bb_predicate): Remove the
11252         the assertion that the stmts have NULL use_ops.
11253         Discard the statements, asserting that they haven't
11254         yet been added to a BB.
11256 2018-03-08  Richard Biener  <rguenther@suse.de>
11258         PR tree-optimization/84746
11259         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11260         (phi_translate): Pass in destination ANTIC_OUT set.
11261         (phi_translate_1): Likewise.  For a simplified result lookup
11262         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11263         (phi_translate_set): Adjust.
11264         (do_pre_regular_insertion): Likewise.
11265         (do_pre_partial_partial_insertion): Likewise.
11267 2018-03-08  Martin Liska  <mliska@suse.cz>
11269         PR gcov-profile/84735
11270         * doc/gcov.texi: Document usage of profile files.
11271         * gcov-io.h: Document changes in the format.
11273 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
11275         PR debug/84404
11276         PR debug/84408
11277         * dwarf2out.c (struct dw_line_info_table): Update comments for
11278         view == -1.
11279         (FORCE_RESET_NEXT_VIEW): New.
11280         (FORCE_RESETTING_VIEW_P): New.
11281         (RESETTING_VIEW_P): Check for -1 too.
11282         (ZERO_VIEW_P): Likewise.
11283         (new_line_info_table): Force-reset next view.
11284         (dwarf2out_begin_function): Likewise.
11285         (dwarf2out_source_line): Simplify zero_view_p initialization.
11286         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11287         view directly.  Omit view when omitting .loc at line 0.
11289 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11291         PR tree-optimization/84740
11292         * tree-switch-conversion.c (process_switch): Call build_constructors
11293         only if info.phi_count is non-zero.
11295         PR tree-optimization/84739
11296         * tree-tailcall.c (find_tail_calls): Check call arguments against
11297         DECL_ARGUMENTS (current_function_decl) rather than
11298         DECL_ARGUMENTS (func) when checking for tail recursion.
11300 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11302         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11303         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11304         Volker Reichelt's entry and add entries for people that perform
11305         GCC fuzzy testing and report numerous bugs.
11307 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
11309         PR target/82411
11310         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11311         readonly data in sdata, if that is disabled.
11312         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11313         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11314         -mreadonly-in-sdata option.
11316 2018-03-07  Martin Sebor  <msebor@redhat.com>
11318         PR tree-optimization/84468
11319         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11320         basic block when looking for nul assignment.
11322 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
11324         PR target/84277
11325         * except.h (output_function_exception_table): Adjust prototype.
11326         * except.c (output_function_exception_table): Remove FNNAME parameter
11327         and add SECTION parameter.  Ouput one part of the table at a time.
11328         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11329         the first part of the exception table and emit unwind directives.
11330         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11331         (i386_pe_seh_cold_init): Likewise.
11332         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11333         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11334         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11335         (ix86_output_call_insn): Emit a nop in one more case for SEH.
11336         * config/i386/winnt.c: Include except.h.
11337         (struct seh_frame_state): Add reg_offset, after_prologue and
11338         in_cold_section fields.
11339         (i386_pe_seh_end_prologue): Set seh->after_prologue.
11340         (i386_pe_seh_cold_init): New function.
11341         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11342         to seh->in_cold_section.
11343         (seh_emit_push): Record the offset of the push.
11344         (seh_emit_save): Record the offet of the save.
11345         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11346         Test seh->after_prologue to disregard the epilogue.
11347         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11348         (i386_pe_end_cold_function): New function.
11350 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11352         PR fortran/84565
11353         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11354         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11356         PR c++/84704
11357         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11358         on tmp_var.
11359         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11360         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11362         PR middle-end/84723
11363         * multiple_target.c: Include tree-inline.h and intl.h.
11364         (expand_target_clones): Diagnose and fail if node->definition and
11365         !tree_versionable_function_p (node->decl).
11367 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
11369         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11370         sprint_ul.
11371         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11372         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11373         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11375 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11377         PR target/84710
11378         * combine.c (try_combine): Use reg_or_subregno instead of handling
11379         just paradoxical SUBREGs and REGs.
11381 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
11383         * config/arc/arc.c (arc_finalize_pic): Remove function.
11384         (arc_must_save_register): We use single base PIC register, remove
11385         checks to save/restore the PIC register.
11386         (arc_expand_prologue): Likewise.
11387         * config/arc/arc-protos.h (arc_set_default_type_attributes):
11388         Remove.
11389         (arc_verify_short): Likewise.
11390         (arc_attr_type): Likewise.
11391         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11392         (walk_stores): Likewise.
11393         (arc_address_cost): Make it static.
11394         (arc_verify_short): Likewise.
11395         (branch_dest): Likewise.
11396         (arc_attr_type): Likewise.
11397         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11398         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11399         (arc_final_prescan_insn): Remove inserting the nops due to
11400         hardware hazards.  It is done in reorg step.
11401         (insn_length_variant_t): Remove.
11402         (insn_length_parameters_t): Likewise.
11403         (arc_insn_length_parameters): Likewise.
11404         (arc_get_insn_variants): Likewise.
11405         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11407 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11409         PR inline-asm/84683
11410         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11411         assertion failure.
11413         PR tree-optimization/84687
11414         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11415         on new_node->decl.
11416         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11418 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11420         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11421         Rename to ppc_speculation_barrier.
11422         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11423         __builtin_ppc_speculation_barrier.
11425 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11427         PR target/84700
11428         * combine.c (combine_simplify_rtx): Don't try to simplify if
11429         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11430         are equal to x.
11432 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
11434         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11435         to 32 bytes when compiling for POWER9.
11437 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11439         PR target/84564
11440         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11441         regparm >= 3 with no arg reg available also for calls with
11442         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
11444         PR target/84524
11445         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11446         orig,vex.
11447         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
11449 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
11451         PR target/84264
11452         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11454 2018-03-05  Richard Biener  <rguenther@suse.de>
11456         PR tree-optimization/84486
11457         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11458         When inserting a __builtin_assume_aligned call set the LHS
11459         SSA name alignment info accordingly.
11461 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
11463         PR tree-optimization/84114
11464         * config/aarch64/aarch64.c (aarch64_reassociation_width)
11465         Avoid reassociation of FLOAT_MODE addition.
11467 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
11469         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11470         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11471         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11472         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11473         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11474         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11475         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11476         and -mwbnoinvd.
11477         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11478         __builtin_ia32_wbinvd): New builtins.
11479         (SPECIAL_ARGS2): New.
11480         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11481         (SPECIAL_ARGS2): New.
11482         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11483         (ix86_valid_target_attribute_inner_p): Ditto.
11484         (ix86_init_mmx_sse_builtins): Add special_args2.
11485         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11486         TARGET_WBNOINVD_P): New.
11487         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11488         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11489         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11490         * config/i386/immintrin.h (_wbinvd): New intrinsic.
11491         * config/i386/pconfigintrin.h: New file.
11492         * config/i386/wbnoinvdintrin.h: Ditto.
11493         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11494         wbnoinvdintrin.h.
11495         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11497 2018-03-05  Richard Biener  <rguenther@suse.de>
11499         PR tree-optimization/84670
11500         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11501         member.
11502         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11503         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11504         (compute_antic_aux): Only assert the number of values in ANTIC_IN
11505         doesn't grow if all successors (recursively) were visited at least
11506         once.
11508 2018-03-05  Richard Biener  <rguenther@suse.de>
11510         PR tree-optimization/84650
11511         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11512         if executed in the loop pipeline.
11514 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
11516         * doc/configfiles.texi (Configuration Files): Move info about
11517         conditionalizing $target-protos.h to...
11518         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
11519         differs from $target-protos.h.
11521 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
11522             Chung-Ju Wu  <jasonwucj@gmail.com>
11524         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11525         * config/nds32/nds32-multiple.md (setmemsi): Define.
11526         * config/nds32/nds32-memory-manipulation.c
11527         (nds32_gen_dup_4_byte_to_word_value): New.
11528         (emit_setmem_word_loop): New.
11529         (emit_setmem_byte_loop): New.
11530         (nds32_expand_setmem_loop): New.
11531         (nds32_expand_setmem_loop_v3m): New.
11532         (nds32_expand_setmem_unroll): New.
11533         (nds32_expand_setmem): New.
11535 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11536             Chung-Ju Wu  <jasonwucj@gmail.com>
11538         * config/nds32/nds32-memory-manipulation.c
11539         (nds32_emit_load_store): New.
11540         (nds32_emit_post_inc_load_store): New.
11541         (nds32_emit_mem_move): New.
11542         (nds32_emit_mem_move_block): New.
11543         (nds32_expand_movmemsi_loop_unknown_size): New.
11544         (nds32_expand_movmemsi_loop_known_size): New.
11545         (nds32_expand_movmemsi_loop): New.
11546         (nds32_expand_movmemsi_unroll): New.
11547         (nds32_expand_movmemqi): Rename ...
11548         (nds32_expand_movmemsi): ... to this.
11549         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11550         (movmemsi): ... to this.
11551         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11552         (nds32_expand_movmemsi): ... to this.
11554 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11555             Monk Chiang  <sh.chiang04@gmail.com>
11556             Chung-Ju Wu  <jasonwucj@gmail.com>
11558         * config/nds32/nds32-protos.h
11559         (nds32_expand_load_multiple): New arguments.
11560         (nds32_expand_store_multiple): Ditto.
11561         (nds32_valid_multiple_load_store): Rename ...
11562         (nds32_valid_multiple_load_store_p): ... to this.
11563         * config/nds32/nds32-memory-manipulation.c
11564         (nds32_expand_load_multiple): Refine implementation.
11565         (nds32_expand_store_multiple): Ditto.
11566         * config/nds32/nds32-multiple.md
11567         (load_multiple): Update nds32_expand_load_multiple interface.
11568         (store_multiple): Update nds32_expand_store_multiple interface.
11569         * config/nds32/nds32-predicates.c
11570         (nds32_valid_multiple_load_store): Rename ...
11571         (nds32_valid_multiple_load_store_p): ... to this and refine
11572         implementation.
11573         * config/nds32/predicates.md
11574         (nds32_load_multiple_and_update_address_operation): New predicate.
11575         (nds32_store_multiple_and_update_address_operation): New predicate.
11577 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11578             Chung-Ju Wu  <jasonwucj@gmail.com>
11580         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11581         (combo): New attribute.
11582         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11584 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11586         * config/nds32/nds32.opt: Change -mcmodel= default value.
11588 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
11589             Monk Chiang  <sh.chiang04@gmail.com>
11590             Chung-Ju Wu  <jasonwucj@gmail.com>
11592         * config/nds32/constants.md (unspec_element): New enum.
11593         * config/nds32/constraints.md (Umw): New constraint.
11594         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11595         * config/nds32/nds32-intrinsic.md: Likewise.
11596         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11597         (nds32_valid_smw_lwm_base_p): New.
11598         (nds32_output_smw_single_word): New.
11599         (nds32_output_lmw_single_word): New.
11600         (nds32_expand_unaligned_load): New.
11601         (nds32_expand_unaligned_store): New.
11602         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11603         (nds32_output_smw_single_word): Declare.
11604         (nds32_output_lmw_single_word): Declare.
11605         (nds32_expand_unaligned_load): Declare.
11606         (nds32_expand_unaligned_store): Declare.
11607         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11608         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11609         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11610         NDS32_BUILTIN_UASTORE_DW.
11611         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11612         predicate.
11614 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
11615             Kito Cheng  <kito.cheng@gmail.com>
11616             Chung-Ju Wu  <jasonwucj@gmail.com>
11618         * config/nds32/nds32-intrinsic.c
11619         (nds32_expand_builtin_null_ftype_reg): Delete.
11620         (nds32_expand_builtin_reg_ftype_imm): Ditto.
11621         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11622         (nds32_read_argument): New.
11623         (nds32_legitimize_target): Ditto.
11624         (nds32_legitimize_argument): Ditto.
11625         (nds32_check_constant_argument): Ditto.
11626         (nds32_expand_unop_builtin): Ditto.
11627         (nds32_expand_unopimm_builtin): Ditto.
11628         (nds32_expand_binop_builtin): Ditto.
11629         (nds32_builtin_decl_impl): Ditto.
11630         (builtin_description): Ditto.
11631         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11632         (nds32_init_builtins_impl): Ditto.
11633         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11634         (nds32_builtin_decl): New.
11635         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11636         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11638 2018-03-02  Jeff Law  <law@redhat.com>
11640         * reorg.c (stop_search_p): Handle DEBUG_INSN.
11641         (redundant_insn, fill_simple_delay_slots): Likewise.
11642         (fill_slots_from_thread): Likewise.
11643         * resource.c (mark_referenced_resources): Likewise.
11644         (mark_set_resources, find_dead_or_set_registers): Likewise.
11646 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11648         * substring-locations.h (format_warning_va): Formatting fix for
11649         ATTRIBUTE_GCC_DIAG.
11650         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11651         argument.
11652         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11653         * substring-locations.c: Include intl.h.
11654         (format_warning_va): Turned into small wrapper around
11655         format_warning_n_va, renamed to ...
11656         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11657         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11658         use ngettext.
11659         (format_warning_at_substring_n): New function.
11660         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11661         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
11662         format_warning_at_substring with just a shorter name instead of
11663         const function pointer.
11664         (fmtwarn_n): New function.
11665         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11666         appropriate, get rid of all the fmtstr temporaries, move conditionals
11667         with G_() wrapped string literals directly into fmtwarn arguments,
11668         cast dir.len to (int), formatting fixes.
11670 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
11672         * doc/invoke.texi: Remove "Cilk Plus" references.
11674 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11675             Richard Biener  <rguenther@suse.de>
11677         PR ipa/84628
11678         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11679         for error or warning attributes if CALL_FROM_THUNK_P is set.
11680         Formatting fixes.
11682 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11684         PR target/56540
11685         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11686         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11688         PR target/56540
11689         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11690         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11692         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11693         instead of -1U in last predictors element's probability member.
11695 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11697         PR ipa/83983
11698         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11699         arguments if they are comparable.
11701 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11703         PR tree-optimization/84634
11704         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11705         masks and masked_loop_p with a single loop_masks, making sure it's
11706         null for bb vectorization.
11708 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11710         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11711         (vect_analyze_data_ref_access): Use loop->safe_len rather than
11712         loop->force_vectorize to check whether there is no alias.
11714 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11716         PR target/84614
11717         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11718         prototypes.
11719         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11720         comments.
11721         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11722         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11723         instead of a loop around prev_real_insn.
11724         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11725         prev_real_insn.
11727         PR inline-asm/84625
11728         * config/i386/i386.c (ix86_print_operand): Use conditional
11729         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11730         zero vector.
11732 2018-03-02  Richard Biener  <rguenther@suse.de>
11734         PR tree-optimization/84427
11735         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11736         (bitmap_set_subtract_values): Rewrite to handle multiple
11737         exprs per value.
11738         (clean): Likewise.
11739         (prune_clobbered_mems): Likewise.
11740         (phi_translate): Take edge instead of pred/phiblock.
11741         (phi_translate_1): Likewise.
11742         (phi_translate_set): Likewise.  Insert all translated
11743         exprs for a value into the set, keeping possibly multiple
11744         expressions per value.
11745         (compute_antic_aux): Adjust for phi_translate changes.
11746         When intersecting union the expressions and prune those
11747         not in the final value set, keeping possibly multiple
11748         expressions per value.  Do not use value-insertion
11749         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11750         all expressions.  Add verification that the value-sets
11751         only shrink during iteration.
11752         (compute_partial_antic_aux): Adjust for the phi_translate changes.
11753         (do_pre_regular_insertion): Likewise.
11754         (do_pre_partial_partial_insertion): Likewise.
11756 2018-03-02  Richard Biener  <rguenther@suse.de>
11758         PR target/82005
11759         * config/darwin.c (saved_debug_info_level): New static global.
11760         (darwin_asm_lto_start): Disable debug info generation for LTO out.
11761         (darwin_asm_lto_end): Restore debug info generation settings.
11763 2018-03-01  Martin Liska  <mliska@suse.cz>
11765         PR sanitizer/82484
11766         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11767         volatile arguments.
11769 2018-03-01  Richard Biener  <rguenther@suse.de>
11771         PR debug/84645
11772         * dwarf2out.c (gen_variable_die): Properly handle late VLA
11773         type annotation with LTO when debug was disabled at compile-time.
11775 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
11777         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11778         XINT with INTVAL.
11779         (mips_final_postscan_insn): Likewise.
11781 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
11783         PR rtl-optimization/84528
11784         * alias.c (init_alias_target): Add commentary.
11785         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11786         a unique base value if the frame pointer is not eliminated
11787         to the stack pointer.
11789 2018-03-01  Tom de Vries  <tom@codesourcery.com>
11791         PR rtl-optimization/83327
11792         * lra-int.h (hard_regs_spilled_into): Declare.
11793         * lra.c (hard_regs_spilled_into): Define.
11794         (init_reg_info): Init hard_regs_spilled_into.
11795         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11796         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11797         (process_bb_lives): Handle hard_regs_spilled_into.
11798         (lra_create_live_ranges_1): Before doing liveness propagation, clear
11799         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11801 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
11803         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11804         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11805         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11806         * config/rs6000/aix72.h: New file.
11808 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
11810         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11811         instead of warning_at with conditional singular and plural messages
11812         where possible.
11814         PR target/52991
11815         * stor-layout.c (update_alignment_for_field): For
11816         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11817         && !DECL_PACKED (field), do the alignment update, just use
11818         only desired_align instead of MAX (type_align, desired_align)
11819         as the alignment.
11820         (place_field): Don't do known_align < desired_align handling
11821         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11822         is non-NULL, instead do it after rli->prev_field handling and
11823         only if not within a bitfield word.  For DECL_PACKED (field)
11824         use type_align of BITS_PER_UNIT.
11826 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
11828         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11829         superfluous parentheses and trailing spaces.
11831 2018-02-28  Richard Biener  <rguenther@suse.de>
11833         PR tree-optimization/84584
11834         * graphite-scop-detection.c (scop_detection::add_scop): Discard
11835         SCoPs with fake exit edge.
11837 2018-02-28  Martin Liska  <mliska@suse.cz>
11839         PR testsuite/84597
11840         * timevar.c (timer::print): Fix format to properly print 100%
11841         values.
11843 2018-02-28  Richard Biener  <rguenther@suse.de>
11845         PR middle-end/84607
11846         * genmatch.c (capture_info::walk_match): Do not mark
11847         captured expressions without operands as expr_p given
11848         they act more like predicates and should be subject to
11849         "lost tail" side-effect preserving.
11851 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
11853         PR rtl-optimization/81611
11854         * auto-inc-dec.c (attempt_change): Move dead note from
11855         mem_insn if it's the next use of regno
11856         (find_address): Take address use of reg holding
11857         non-incremented value.  Add parm to limit search to the named
11858         reg only.
11859         (merge_in_block): Attempt to use a mem insn that is the next
11860         use of the original regno.
11862 2018-02-27  Martin Sebor  <msebor@redhat.com>
11864         PR c++/83871
11865         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11866         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11868 2018-02-27  Martin Sebor  <msebor@redhat.com>
11870         PR translation/84207
11871         * diagnostic-core.h (warning_n, error_n, inform_n): Change
11872         n argument to unsigned HOST_WIDE_INT.
11873         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11874         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
11875         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11876         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11878 2018-02-27  Richard Biener  <rguenther@suse.de>
11880         PR tree-optimization/84512
11881         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11882         Do not use the estimate returned from record_stmt_cost for
11883         the scalar iteration cost but sum properly using add_stmt_cost.
11885 2018-02-27  Richard Biener  <rguenther@suse.de>
11887         PR tree-optimization/84466
11888         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11889         Adjust last change to less strictly validate use operands.
11891 2018-02-27  Martin Liska  <mliska@suse.cz>
11893         PR gcov-profile/84548
11894         * gcov.c (process_file): Allow partial overlap and consider it
11895         also as group functions.
11896         (output_lines): Properly calculate range of lines for a group.
11898 2018-02-27  Martin Liska  <mliska@suse.cz>
11900         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11901         'ggc' suffixes.  Change first column width.
11902         (timer::print): Fix formatting of the column.
11904 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
11906         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11907         preserve inline entry blocks for the sake of debug inline
11908         entry point markers alone.
11909         (remove_unused_locals): Suggest in comments a better place to
11910         force the preservation of inline entry blocks that are
11911         otherwise unused, but do not preserve them.
11913 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11915         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11917 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11919         PR target/84039
11920         * config/i386/constraints.md (Bs): Replace
11921         ix86_indirect_branch_register with
11922         TARGET_INDIRECT_BRANCH_REGISTER.
11923         (Bw): Likewise.
11924         * config/i386/i386.md (indirect_jump): Likewise.
11925         (tablejump): Likewise.
11926         (*sibcall_memory): Likewise.
11927         (*sibcall_value_memory): Likewise.
11928         Peepholes of indirect call and jump via memory: Likewise.
11929         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11930         (*sibcall_value_GOT_32): Likewise.
11931         * config/i386/predicates.md (indirect_branch_operand): Likewise.
11932         (GOT_memory_operand): Likewise.
11933         (call_insn_operand): Likewise.
11934         (sibcall_insn_operand): Likewise.
11935         (GOT32_symbol_operand): Likewise.
11936         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11938 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11940         PR rtl-optimization/83496
11941         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11942         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
11943         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11944         redundant insn, if any.
11945         (relax_delay_slots): Likewise.
11946         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11948 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
11950         PR tree-optimization/83965
11951         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11952         that grouped statements are part of a reduction chain.  Return
11953         true if the statement is not marked as a reduction itself but
11954         is part of a group.
11955         (vect_recog_dot_prod_pattern): Don't check whether the statement
11956         is part of a group here.
11957         (vect_recog_sad_pattern): Likewise.
11958         (vect_recog_widen_sum_pattern): Likewise.
11960 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11962         PR debug/84545
11963         * final.c (rest_of_clean_state): Also look for calls inside sequences.
11965 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11967         PR target/84530
11968         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11969         the bool argument.
11970         (ix86_output_indirect_function_return): New prototype.
11971         (ix86_split_simple_return_pop_internal): Likewise.
11972         * config/i386/i386.c (indirect_return_via_cx): New.
11973         (indirect_return_via_cx_bnd): Likewise.
11974         (indirect_thunk_name): Handle return va CX_REG.
11975         (output_indirect_thunk_function): Create alias for
11976         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11977         (ix86_output_indirect_jmp): Remove the bool argument.
11978         (ix86_output_indirect_function_return): New function.
11979         (ix86_split_simple_return_pop_internal): Likewise.
11980         * config/i386/i386.md (*indirect_jump): Don't pass false
11981         to ix86_output_indirect_jmp.
11982         (*tablejump_1): Likewise.
11983         (simple_return_pop_internal): Change it to define_insn_and_split.
11984         Call ix86_split_simple_return_pop_internal to split it for
11985         -mfunction-return=.
11986         (simple_return_indirect_internal): Call
11987         ix86_output_indirect_function_return instead of
11988         ix86_output_indirect_jmp.
11990 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
11992         PR bootstrap/84405
11993         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11994         memset and value initialization afterwards.
11996 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
11998         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12000 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12002         PR target/84521
12003         * common/config/aarch64/aarch64-common.c
12004         (aarch_option_optimization_table[]): Switch
12005         off fomit-frame-pointer
12007 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
12008             Chung-Ju Wu  <jasonwucj@gmail.com>
12010         * config/nds32/nds32-multiple.md (load_multiple): Disallow
12011         volatile memory.
12012         (store_multiple): Ditto.
12014 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
12016         * config.gcc: Add --with-cpu support for nds32 target.
12017         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12018         * config/nds32/nds32.opt: Add -mcpu= option.
12020 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
12022         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12023         isel=yes): Warn for these deprecated options.
12025 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
12027         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12028         ISA_2_5_MASKS_EMBEDDED.
12030 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
12032         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12033         p->max as pointers rather than using iterative_hash_expr.
12035 2018-02-23  Carl Love  <cel@us.ibm.com>
12037         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12038         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12039         BU_P8V_OVERLOAD_2.
12040         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12041         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12042         P8V_BUILTIN_VEC_VUNSIGNED2.
12044 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
12046         PR target/81572
12047         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12048         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12049         LRA_UNKNOWN_ALT.
12050         * lra-constraints.c (curr_insn_transform): Set up
12051         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
12052         LRA_UNKNOWN_ALT.
12053         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12054         * lra-eliminations.c (spill_pseudos): Ditto.
12055         (process_insn_for_elimination): Ditto.
12056         * lra-lives.c (reg_early_clobber_p): Use the new macros.
12057         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12058         LRA_NON_CLOBBERED_ALT.
12060 2018-02-22  Martin Sebor  <msebor@redhat.com>
12062         PR tree-optimization/84480
12063         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12064         to maybe_diag_stxncpy_trunc.  Call it.
12065         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12066         from gimple_fold_builtin_strcpy.  Print inlining stack.
12067         (handle_builtin_stxncpy): Print inlining stack.
12068         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12070 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
12072         PR target/84176
12073         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12074         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12075         and -fcheck-pointer-bounds are used together.
12076         (indirect_thunk_prefix): New enum.
12077         (indirect_thunk_need_prefix): New function.
12078         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
12079         "_nt" instead of "_bnd" for NOTRACK prefix.
12080         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12081         (output_indirect_thunk_function): Likewise.
12082         (): Likewise.
12083         (ix86_code_end): Update output_indirect_thunk_function calls.
12084         (ix86_output_indirect_branch_via_reg): Replace
12085         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12086         (ix86_output_indirect_branch_via_push): Likewise.
12087         (ix86_output_function_return): Likewise.
12088         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12089         incompatible with -fcf-protection=branch and
12090         -fcheck-pointer-bounds.
12092 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12094         PR target/83335
12095         * config/aarch64/aarch64.c (aarch64_print_address_internal):
12096         Change gcc_assert call to output_operand_lossage.
12098 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12100         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12102 2018-02-22  DJ Delorie  <dj@redhat.com>
12103             Sebastian Perta  <sebastian.perta@renesas.com>
12104             Oleg Endo  <olegendo@gcc.gnu.org>
12106         * config/rx/rx.c (rx_rtx_costs): New function.
12107         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12109 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12111         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12113 2018-02-22  Martin Liska  <mliska@suse.cz>
12115         PR driver/83193
12116         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12117         Add "native" as a possible value.
12119 2018-02-22  Martin Liska  <mliska@suse.cz>
12121         PR driver/83193
12122         * config/i386/i386.c (ix86_option_override_internal):
12123         Add "native" as a possible value for -march and -mtune.
12125 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
12127         PR target/84502
12128         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12129         to all type variants.
12131         PR tree-optimization/84503
12132         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12133         width as info->bitpos + info->bitsize - start.
12134         (merged_store_group::merge_overlapping): Simplify width computation.
12135         (check_no_overlap): New function.
12136         (imm_store_chain_info::try_coalesce_bswap): Compute expected
12137         start + width and last_order of the group, fail if check_no_overlap
12138         fails.
12139         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12140         to group if check_no_overlap fails.
12142 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12144         * config/rs6000/altivec.md: Delete contraint arguments to
12145         define_expand, define_split, and define_peephole2, and in
12146         define_insn_and_split if always unused.
12147         * config/rs6000/darwin.md: Ditto.
12148         * config/rs6000/dfp.md: Ditto.
12149         * config/rs6000/rs6000.md: Ditto.
12150         * config/rs6000/sync.md: Ditto.
12151         * config/rs6000/vector.md: Ditto.
12152         * config/rs6000/vsx.md: Ditto.
12154 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12156         * config/rs6000/altivec.md: Write output control strings as braced
12157         blocks instead of double-quoted strings.
12158         * config/rs6000/darwin.md: Ditto.
12159         * config/rs6000/rs6000.md: Ditto.
12160         * config/rs6000/vector.md: Ditto.
12161         * config/rs6000/vsx.md: Ditto.
12163 2018-02-21  Jason Merrill  <jason@redhat.com>
12165         PR c++/84314 - ICE with templates and fastcall attribute.
12166         * attribs.c (build_type_attribute_qual_variant): Remove assert.
12168 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12170         * ipa-cp.c (determine_versionability): Fix comment typos.
12172 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12174         PR c/84229
12175         * ipa-cp.c (determine_versionability): Do not version functions caling
12176         va_arg_pack.
12178 2018-02-21  Martin Liska  <mliska@suse.cz>
12180         PR driver/83193
12181         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12182         Add "native" as a possible value.
12183         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
12184         the macro when native cpu detection is available.
12186 2018-02-21  Martin Liska  <mliska@suse.cz>
12188         PR driver/83193
12189         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12190         Add "native" as a possible value.
12191         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12192         when native cpu detection is available.
12194 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
12195             Martin Sebor  <msebor@redhat.com>
12197         PR tree-optimization/84478
12198         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12199         false.
12200         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12201         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12202         support which is conservatively correct, for 2 only stay conservative
12203         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
12204         argument to the 2 argument get_range_strlen, adjust 6 arg
12205         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12206         false.
12207         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12208         (gimple_fold_builtin_strlen): Pass true as last argument to
12209         get_range_strlen.
12211 2018-02-20  Martin Sebor  <msebor@redhat.com>
12213         PR middle-end/84095
12214         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12215         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
12216         (builtin_memref::builtin_memref): Factor out parts into
12217         set_base_and_offset and call it.
12219 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12221         PR middle-end/84406
12222         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12223         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12224         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
12225         search at the associated MODE_INT.
12227 2018-02-20  Jeff Law  <law@redhat.com>
12229         PR middle-end/82123
12230         PR tree-optimization/81592
12231         PR middle-end/79257
12232         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12233         for range data rather than using global data.
12234         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12235         range data rather than using global data.
12236         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12237         pass it to children as needed.
12238         (struct directive::fmtresult): Similarly.
12239         (struct directive::set_width): Similarly.
12240         (struct directive::set_precision): Similarly.
12241         (format_integer, format_directive, parse_directive): Similarly.
12242         (format_none): Accept unnamed vr_values parameter.
12243         (format_percent, format_floating, format_character): Similarly.
12244         (format_string, format_plain): Similarly.
12245         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12246         the EVRP range analyzer for range data rather than using global data.
12247         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12248         gimple-ssa-evrp-analyze.h
12249         (class sprintf_dom_walker): Add after_dom_children member function.
12250         Add evrp_range_analyzer member.
12251         (sprintf_dom_walker::before_dom_children): Call into the EVRP
12252         range analyzer as needed.
12253         (sprintf_dom_walker::after_dom_children): New member function.
12254         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12255         if not optimizing.
12256         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12257         (evrp_range_analyzer::pop_to_marker): Likewise.
12259 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12261         PR tree-optimization/84419
12262         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12263         with the required type if its current type is compatible but
12264         different.
12266 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
12268         PR middle-end/82004
12269         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12270         after vectorization.
12272 2018-02-20  Martin Liska  <mliska@suse.cz>
12274         PR driver/83193
12275         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12276         possible values if we don't have a hint.
12278 2018-02-20  Martin Liska  <mliska@suse.cz>
12280         PR c/84310
12281         PR target/79747
12282         * final.c (shorten_branches): Build align_tab array with one
12283         more element.
12284         * opts.c (finish_options): Add alignment option limit check.
12285         (MAX_CODE_ALIGN): Likewise.
12286         (MAX_CODE_ALIGN_VALUE): Likewise.
12287         * doc/invoke.texi: Document maximum allowed option value for
12288         all -falign-* options.
12290 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
12292         PR target/84146
12293         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12294         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12295         * var-tracking.c (emit_note_insn_var_location): Remove all references
12296         to NOTE_INSN_CALL_ARG_LOCATION.
12297         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12298         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12299         Use copy_rtx_if_shared.
12300         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12301         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12302         (dwarf2out_var_location): Remove handling of
12303         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12304         on call_insn.
12305         * final.c (final_scan_insn): Remove all references to
12306         NOTE_INSN_CALL_ARG_LOCATION.
12307         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
12308         before dumping final insns.
12309         * except.c (emit_note_eh_region_end): Remove all references to
12310         NOTE_INSN_CALL_ARG_LOCATION.
12311         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12312         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12313         * config/arc/arc.c (hwloop_optimize): Likewise.
12314         * config/arm/arm.c (create_fix_barrier): Likewise.
12315         * config/s390/s390.c (s390_chunkify_start): Likewise.
12316         * config/sh/sh.c (find_barrier): Likewise.
12317         * config/i386/i386.c (rest_of_insert_endbranch,
12318         ix86_seh_fixup_eh_fallthru): Likewise.
12319         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12320         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12321         * config/frv/frv.c (frv_function_prologue): Likewise.
12322         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
12323         reg note.
12324         (note_outside_basic_block_p): Remove all references to
12325         NOTE_INSN_CALL_ARG_LOCATION.
12326         * gengtype.c (adjust_field_rtx_def): Likewise.
12327         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12328         Likewise.
12329         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12330         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12332         PR c++/84444
12333         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12334         is ADDR_EXPR.
12336         PR tree-optimization/84452
12337         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12338         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12339         is NULL.
12341 2018-02-19  Martin Liska  <mliska@suse.cz>
12343         PR sanitizer/82183
12344         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12346 2018-02-19  Martin Liska  <mliska@suse.cz>
12347             Richard Sandiford  <richard.sandiford@linaro.org>
12349         PR tree-optimization/82491
12350         * gimple-fold.c (get_base_constructor): Make earlier bail out
12351         to prevent ubsan.
12353 2018-02-19  Carl Love  <cel@us.ibm.com>
12355         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12356         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12357         BU_P8V_OVERLOAD_1.
12358         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12359         P8V_BUILTIN_VEC_NEG.
12361 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
12363         * config/rl78/rl78.md (movdf): New define expand.
12365 2018-02-19  Martin Liska  <mliska@suse.cz>
12367         PR other/80589
12368         * doc/invoke.texi: Fix typo.
12369         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12371 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
12373         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12374         handle rs6000_single_float and rs6000_double_float specially for
12375         e500 family CPUs.
12377 2018-02-16  Jeff Law  <law@redhat.com>
12379         * config/rx/rx.c (add_pop_cfi_notes): New function.;
12380         (pop_regs): Use it.
12382 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12384         PR ipa/84425
12385         * ipa-inline.c (inline_small_functions): Fix a typo.
12387 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12389         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12391 2018-02-16  Carl Love  <cel@us.ibm.com>
12393         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12394         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12395         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12396         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12397         expansion to P8V_BUILTIN_VEC_FLOAT2.
12399 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
12401         PR rtl-optimization/70023
12402         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12403         src_regno into account.
12405 2018-02-16  Carl Love  <cel@us.ibm.com>
12407         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12408         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12409         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12410         * config/rs6000/rs6000.c: Remove case statements for
12411         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12412         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12413         and P9V_BUILTIN_VEC_VINSERT4B.
12414         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12415         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12416         * config/rs6000/vsx.md:
12417         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12418         vec_insert4b.
12420 2018-02-16  Carl Love  <cel@us.ibm.com>
12422         * config/rs6000/altivec.h: Add builtin names vec_extract4b
12423         vec_insert4b.
12424         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12425         definitions.
12426         * config/rs6000/rs6000-c.c: Add the definitions for
12427         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12428         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12429         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12430         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
12431         definition for insert4b and define insn *insert3b_internal.
12432         * doc/extend.texi: Add documentation for vec_extract4b.
12434 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12436         * doc/extend.texi (Backwards Compatibility): Mention friend
12437         injection.  Note for-scope is deprecated.
12438         * doc/invoke.texi (-ffriend-injection): Deprecate.
12440 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
12442         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12443         that moved to I2, also allow destinations that are a paradoxical
12444         subreg (instead of a normal reg).
12446 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
12448         PR target/83831
12449         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12450         to QImode.
12452 2018-02-16  Richard Biener  <rguenther@suse.de>
12454         PR tree-optimization/84037
12455         PR tree-optimization/84016
12456         PR target/82862
12457         * config/i386/i386.c (ix86_builtin_vectorization_cost):
12458         Adjust vec_construct for the fact we need additional higher latency
12459         128bit inserts for AVX256 and AVX512 vector builds.
12460         (ix86_add_stmt_cost): Scale vector construction cost for
12461         elementwise loads.
12463 2018-02-16  Richard Biener  <rguenther@suse.de>
12465         PR tree-optimization/84417
12466         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12467         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12468         (non_rewritable_lvalue_p): Likewise, use poly-ints.
12470 2018-02-16  Martin Liska  <mliska@suse.cz>
12472         PR sanitizer/84307
12473         * internal-fn.def (ASAN_CHECK): Set proper flags.
12474         (ASAN_MARK): Likewise.
12476 2018-02-16  Julia Koval  <julia.koval@intel.com>
12478         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12479         from PTA_CANNONLAKE.
12481 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12483         PR target/84272
12484         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12485         Use ++iter rather than iter++ for std::list iterators.
12486         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
12487         defer deleting them until all nodes in the forest are processed.  Do
12488         free even leaf nodes.  Change to_process into auto_vec.
12490         PR bootstrap/84405
12491         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12492         * vec.h (vec_default_construct): Use memset instead of placement new
12493         if BROKEN_VALUE_INITIALIZATION is defined.
12494         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12495         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12496         is defined.
12498         PR rtl-optimization/83723
12499         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12500         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
12501         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
12502         recursive calls.
12503         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12504         callers.
12505         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12507 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
12509         PR rtl-optimization/81443
12510         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12511         from inner REGs to paradoxical SUBREGs.
12513 2018-02-16  Richard Biener  <rguenther@suse.de>
12515         PR tree-optimization/84399
12516         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12517         For operands we can analyze at their definition make sure we can
12518         analyze them at each use as well.
12520 2018-02-16  Richard Biener  <rguenther@suse.de>
12522         PR tree-optimization/84190
12523         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12524         volatile accesses if the decl isn't volatile.
12526 2018-02-15  Jason Merrill  <jason@redhat.com>
12528         PR c++/84314 - ICE with templates and fastcall attribute.
12529         * attribs.c (build_type_attribute_qual_variant): Don't clobber
12530         TYPE_CANONICAL on an existing type.
12532 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
12534         PR tree-optimization/84383
12535         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12536         dstoff nor call operand_equal_p if dstbase is NULL.
12538         PR tree-optimization/84334
12539         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12540         also a CONSTANT_CLASS_P, punt.
12542 2018-02-14  Jim Wilson  <jimw@sifive.com>
12544         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12545         first SMALL_OPERAND check.  New local min_second_step.  Move assert
12546         to where locals are set.  Add TARGET_RVC support.
12547         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12549 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
12551         * doc/invoke.texi: Correct -Wformat-overflow code sample.
12553 2018-02-14  Martin Sebor  <msebor@redhat.com>
12555         PR tree-optimization/83698
12556         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12557         arrays constrain the offset range to their bounds.
12558         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12559         (builtin_access::overlap): Avoid setting the size of overlap if it's
12560         already been set.
12561         (maybe_diag_overlap): Also consider arrays when deciding what values
12562         of offsets to include in diagnostics.
12564 2018-02-14  Martin Sebor  <msebor@redhat.com>
12566         PR c/84108
12567         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12568         that correspond to the kind of a declaration.
12570 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
12572         PR target/83984
12573         * config/pa/pa.md: Load address of PIC label using the linkage table
12574         if the label is nonlocal.
12576 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12578         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12579         warning message if user requests -maltivec=be.
12580         * doc/invoke.texi: Document deprecation of -maltivec=be.
12582 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
12584         PR target/84220
12585         * config/rs6000/rs6000-c.c: Update definitions for
12586         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12587         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12589 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12591         PR target/84239
12592         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12593         add _get_ssp intrinsics. Remove argument from
12594         __builtin_ia32_rdssp[d|q].
12595         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12596         * config/i386/i386-builtin.def: Remove argument from
12597         __builtin_ia32_rdssp[d|q].
12598         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12599         ix86_expand_special_args_builtin for _rdssp[d|q].
12600         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12601         Clear register before usage.
12602         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12603         Add documentation for new _get_ssp and _inc_ssp intrinsics.
12605 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
12607         PR tree-optimization/84357
12608         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12609         operand 1 of an ARRAY_REF too.
12611 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
12613         PR target/83831
12614         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12615         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12616         declarations.
12617         (set_of_reg): New struct.
12618         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12619         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12620         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12621         functions.
12622         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12623         Split into bitclr, bitset, bitinvert patterns if appropriate.
12624         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12625         use rx_fuse_in_memory_bitop.
12626         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12627         to named insn, correct maximum insn length.
12629 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
12631         PR target/79242
12632         * machmode.def: Define a complex mode for PARTIAL_INT.
12633         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12634         MODE_PARTIAL_INT.
12635         * doc/rtl.texi: Document CSPImode.
12636         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12637         handling.
12638         (msp430_hard_regno_nregs_with_padding): Likewise.
12640 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
12642         PR target/84279
12643         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12645 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
12647         PR rtl-optimization/84169
12648         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
12649         we generated a parallel as new i3 and we split that to new i2 and i3
12650         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
12651         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
12652         those to i2, not i1.  Partially rewrite this scan code.
12654 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12656         PR c/82210
12657         * stor-layout.c (place_field): For variable length fields, adjust
12658         offset_align afterwards not just based on the field's alignment,
12659         but also on the size.
12661         PR middle-end/84309
12662         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12663         of exps and logs in the use_exp2 case.
12665 2018-02-13  Jeff Law  <law@redhat.com>
12667         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12668         entry for "vector".
12670         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12671         ARGS as unused.
12673 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
12675         PR debug/84342
12676         PR debug/84319
12677         * common.opt (gas-loc-support, gas-locview-support): New.
12678         (ginline-points, ginternal-reset-location-views): New.
12679         * doc/invoke.texi: Document them.  Use @itemx where intended.
12680         (gvariable-location-views): Adjust.
12681         * target.def (reset_location_view): New.
12682         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12683         (TARGET_RESET_LOCATION_VIEW): New.
12684         * doc/tm.texi: Rebuilt.
12685         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12686         (dwarf2out_default_as_locview_support): New.
12687         (output_asm_line_debug_info): Use option variables.
12688         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12689         (output_loc_list): Likewise.
12690         (add_high_low_attributes): Check option variables.
12691         Don't output entry view attribute in strict mode.
12692         (gen_inlined_subroutine_die): Check option variables.
12693         (dwarf2out_inline_entry): Likewise.
12694         (init_sections_and_labels): Likewise.
12695         (dwarf2out_early_finish): Likewise.
12696         (maybe_reset_location_view): New, from...
12697         (dwarf2out_var_location): ... here.  Call it.
12698         * debug.h (dwarf2out_default_as_loc_support): Declare.
12699         (dwarf2out_default_as_locview_support): Declare.
12700         * hooks.c (hook_int_rtx_insn_0): New.
12701         * hooks.h (hook_int_rtx_insn_0): Declare.
12702         * toplev.c (process_options): Take -gas-loc-support and
12703         -gas-locview-support from dwarf2out.  Enable
12704         -gvariable-location-views by default only with locview
12705         assembler support.  Enable -ginternal-reset-location-views by
12706         default only if the target defines the corresponding hook.
12707         Enable -ginline-points by default if location views are
12708         enabled; force it disabled if statement frontiers are
12709         disabled.
12710         * tree-inline.c (expand_call_inline): Check option variables.
12711         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12713 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
12715         PR tree-optimization/84321
12716         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12717         handling.  Also check whether the anti-range contains any values
12718         that satisfy the mask; switch to a VR_RANGE if not.
12720 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
12722         PR sanitizer/84340
12723         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12725 2018-02-13  Martin Jambor  <mjambor@suse.cz>
12727         PR c++/83990
12728         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12729         of call statements, also set location of a load to a temporary.
12731 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
12733         * config/rl78/rl78.c (add_vector_labels): New function.
12734         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12735         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12736         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12737         which checks that no arguments are passed.
12738         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12739         * doc/extend.texi: Documentation for the new attribute.
12741 2018-02-13  Andreas Schwab  <schwab@suse.de>
12743         * config/riscv/linux.h (CPP_SPEC): Define.
12745 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12747         PR target/84335
12748         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12749         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12750         OPTION_MASK_ISA_AES as first argument to def_builtin_const
12751         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12752         instead of OPTION_MASK_ISA_PCLMUL as first argument to
12753         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12754         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12755         temporarily for AES and PCLMUL builtins.
12757         PR tree-optimization/84339
12758         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12759         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12760         Formatting fixes.
12762         PR middle-end/84309
12763         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12764         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12765         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12766         inline function.
12767         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12768         inline function.
12769         * omp-simd-clone.h: New file.
12770         * omp-simd-clone.c: Include omp-simd-clone.h.
12771         (expand_simd_clones): No longer static.
12772         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12773         cgraph.h and omp-simd-clone.h.
12774         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12775         (vect_recog_widen_shift_pattern): Formatting fix.
12776         (vect_pattern_recog_1): Don't check optab for calls.
12778         PR target/84336
12779         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12780         operands[2] into a REG before using gen_lowpart on it.
12782 2018-02-12  Jeff Law  <law@redhat.com>
12784         PR target/83760
12785         * config/sh/sh.c (find_barrier): Consider a sibling call
12786         a barrier as well.
12788         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12789         successfully back substituting a reg.
12791 2018-02-12  Richard Biener  <rguenther@suse.de>
12793         PR tree-optimization/84037
12794         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12795         parameter, move visited init to caller.
12796         (vect_slp_analyze_operations): Separate cost from validity
12797         check, initialize visited once for all instances.
12798         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12799         for all instances.
12800         * tree-vect-stmts.c (vect_model_simple_cost): Make early
12801         out an assert.
12802         (vect_model_promotion_demotion_cost): Likewise.
12803         (vectorizable_bswap): Guard cost modeling with !slp_node
12804         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12805         SLP stmts.
12806         (vectorizable_call): Likewise.
12807         (vectorizable_conversion): Likewise.
12808         (vectorizable_assignment): Likewise.
12809         (vectorizable_shift): Likewise.
12810         (vectorizable_operation): Likewise.
12811         (vectorizable_store): Likewise.
12812         (vectorizable_load): Likewise.
12813         (vectorizable_condition): Likewise.
12814         (vectorizable_comparison): Likewise.
12816 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
12818         PR sanitizer/84307
12819         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12820         (ASAN_MARK): Fix fnspec to account for return value, change pointer
12821         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12823 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
12825         PR middle-end/83665
12826         * params.def (inline-min-speedup): Increase from 8 to 15.
12827         (max-inline-insns-auto): Decrease from 40 to 30.
12828         * ipa-split.c (consider_split): Add some buffer for function to
12829         be considered inlining candidate.
12830         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12831         default values.
12833 2018-02-12  Richard Biener  <rguenther@suse.de>
12835         PR tree-optimization/84037
12836         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
12837         matched stmts if we cannot swap the non-matched ones.
12839 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12841         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
12842         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
12843         _mm_maskz_scalef_round_ss): New intrinsics.
12844         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
12845         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
12846         __builtin_ia32_scalefss_round): Remove.
12847         (__builtin_ia32_scalefsd_mask_round,
12848         __builtin_ia32_scalefss_mask_round): New intrinsics.
12849         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
12850         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
12851         ((match_operand:VF_128 2 "<round_nimm_predicate>"
12852         "<round_constraint>")): Changed to ...
12853         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
12854         "<round_scalar_constraint>")): ... this.
12855         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
12856         %0, %1, %2<round_op3>}"): Changed to ...
12857         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
12858         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
12859         %2<round_scalar_mask_op3>}"): ... this.
12860         * config/i386/subst.md (round_scalar_nimm_predicate): New.
12862 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12864         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12865         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12866         (_mm_maskz_sqrt_round_ss): New intrinsics.
12867         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12868         (__builtin_ia32_sqrtsd_mask_round)
12869         (__builtin_ia32_sqrtss_mask_round): New builtins.
12870         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12871         (__builtin_ia32_sqrtss_round): Remove.
12872         (__builtin_ia32_sqrtsd_mask_round)
12873         (__builtin_ia32_sqrtss_mask_round): New builtins.
12874         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12875         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12876         ((match_operand:VF_128 1 "vector_operand"
12877         "xBm,<round_constraint>")): Changed to ...
12878         ((match_operand:VF_128 1 "vector_operand"
12879         "xBm,<round_scalar_constraint>")): ... this.
12880         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12881         %0, %2, %<iptr>1<round_op3>}): Changed to ...
12882         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12883         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12884         %<iptr>1<round_scalar_mask_op3>}): ... this.
12885         ((set_attr "prefix" "<round_prefix>")): Changed to ...
12886         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12888 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
12890         PR target/84266
12891         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12892         Cast vec_cmpeq result to correct type.
12893         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12894         Cast vec_cmpgt result to correct type.
12896 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
12898         * final.c (final_scan_insn_1): Renamed from...
12899         (final_scan_insn): ... this.  New wrapper, to recover
12900         seen from the outermost call in recursive ones.
12901         * config/sparc/sparc.c (output_return): Drop seen from call.
12902         (output_sibcall): Likewise.
12903         * config/visium/visium.c (output_branch): Likewise.
12905 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
12907         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12908         function label.
12910 2018-02-10  Alan Modra  <amodra@gmail.com>
12912         PR target/84300
12913         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12914         Specify LR as an input.
12916 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
12918         PR sanitizer/83987
12919         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12920         remove_member_access_dummy_vars): New functions.
12921         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12922         lower_omp_1, execute_lower_omp): Use them.
12924         PR rtl-optimization/84308
12925         * shrink-wrap.c (spread_components): Release todo vector.
12927 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
12929         PR rtl-optimization/57193
12930         * ira-color.c (struct allocno_color_data): Add member
12931         conflict_allocno_hard_prefs.
12932         (update_conflict_allocno_hard_prefs): New.
12933         (bucket_allocno_compare_func): Add a preference based on
12934         conflict_allocno_hard_prefs.
12935         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12936         (color_allocnos): Remove a dead code.  Initiate
12937         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
12939 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12941         PR target/84226
12942         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12943         constraint from =wa to wa.  Avoid a subreg on the output operand,
12944         instead use a pseudo and subreg it in a move.
12945         (p9_xxbrd_<mode>): Changed to ...
12946         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12947         (p9_xxbrd_v2df): New expander.
12948         (p9_xxbrw_<mode>): Changed to ...
12949         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12950         (p9_xxbrw_v4sf): New expander.
12952 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12954         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12956 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
12958         PR target/83926
12959         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12960         multiply in 32-bit mode.
12961         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12962         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12963         mode.
12965 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12967         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12968         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12969         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12970         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12972 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
12974         PR lto/84213
12975         * dwarf2out.c (is_trivial_indirect_ref): New function.
12976         (dwarf2out_late_global_decl): Do not generate a location
12977         attribute for variables that have a non-trivial DECL_VALUE_EXPR
12978         and that are not defined in the current unit.
12980 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12982         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12983         instead of a libcall for UNORDERED.
12985 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
12987         PR target/82641
12988         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12989         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12991 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12993         PR target/PR84295
12994         * config/s390/s390.c (s390_set_current_function): Invoke
12995         s390_indirect_branch_settings also if fndecl didn't change.
12997 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12999         * config/rs6000/rs6000.md (blockage): Set length to zero.
13001 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
13003         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13005 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
13007         PR sanitizer/84285
13008         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13009         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13010         -static-lib*san.
13012         PR debug/84252
13013         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13014         PARALLEL incoming that failed vt_get_decl_and_offset check.
13016         PR middle-end/84237
13017         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13018         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13019         TREE_READONLY bit.
13020         (get_variable_section): For decls in named .bss* sections pass true as
13021         second argument to bss_initializer_p.
13023 2018-02-09  Marek Polacek  <polacek@redhat.com>
13024             Jakub Jelinek  <jakub@redhat.com>
13026         PR c++/83659
13027         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13028         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
13029         Sync some changes from cxx_fold_indirect_ref.
13031 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
13033         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13034         markers.
13035         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13036         (BLOCK_INLINE_ENTRY_LABEL): New.
13037         (dwarf2out_var_location): Disregard inline entry markers.
13038         (inline_entry_data): New struct.
13039         (inline_entry_data_hasher): New hashtable type.
13040         (inline_entry_data_hasher::hash): New.
13041         (inline_entry_data_hasher::equal): New.
13042         (inline_entry_data_table): New variable.
13043         (add_high_low_attributes): Add DW_AT_entry_pc and
13044         DW_AT_GNU_entry_view attributes if a pending entry is found
13045         in inline_entry_data_table.  Add old entry_pc attribute only
13046         if debug nonbinding markers are disabled.
13047         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13048         markers are enabled.
13049         (block_within_block_p, dwarf2out_inline_entry): New.
13050         (dwarf2out_finish): Check that no entries remained in
13051         inline_entry_data_table.
13052         * final.c (reemit_insn_block_notes): Handle inline entry notes.
13053         (final_scan_insn, notice_source_line): Likewise.
13054         (rest_of_clean_state): Skip inline entry markers.
13055         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13056         markers.
13057         * gimple.c (gimple_build_debug_inline_entry): New.
13058         * gimple.h (enum gimple_debug_subcode): Add
13059         GIMPLE_DEBUG_INLINE_ENTRY.
13060         (gimple_build_debug_inline_entry): Declare.
13061         (gimple_debug_inline_entry_p): New.
13062         (gimple_debug_nonbind_marker_p): Adjust.
13063         * insn-notes.def (INLINE_ENTRY): New.
13064         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13065         inline entry marker notes.
13066         (print_insn): Likewise.
13067         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13068         (INSN_DEBUG_MARKER_KIND): Likewise.
13069         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13070         * tree-inline.c (expand_call_inline): Build and insert
13071         debug_inline_entry stmt.
13072         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13073         inline entry blocks early, if nonbind markers are enabled.
13074         (dump_scope_block): Dump fragment info.
13075         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13076         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13077         (gimple_build_debug_inline_entry): New.
13078         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13079         Enable/disable inline entry points too.
13080         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13081         (DEBUG_INSN): Describe inline entry markers.
13083         * common.opt (gvariable-location-views): New.
13084         (gvariable-location-views=incompat5): New.
13085         * config.in: Rebuilt.
13086         * configure: Rebuilt.
13087         * configure.ac: Test assembler for view support.
13088         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13089         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13090         * dwarf2out.c (var_loc_view): New typedef.
13091         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13092         (dwarf2out_locviews_in_attribute): New.
13093         (dwarf2out_locviews_in_loclist): New.
13094         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13095         (enum dw_line_info_opcode): Add LI_adv_address.
13096         (struct dw_line_info_table): Add view.
13097         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13098         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13099         (zero_view_p): New variable.
13100         (ZERO_VIEW_P): New macro.
13101         (output_asm_line_debug_info): New.
13102         (struct var_loc_node): Add view.
13103         (add_AT_view_list, AT_loc_list): New.
13104         (add_var_loc_to_decl): Add view param.  Test it against last.
13105         (new_loc_list): Add view params.  Record them.
13106         (AT_loc_list_ptr): Handle loc and view lists.
13107         (view_list_to_loc_list_val_node): New.
13108         (print_dw_val): Handle dw_val_class_view_list.
13109         (size_of_die): Likewise.
13110         (value_format): Likewise.
13111         (loc_list_has_views): New.
13112         (gen_llsym): Set vl_symbol too.
13113         (maybe_gen_llsym, skip_loc_list_entry): New.
13114         (dwarf2out_maybe_output_loclist_view_pair): New.
13115         (output_loc_list): Output view list or entries too.
13116         (output_view_list_offset): New.
13117         (output_die): Handle dw_val_class_view_list.
13118         (output_dwarf_version): New.
13119         (output_compilation_unit_header): Use it.
13120         (output_skeleton_debug_sections): Likewise.
13121         (output_rnglists, output_line_info): Likewise.
13122         (output_pubnames, output_aranges): Update version comments.
13123         (output_one_line_info_table): Output view numbers in asm comments.
13124         (dw_loc_list): Determine current endview, pass it to new_loc_list.
13125         Call maybe_gen_llsym.
13126         (loc_list_from_tree_1): Adjust.
13127         (add_AT_location_description): Create view list attribute if
13128         needed, check it's absent otherwise.
13129         (convert_cfa_to_fb_loc_list): Adjust.
13130         (maybe_emit_file): Call output_asm_line_debug_info for test.
13131         (dwarf2out_var_location): Reset views as needed.  Precompute
13132         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
13133         attribute.  Set view.
13134         (new_line_info_table): Reset next view.
13135         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13136         (dwarf2out_source_line): Likewise.  Output view resets and labels to
13137         the assembler, or select appropriate line info opcodes.
13138         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13139         (optimize_string_length): Catch it.  Adjust.
13140         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
13141         dw_val_class_view_list, and remove it if no longer needed.
13142         (hash_loc_list): Hash view numbers.
13143         (loc_list_hasher::equal): Compare them.
13144         (optimize_location_lists): Check whether a view list symbol is
13145         needed, and whether the locview attribute is present, and
13146         whether they match.  Remove the locview attribute if no longer
13147         needed.
13148         (index_location_lists): Call skip_loc_list_entry for test.
13149         (dwarf2out_finish): Call output_asm_line_debug_info for test.
13150         Use output_dwarf_version.
13151         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13152         (struct dw_val_node): Add val_view_list.
13153         * final.c (SEEN_NEXT_VIEW): New.
13154         (set_next_view_needed): New.
13155         (clear_next_view_needed): New.
13156         (maybe_output_next_view): New.
13157         (final_start_function): Rename to...
13158         (final_start_function_1): ... this.  Take pointer to FIRST,
13159         add SEEN parameter.  Emit param bindings in the initial view.
13160         (final_start_function): Reintroduce SEEN-less interface.
13161         (final): Rename to...
13162         (final_1): ... this.  Take SEEN parameter.  Output final pending
13163         next view at the end.
13164         (final): Reintroduce seen-less interface.
13165         (final_scan_insn): Output pending next view before switching
13166         sections or ending a block.  Mark the next view as needed when
13167         outputting variable locations.  Notify debug backend of section
13168         changes, and of location view changes.
13169         (rest_of_handle_final): Adjust.
13170         * toplev.c (process_options): Autodetect value for debug variable
13171         location views option.  Warn on incompat5 without -gdwarf-5.
13172         * doc/invoke.texi (gvariable-location-views): New.
13173         (gvariable-location-views=incompat5): New.
13174         (gno-variable-location-views): New.
13176 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
13178         PR tree-optimization/84136
13179         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13180         that the result of find_edge is non-NULL.
13182 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13184         PR target/83008
13185         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13186         storing integer register in SImode.  Fix cost of 256 and 512
13187         byte aligned SSE register store.
13189 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13191         * config/i386/i386.c (ix86_multiplication_cost): Fix
13192         multiplication cost for TARGET_AVX512DQ.
13194 2018-02-08  Marek Polacek  <polacek@redhat.com>
13196         PR tree-optimization/84238
13197         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13198         get_range_strlen.
13200 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13202         PR tree-optimization/84265
13203         * tree-vect-stmts.c (vectorizable_store): Don't treat
13204         VMAT_CONTIGUOUS accesses as grouped.
13205         (vectorizable_load): Likewise.
13207 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13209         PR tree-optimization/81635
13210         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13211         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13212         (test_round_for_mask): New functions.
13213         (wide_int_cc_tests): Call test_round_for_mask.
13214         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13215         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13216         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13217         range returned by get_range_info.
13219 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13221         PR ipa/81360
13222         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13223         * symtab.c: Include builtins.h
13224         (symtab_node::output_to_lto_symbol_table_p): Move here
13225         from lto-streamer-out.c:output_symbol_p.
13226         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13227         (output_symbol_p): Move all logic to symtab.c
13228         (produce_symtab): Update.
13230 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13232         * config/s390/s390-opts.h (enum indirect_branch): Define.
13233         * config/s390/s390-protos.h (s390_return_addr_from_memory)
13234         (s390_indirect_branch_via_thunk)
13235         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13236         (enum s390_indirect_branch_type): Define.
13237         * config/s390/s390.c (struct s390_frame_layout, struct
13238         machine_function): Remove.
13239         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13240         (indirect_branch_table_label_no, indirect_branch_table_name):
13241         Define variables.
13242         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13243         (enum s390_indirect_branch_option): Define.
13244         (s390_return_addr_from_memory): New function.
13245         (s390_handle_string_attribute): New function.
13246         (s390_attribute_table): Add new attribute handler.
13247         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13248         (s390_indirect_branch_via_thunk): New function.
13249         (s390_indirect_branch_via_inline_thunk): New function.
13250         (s390_function_ok_for_sibcall): When jumping via thunk disallow
13251         sibling call optimization for non z10 compiles.
13252         (s390_emit_call): Force indirect branch target to be a single
13253         register.  Add r1 clobber for non-z10 compiles.
13254         (s390_emit_epilogue): Emit return jump via return_use expander.
13255         (s390_reorg): Handle JUMP_INSNs as execute targets.
13256         (s390_option_override_internal): Perform validity checks for the
13257         new command line options.
13258         (s390_indirect_branch_attrvalue): New function.
13259         (s390_indirect_branch_settings): New function.
13260         (s390_set_current_function): Invoke s390_indirect_branch_settings.
13261         (s390_output_indirect_thunk_function):  New function.
13262         (s390_code_end): Implement target hook.
13263         (s390_case_values_threshold): Implement target hook.
13264         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13265         macros.
13266         * config/s390/s390.h (struct s390_frame_layout)
13267         (struct machine_function): Move here from s390.c.
13268         (TARGET_INDIRECT_BRANCH_NOBP_RET)
13269         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13270         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13271         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13272         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13273         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13274         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13275         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13276         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13277         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13278         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13279         (mnemonic attribute): Add values which aren't recognized
13280         automatically.
13281         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13282         pattern for branch conversion.  Fix mnemonic attribute.
13283         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13284         indirect branch via thunk if requested.
13285         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13286         ("*indirect_jump"): Disable for branch conversion using out of
13287         line thunks.
13288         ("indirect_jump_via_thunk<mode>_z10")
13289         ("indirect_jump_via_thunk<mode>")
13290         ("indirect_jump_via_inlinethunk<mode>_z10")
13291         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13292         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13293         ("casesi_jump_via_inlinethunk<mode>_z10")
13294         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13295         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13296         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13297         ("*indirect2_jump"): Disable for branch conversion.
13298         ("casesi_jump"): Turn into expander and expand patterns for branch
13299         conversion.
13300         ("return_use"): New expander.
13301         ("*return"): Emit return via thunk and rename it to ...
13302         ("*return<mode>"): ... this one.
13303         * config/s390/s390.opt: Add new options and and enum for the
13304         option values.
13306 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13308         * lra-constraints.c (match_reload): Unconditionally use
13309         gen_lowpart_SUBREG, rather than selecting between that
13310         and equivalent gen_rtx_SUBREG code.
13312 2018-02-08  Richard Biener  <rguenther@suse.de>
13314         PR tree-optimization/84233
13315         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13316         changed flag instead of boguously re-using phi_inserted.
13318 2018-02-08  Martin Jambor  <mjambor@suse.cz>
13320         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13321         static local variables.
13323 2018-02-08  Richard Biener  <rguenther@suse.de>
13325         PR tree-optimization/84278
13326         * tree-vect-stmts.c (vectorizable_store): When looking for
13327         smaller vector types to perform grouped strided loads/stores
13328         make sure the mode is supported by the target.
13329         (vectorizable_load): Likewise.
13331 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13333         * config/aarch64/aarch64.c (aarch64_components_for_bb):
13334         Increase LDP/STP opportunities by adding adjacent callee-saves.
13336 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13338         PR rtl-optimization/84068
13339         PR rtl-optimization/83459
13340         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13342 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
13344         PR tree-optimization/84224
13345         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13346         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13347         non-zero arguments.
13349 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
13351         PR target/84113
13352         * config/rs6000/altivec.md (*restore_world): Remove LR use.
13353         * config/rs6000/predicates.md (restore_world_operation): Adjust op
13354         count, remove one USE.
13356 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13358         * doc/install.texi (Configuration): Document the
13359         --with-long-double-format={ibm,ieee} PowerPC configuration
13360         options.
13362         PR target/84154
13363         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13364         Convert from define_expand to be define_insn_and_split.  Rework
13365         float/double/_Float128 conversions to QI/HI/SImode to work with
13366         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
13367         conversions to QI/HImode types did a store and then a load to
13368         truncate the value.  For conversions to VSX registers, don't split
13369         the insn, instead emit the code directly.  Use the code iterator
13370         any_fix to combine signed and unsigned conversions.
13371         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13372         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13373         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13374         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13375         (fix_<mode>di2_hw): Likewise.
13376         (fixuns_<mode>di2_hw): Likewise.
13377         (fix_<mode>si2_hw): Likewise.
13378         (fixuns_<mode>si2_hw): Likewise.
13379         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13380         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13381         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13382         fix<uns>_trunc<SFDF:mode>si2_p8.
13383         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13384         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13385         (fix<uns>_<mode>_mem): Likewise.
13386         (fctiw<u>z_<mode>_mem): Likewise.
13387         (fix<uns>_<mode>_mem): Likewise.
13388         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13389         the register allocator from doing a direct move to the GPRs to do
13390         a store, and instead use the ISA 3.0 store byte/half-word from
13391         vector register instruction.  For IEEE 128-bit floating point,
13392         also optimize stores of 32-bit ints.
13393         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13395 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
13397         * genextract.c (push_pathstr_operand): New function to support
13398         [a-zA-Z].
13399         (walk_rtx): Call push_pathstr_operand.
13400         (print_path): Support [a-zA-Z].
13402 2018-02-07  Richard Biener  <rguenther@suse.de>
13404         PR tree-optimization/84037
13405         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13406         (cse_and_gimplify_to_preheader): Declare.
13407         (vect_get_place_in_interleaving_chain): Likewise.
13408         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13409         ivexpr_map.
13410         (_loop_vec_info::~_loop_vec_info): Delete it.
13411         (cse_and_gimplify_to_preheader): New function.
13412         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13413         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13414         (vectorizable_load): Likewise.  For grouped stores always base
13415         the IV on the first element.
13416         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13417         condition before gimplifying.
13419 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13421         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13422         *DIV_EXPR and *MOD_EXPR.
13424 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
13426         PR target/84248
13427         * config/i386/i386.c (ix86_option_override_internal): Mask out
13428         the CF_SET bit when checking -fcf-protection.
13430 2018-02-07  Tom de Vries  <tom@codesourcery.com>
13432         PR libgomp/84217
13433         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13434         enough.
13436 2018-02-07  Richard Biener  <rguenther@suse.de>
13438         PR tree-optimization/84204
13439         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13440         this place.
13442         PR tree-optimization/84205
13443         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13444         special-case isl_ast_op_zdiv_r.
13446         PR tree-optimization/84223
13447         * graphite-scop-detection.c (gather_bbs::before_dom_children):
13448         Only add conditions from within the region.
13449         (gather_bbs::after_dom_children): Adjust.
13451 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
13453         PR target/84209
13454         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13455         * config/avr/avr.md: Only post-reload split REG-REG moves if
13456         either register is GENERAL_REG_P.
13458 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13460         PR tree-optimization/84235
13461         * tree-ssa-scopedtables.c
13462         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13463         if the subtraction is performed in floating point type where NaNs are
13464         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13465         build 1.  Formatting fix.
13467 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
13469         PR target/84146
13470         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13471         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13472         and skip it regardless of bb boundaries.  Use CALL_P macro,
13473         don't test INSN_P (insn) together with CALL_P or JUMP_P check
13474         unnecessarily, formatting fix.
13476 2018-02-06  Michael Collison  <michael.collison@arm.com>
13478         * config/arm/thumb2.md:
13479         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13480         (*thumb_mov_notscc): Ditto.
13482 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
13484         PR target/84154
13485         * config/rs6000/rs6000.md (su code attribute): Use "u" for
13486         unsigned_fix, not "s".
13488 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13490         * configure.ac (gcc_fn_eh_frame_ro): New function.
13491         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13492         correct .eh_frame permissions.
13493         * configure: Regenerate.
13495 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
13497         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13498         irrelevant options.
13500 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13502         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13503         Display warning message for -mno-speculate-indirect-jumps.
13505 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
13507         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13508         Undocumented.
13509         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13511 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
13513         PR tree-optimization/84225
13514         * tree-eh.c (find_trapping_overflow): Only call
13515         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13517 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13519         PR target/84145
13520         * config/i386/i386.c: Reimplement the check of possible options
13521         -mibt/-mshstk conbination. Change error messages.
13522         * doc/invoke.texi: Fix a typo: remove extra '='.
13524 2018-02-06  Marek Polacek  <polacek@redhat.com>
13526         PR tree-optimization/84228
13527         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13529 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
13531         PR target/82641
13532         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13533         emitted arch directives.
13534         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13535         __ARM_FEATURE_COPROC before changing architectures.
13537 2018-02-06  Richard Biener  <rguenther@suse.de>
13539         * config/i386/i386.c (print_reg): Fix typo.
13540         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13542 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
13544         * configure: Regenerate.
13546 2018-02-05  Martin Sebor  <msebor@redhat.com>
13548         PR tree-optimization/83369
13549         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13550         inlining context.
13552 2018-02-05  Martin Liska  <mliska@suse.cz>
13554         * doc/invoke.texi: Cherry-pick upstream r323995.
13556 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
13558         * ira.c (ira_init_register_move_cost): Adjust comment.
13560 2018-02-05  Martin Liska  <mliska@suse.cz>
13562         PR gcov-profile/84137
13563         * doc/gcov.texi: Fix typo in documentation.
13565 2018-02-05  Martin Liska  <mliska@suse.cz>
13567         PR gcov-profile/83879
13568         * doc/gcov.texi: Document necessity of --dynamic-list-data when
13569         using dlopen functionality.
13571 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
13573         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13574         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13575         _mm_maskz_range_ss, _mm_mask_range_round_ss,
13576         _mm_maskz_range_round_ss): New intrinsics.
13577         (__builtin_ia32_rangesd128_round)
13578         (__builtin_ia32_rangess128_round): Remove.
13579         (__builtin_ia32_rangesd128_mask_round,
13580         __builtin_ia32_rangess128_mask_round): New builtins.
13581         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13582         __builtin_ia32_rangess128_round): Remove.
13583         (__builtin_ia32_rangesd128_mask_round,
13584         __builtin_ia32_rangess128_mask_round): New builtins.
13585         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13586         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13587         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13588         "<round_saeonly_constraint>")): Changed to ...
13589         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13590         "<round_saeonly_scalar_constraint>")): ... this.
13591         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13592         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13593         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13594         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13595         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13597 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
13599         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13600         options.
13601         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13602         Remove all values except native, 8540 and 8548.
13604 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
13606         * config/i386/i386.c (ix86_output_function_return): Pass
13607         INVALID_REGNUM, instead of -1, as invalid register number to
13608         indirect_thunk_name and output_indirect_thunk.
13610 2018-02-02  Julia Koval  <julia.koval@intel.com>
13612         * config.gcc: Add -march=icelake.
13613         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13614         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13615         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13616         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13617         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13618         (processor_target_table): Add icelake.
13619         (ix86_option_override_internal): Handle new PTAs.
13620         (get_builtin_code_for_version): Handle icelake.
13621         (M_INTEL_COREI7_ICELAKE): New.
13622         (fold_builtin_cpu): Handle icelake.
13623         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13624         * doc/invoke.texi: Add -march=icelake.
13626 2018-02-02  Julia Koval  <julia.koval@intel.com>
13628         * config/i386/i386.c (ix86_option_override_internal): Change flags type
13629         to wide_int_bitmask.
13630         * wide-int-bitmask.h: New.
13632 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13634         PR target/84066
13635         * config/i386/i386.md: Replace Pmode with word_mode in
13636         builtin_setjmp_setup and builtin_longjmp to support x32.
13638 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
13640         PR target/56010
13641         PR target/83743
13642         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13643         #include "opts.h".
13644         (rs6000_supported_cpu_names): New static variable.
13645         (linux_cpu_translation_table): Likewise.
13646         (elf_platform) <cpu>: Define new static variable and use it.
13647         Translate kernel AT_PLATFORM name to canonical name if needed.
13648         Error if platform name is unknown.
13650 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
13652         PR target/84089
13653         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13655 2018-02-01  Jeff Law  <law@redhat.com>
13657         PR target/84128
13658         * config/i386/i386.c (release_scratch_register_on_entry): Add new
13659         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
13660         the scratch if RELEASE_VIA_POP is false.
13661         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13662         If we have to save a temporary register, decrement SIZE appropriately.
13663         Pass new arguments to release_scratch_register_on_entry.
13664         (ix86_adjust_stack_and_probe): Likewise.
13665         (ix86_emit_probe_stack_range): Pass new arguments to
13666         release_scratch_register_on_entry.
13668 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
13670         PR rtl-optimization/84157
13671         * combine.c (change_zero_ext): Use REG_P predicate in
13672         front of HARD_REGISTER_P predicate.
13674 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
13676         * config/avr/avr.c (avr_option_override): Move disabling of
13677         -fdelete-null-pointer-checks to...
13678         * common/config/avr/avr-common.c (avr_option_optimization_table):
13679         ...here.
13681 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13683         PR tree-optimization/81635
13684         * tree-data-ref.c (split_constant_offset_1): For types that
13685         wrap on overflow, try to use range info to prove that wrapping
13686         cannot occur.
13688 2018-02-01  Renlin Li  <renlin.li@arm.com>
13690         PR target/83370
13691         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13692         TAILCALL_ADDR_REGS.
13693         (aarch64_register_move_cost): Likewise.
13694         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13695         TAILCALL_ADDR_REGS.
13696         (REG_CLASS_NAMES): Likewise.
13697         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13698         TAILCALL_ADDR_REGS. Remove IP registers.
13699         * config/aarch64/aarch64.md (Ucs): Update register constraint.
13701 2018-02-01  Richard Biener  <rguenther@suse.de>
13703         * domwalk.h (dom_walker::dom_walker): Add additional constructor
13704         for specifying RPO order and allow NULL for that.
13705         * domwalk.c (dom_walker::dom_walker): Likewise.
13706         (dom_walker::walk): Handle NULL RPO order.
13707         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13708         in RPO order.
13709         (rewrite_update_dom_walker): Likewise.
13710         (mark_def_dom_walker): Likewise.
13712 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13714         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13715         (aarch64_maybe_expand_sve_subreg_move): Declare.
13716         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13717         * config/aarch64/predicates.md (aarch64_any_register_operand): New
13718         predicate.
13719         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13720         that are semantically a reverse operation.
13721         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13722         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13723         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13724         functions.
13725         (aarch64_can_change_mode_class): For big-endian, forbid changes
13726         between two SVE modes if they have different element sizes.
13728 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13730         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13731         the TImode handling for big-endian targets.
13733 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13735         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13736         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
13737         not just bytes.
13738         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13739         Remove BSWAP handing for big-endian targets and use the form of
13740         LD1RQ appropariate for the mode.
13742 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13744         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13745         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13746         duplicated element.
13748 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13750         PR tearget/83845
13751         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13752         check for operands that need to go through aarch64_sve_reload_be.
13754 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
13756         PR tree-optimization/81661
13757         PR tree-optimization/84117
13758         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13759         * tree-eh.c: Include gimplify.h.
13760         (find_trapping_overflow, replace_trapping_overflow,
13761         rewrite_to_non_trapping_overflow): New functions.
13762         * tree-vect-loop.c: Include tree-eh.h.
13763         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13764         * tree-data-ref.c: Include tree-eh.h.
13765         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13767 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
13769         PR rtl-optimization/84123
13770         * combine.c (change_zero_ext): Check if hard register satisfies
13771         can_change_dest_mode before calling gen_lowpart_SUBREG.
13773 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
13775         PR target/82444
13776         * ira.c (ira_init_register_move_cost): Remove assert.
13778 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13780         PR rtl-optimization/84071
13781         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13782         * doc/tm.texi: Regenerate.
13784 2018-01-31  Richard Biener  <rguenther@suse.de>
13786         PR tree-optimization/84132
13787         * tree-data-ref.c (analyze_miv_subscript): Properly
13788         check whether evolution_function_is_affine_multivariate_p
13789         before calling gcd_of_steps_may_divide_p.
13791 2018-01-31  Julia Koval  <julia.koval@intel.com>
13793         PR target/83618
13794         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13795         * config/i386/i386.md (rdpid_rex64) New.
13796         (rdpid): Make 32bit only.
13798 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
13800         PR lto/84105
13801         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13802         an IDENTIFIER_NODE for FUNCTION_TYPE's.
13804 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13806         Revert
13807         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13809         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13811 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13813         PR rtl-optimization/84071
13814         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13815         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13817 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13819         * config/arc/arc.c (arc_handle_aux_attribute): New function.
13820         (arc_attribute_table): Add 'aux' attribute.
13821         (arc_in_small_data_p): Consider aux like variables.
13822         (arc_is_aux_reg_p): New function.
13823         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13824         (arc_get_aux_arg): New function.
13825         (prepare_move_operands): Handle aux-register access.
13826         (arc_handle_aux_attribute): New function.
13827         * doc/extend.texi (ARC Variable attributes): Add subsection.
13829 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13831         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13832         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13833         (arc_attribute_table): Add 'uncached' attribute.
13834         (arc_print_operand): Print '.di' flag for uncached memory
13835         accesses.
13836         (arc_in_small_data_p): Do not consider for small data the uncached
13837         types.
13838         (arc_is_uncached_mem_p): New function.
13839         * config/arc/predicates.md (compact_store_memory_operand): Check
13840         for uncached memory accesses.
13841         (nonvol_nonimm_operand): Likewise.
13842         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
13844 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
13846         PR c/84100
13847         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
13848         falign-loops=): Add Optimization flag.
13850 2018-01-30  Jeff Law  <law@redhat.com>
13852         PR target/84064
13853         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
13854         INT_REGISTERS_SAVED.  Check it prior to calling
13855         get_scratch_register_on_entry.
13856         (ix86_adjust_stack_and_probe): Similarly.
13857         (ix86_emit_probe_stack_range): Similarly.
13858         (ix86_expand_prologue): Corresponding changes.
13860 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13862         PR target/40411
13863         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13864         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13866 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
13868         PR target/84112
13869         * lra-constraints.c (curr_insn_transform): Process AND in the
13870         address.
13872 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
13874         PR rtl-optimization/83986
13875         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13876         dependence against last_pending_memory_flush in addition to
13877         pending_jump_insns.
13879 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
13881         PR tree-optimization/81611
13882         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13883         copies.
13885 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13887         PR target/83758
13888         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13889         a reg rtx.
13891 2018-01-30  Richard Biener  <rguenther@suse.de>
13892             Jakub Jelinek  <jakub@redhat.com>
13894         PR tree-optimization/84111
13895         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13896         inner loops added during recursion, as they don't have up-to-date
13897         SSA form.
13899 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13901         PR ipa/81360
13902         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13903         (can_inline_edge_by_limits_p): ... here.
13904         (can_early_inline_edge_p, check_callers,
13905         update_caller_keys, update_callee_keys, recursive_inlining,
13906         add_new_edges_to_heap, speculation_useful_p,
13907         inline_small_functions,
13908         inline_small_functions, flatten_function,
13909         inline_to_all_callers_1): Update.
13911 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13913         * profile-count.c (profile_count::combine_with_ipa_count): Handle
13914         zeros correctly.
13916 2018-01-30  Richard Biener  <rguenther@suse.de>
13918         PR tree-optimization/83008
13919         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13920         invariant and constant vector uses in stmts when they need
13921         more than one stmt.
13923 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13925         PR bootstrap/84017
13926         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13927         * configure: Regenerate.
13929 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13931         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13932         pattern.
13933         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13934         Use gen_rtx_REG rather than gen_lowpart.
13936 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13938         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13939         rather than 0 when creating partial subregs.
13941 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13943         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13944         of usage.
13946 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
13948         PR target/81550
13949         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13950         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13951         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13952         flags.  This restores the settings used before the 2017-07-24.
13953         Turning off pre increment/decrement/modify allows IVOPTS to
13954         optimize DF/SF loops where the index is an int.
13956 2018-01-29  Richard Biener  <rguenther@suse.de>
13957             Kelvin Nilsen  <kelvin@gcc.gnu.org>
13959         PR bootstrap/80867
13960         * tree-vect-stmts.c (vectorizable_call): Don't call
13961         targetm.vectorize_builtin_md_vectorized_function if callee is
13962         NULL.
13964 2018-01-22  Carl Love  <cel@us.ibm.com>
13966         * doc/extend.tex: Fix typo in second arg in
13967         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13969 2018-01-29  Richard Biener  <rguenther@suse.de>
13971         PR tree-optimization/84086
13972         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13973         (flush_ssaname_freelist): When SSA names were released reset
13974         the SCEV hash table.
13976 2018-01-29  Richard Biener  <rguenther@suse.de>
13978         PR tree-optimization/84057
13979         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13980         removed paths when removing edges.
13982 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
13984         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13985         -mfunction-return=@var{choice}.
13987 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13989         PR diagnostic/84034
13990         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13991         Handle CR like TAB.
13992         (layout::print_source_line): Likewise.
13993         (test_get_line_width_without_trailing_whitespace): Add test cases.
13995 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
13997         PR middle-end/84040
13998         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13999         debug insns.
14001 2018-01-26  Jim Wilson  <jimw@sifive.com>
14003         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14005         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14006         specified.
14008 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14010         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14011         and CMP + SUB-immediate -> SUBS.
14013 2018-01-26  Martin Sebor  <msebor@redhat.com>
14015         PR tree-optimization/83896
14016         * tree-ssa-strlen.c (get_string_len): Rename...
14017         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
14018         Avoid assuming length is constant.
14019         (handle_char_store): Use HOST_WIDE_INT for string length.
14021 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
14023         PR target/81763
14024         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14025         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14027 2018-01-26  Richard Biener  <rguenther@suse.de>
14029         PR rtl-optimization/84003
14030         * dse.c (record_store): Only record redundant stores when
14031         the earlier store aliases at least all accesses the later one does.
14033 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
14035         PR rtl-optimization/83985
14036         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14037         REG_CFA_RESTORE insns.
14038         (delete_unmarked_insns): Don't ignore separate shrink wrapping
14039         REG_CFA_RESTORE insns here.
14041         PR c/83989
14042         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14043         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14045 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14047         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14048         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14049         (arc_init): Likewise.
14050         (arc_override_options): Likewise.
14051         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14052         value.
14053         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14054         support.
14055         * config/arc/arc.h (TARGET_DBNZ): Define.
14056         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14057         properly set the tune attribute.
14058         (dbnz): Use TARGET_DBNZ guard.
14059         * config/arc/arc.opt (mtune): Add core3 option.
14061 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14063         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14064         recognize new pic like addresses.
14065         (arc_delegitimize_address): Clean up.
14067 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14069         * config/arc/arc-arches.def: Option mrf16 valid for all
14070         architectures.
14071         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14072         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14073         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14074         * config/arc/arc-tables.opt: Regenerate.
14075         * config/arc/arc.c (arc_conditional_register_usage): Handle
14076         reduced register file case.
14077         (arc_file_start): Set must have build attributes.
14078         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14079         mrf16 option value.
14080         * config/arc/arc.opt (mrf16): Add new option.
14081         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14082         * config/arc/genmultilib.awk: Handle new mrf16 option.
14083         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14084         * config/arc/t-multilib: Regenerate.
14085         * doc/invoke.texi (ARC Options): Document mrf16 option.
14087 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14089         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14090         * config/arc/arc.c (arc_handle_secure_attribute): New function.
14091         (arc_attribute_table): Add 'secure_call' attribute.
14092         (arc_print_operand): Print secure call operand.
14093         (arc_function_ok_for_sibcall): Don't optimize tail calls when
14094         secure.
14095         (arc_is_secure_call_p): New function.  * config/arc/arc.md
14096         (call_i): Add support for sjli instruction.
14097         (call_value_i): Likewise.
14098         * config/arc/constraints.md (Csc): New constraint.
14100 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14101             John Eric Martin  <John.Martin@emmicro-us.com>
14103         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14104         * config/arc/arc.c (_arc_jli_section): New struct.
14105         (arc_jli_section): New type.
14106         (rc_jli_sections): New static variable.
14107         (arc_handle_jli_attribute): New function.
14108         (arc_attribute_table): Add jli_always and jli_fixed attribute.
14109         (arc_file_end): New function.
14110         (TARGET_ASM_FILE_END): Define.
14111         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14112         (arc_add_jli_section): New function.
14113         (jli_call_scan): Likewise.
14114         (arc_reorg): Call jli_call_scan.
14115         (arc_output_addsi): Remove 'S' from printing asm operand.
14116         (arc_is_jli_call_p): New function.
14117         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14118         operand.
14119         (movhi_insn): Likewise.
14120         (movsi_insn): Likewise.
14121         (movsi_set_cc_insn): Likewise.
14122         (loadqi_update): Likewise.
14123         (load_zeroextendqisi_update): Likewise.
14124         (load_signextendqisi_update): Likewise.
14125         (loadhi_update): Likewise.
14126         (load_zeroextendhisi_update): Likewise.
14127         (load_signextendhisi_update): Likewise.
14128         (loadsi_update): Likewise.
14129         (loadsf_update): Likewise.
14130         (movsicc_insn): Likewise.
14131         (bset_insn): Likewise.
14132         (bxor_insn): Likewise.
14133         (bclr_insn): Likewise.
14134         (bmsk_insn): Likewise.
14135         (bicsi3_insn): Likewise.
14136         (cmpsi_cc_c_insn): Likewise.
14137         (movsi_ne): Likewise.
14138         (movsi_cond_exec): Likewise.
14139         (clrsbsi2): Likewise.
14140         (norm_f): Likewise.
14141         (normw): Likewise.
14142         (swap): Likewise.
14143         (divaw): Likewise.
14144         (flag): Likewise.
14145         (sr): Likewise.
14146         (kflag): Likewise.
14147         (ffs): Likewise.
14148         (ffs_f): Likewise.
14149         (fls): Likewise.
14150         (call_i): Remove 'S' asm letter, add jli instruction.
14151         (call_value_i): Likewise.
14152         * config/arc/arc.op (mjli-always): New option.
14153         * config/arc/constraints.md (Cji): New constraint.
14154         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14155         operand.
14156         (subsf3_fpx): Likewise.
14157         (mulsf3_fpx): Likewise.
14158         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14159         asm operand.
14160         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14161         function attrbutes.
14162         * doc/invoke.texi (ARC): Document mjli-always option.
14164 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
14166         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14167         avoid addition with 0 and use incw and decw where possible.
14169 2018-01-26  Richard Biener  <rguenther@suse.de>
14171         PR tree-optimization/81082
14172         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14173         association if it requires casting to unsigned.
14174         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14175         from fold_plusminus_mult_expr to catch important cases late when
14176         range info is available.
14178 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14180         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14181         * configure.ac (hidden_linkonce): New test.
14182         * configure: Regenerate.
14183         * config.in: Regenerate.
14185 2018-01-26  Julia Koval  <julia.koval@intel.com>
14187         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14188         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14189         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14190         _mm_mask_bitshuffle_epi64_mask): Fix type.
14191         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14192         USI_FTYPE_V4DI_V4DI_USI): Remove.
14193         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14194         __builtin_ia32_vpshufbitqmb256_mask,
14195         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14196         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14197         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14199 2018-01-26  Alan Modra  <amodra@gmail.com>
14201         PR target/84033
14202         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14203         UNSPEC_VBPERMQ.  Sort other unspecs.
14205 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
14207         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14209 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
14211         PR middle-end/83055
14212         * predict.c (drop_profile): Do not push/pop cfun; update also
14213         node->count.
14214         (handle_missing_profiles): Fix logic looking for zero profiles.
14216 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
14218         PR middle-end/83977
14219         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14220         on functions with #pragma omp declare simd or functions with simd
14221         attribute.
14222         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14223         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14224         Remove trailing \n from warning_at calls.
14226 2018-01-25  Tom de Vries  <tom@codesourcery.com>
14228         PR target/84028
14229         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14230         for neutered workers.
14232 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
14234         PR target/68467
14235         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14236         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14238 2018-01-24  Jeff Law  <law@redhat.com>
14240         PR target/83994
14241         * i386.c (get_probe_interval): Move to earlier point.
14242         (ix86_compute_frame_layout): If -fstack-clash-protection and
14243         the frame is larger than the probe interval, then use pushes
14244         to save registers rather than reg->mem moves.
14245         (ix86_expand_prologue): Remove conditional for int_registers_saved
14246         assertion.
14248 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
14250         PR target/84014
14251         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14252         min/max for never referenced object.
14254 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
14256         PR middle-end/83977
14257         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14258         here.
14259         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14260         attributes from DECL_ATTRIBUTES (decl) without affecting
14261         DECL_ATTRIBUTES (current_function_decl).
14262         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14263         functions with non-NULL DECL_ABSTRACT_ORIGIN.
14265 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
14267         PR tree-optimization/83979
14268         * fold-const.c (fold_comparison): Use constant_boolean_node
14269         instead of boolean_{true,false}_node.
14271 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
14273         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14274         with zero counts.
14276 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14278         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14279         Simplify the clause that sets the length attribute.
14280         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14281         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14282         clause that sets the length attribute.
14283         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14285 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14287         PR target/83589
14288         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14289         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14290         Add strict parameter.
14291         (prevent_branch_around_nothing): Insert dummy insn between branch to
14292         label and label with no ptx insn inbetween.
14293         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14295 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14297         PR target/81352
14298         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14299         for neutered threads in warp.
14300         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14302 2018-01-24  Richard Biener  <rguenther@suse.de>
14304         PR tree-optimization/83176
14305         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14306         operands.
14308 2018-01-24  Richard Biener  <rguenther@suse.de>
14310         PR tree-optimization/82819
14311         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14312         code generating pluses that are no-ops in the target precision.
14314 2018-01-24  Richard Biener  <rguenther@suse.de>
14316         PR middle-end/84000
14317         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14319 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14321         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14322         to merge probabilities.
14323         * predict.c (probably_never_executed): Also mark as cold functions
14324         with global 0 profile and guessed local profile.
14325         * profile-count.c (profile_probability::combine_with_count): New
14326         member function.
14327         * profile-count.h (profile_probability::operator*,
14328         profile_probability::operator*=, profile_probability::operator/,
14329         profile_probability::operator/=): Reduce precision to adjusted
14330         and set value to guessed on contradictory divisions.
14331         (profile_probability::combine_with_freq): Remove.
14332         (profile_probability::combine_wiht_count): Declare.
14333         (profile_count::force_nonzero):: Set to adjusted.
14334         (profile_count::probability_in):: Set quality to adjusted.
14335         * tree-ssa-tail-merge.c (replace_block_by): Use
14336         combine_with_count.
14338 2018-01-23  Andrew Waterman  <andrew@sifive.com>
14339             Jim Wilson  <jimw@sifive.com>
14341         * config/riscv/riscv.c (riscv_stack_boundary): New.
14342         (riscv_option_override): Set riscv_stack_boundary.  Handle
14343         riscv_preferred_stack_boundary_arg.
14344         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14345         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14346         (STACK_BOUNDARY): Set to riscv_stack_boundary.
14347         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14348         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14349         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14351 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
14353         PR target/83905
14354         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14355         of struct ix86_frame.
14356         (ix86_expand_epilogue): Likewise.  Add a local variable for
14357         the reg_save_offset field in struct ix86_frame.
14359 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
14361         PR tree-optimization/82604
14362         * tree-loop-distribution.c (enum partition_kind): New enum item
14363         PKIND_PARTIAL_MEMSET.
14364         (partition_builtin_p): Support above new enum item.
14365         (generate_code_for_partition): Ditto.
14366         (compute_access_range): Differentiate cases that equality can be
14367         proven at all loops, the innermost loops or no loops.
14368         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14369         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
14370         (finalize_partitions, distribute_loop): Don't fuse partition of
14371         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14372         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14373         parloop is enabled.
14375 2018-01-23  Martin Liska  <mliska@suse.cz>
14377         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14378         order to ignore the predictor.
14379         (PRED_POLYMORPHIC_CALL): Likewise.
14380         (PRED_RECURSIVE_CALL): Likewise.
14382 2018-01-23  Martin Liska  <mliska@suse.cz>
14384         * tree-profile.c (tree_profiling): Print function header to
14385         aware reader which function we are working on.
14386         * value-prof.c (gimple_find_values_to_profile): Do not print
14387         not interesting value histograms.
14389 2018-01-23  Martin Liska  <mliska@suse.cz>
14391         * profile-count.h (enum profile_quality): Add
14392         profile_uninitialized as the first value. Do not number values
14393         as they are zero based.
14394         (profile_count::verify): Update sanity check.
14395         (profile_probability::verify): Likewise.
14397 2018-01-23  Nathan Sidwell  <nathan@acm.org>
14399         * doc/invoke.texi (ffor-scope): Deprecate.
14401 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14403         PR tree-optimization/83510
14404         * domwalk.c (set_all_edges_as_executable): New function.
14405         (dom_walker::dom_walker): Convert bool param
14406         "skip_unreachable_blocks" to enum reachability.  Move setup of
14407         edge flags to set_all_edges_as_executable and only do it when
14408         reachability is REACHABLE_BLOCKS.
14409         * domwalk.h (enum dom_walker::reachability): New enum.
14410         (dom_walker::dom_walker): Convert bool param
14411         "skip_unreachable_blocks" to enum reachability.
14412         (set_all_edges_as_executable): New decl.
14413         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
14414         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14415         "reachability".
14416         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14417         but converting true to REACHABLE_BLOCKS.
14418         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14419         * tree-vrp.c
14420         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14421         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14422         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14423         REACHABLE_BLOCKS.
14424         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14425         if check_all_array_refs will be called.
14427 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14429         * tree.c (selftest::test_location_wrappers): Add more test
14430         coverage.
14432 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14434         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14435         (selftest::test_bit_in_range): Likewise.
14437 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14439         PR testsuite/83888
14440         * doc/sourcebuild.texi (vect_float): Say that the selector
14441         only describes the situation when -funsafe-math-optimizations is on.
14442         (vect_float_strict): Document.
14444 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14446         PR tree-optimization/83965
14447         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14448         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14449         instead of checking only for a reduction.
14450         (vect_recog_widen_sum_pattern): Likewise.
14452 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14454         * predict.c (probably_never_executed): Only use precise profile info.
14455         (compute_function_frequency): Skip after inlining hack since we now
14456         have quality checking.
14458 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14460         * profile-count.h (profile_probability::very_unlikely,
14461         profile_probability::unlikely, profile_probability::even): Set
14462         precision to guessed.
14464 2018-01-23  Richard Biener  <rguenther@suse.de>
14466         PR tree-optimization/83963
14467         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14468         Properly terminate dominator walk when crossing the exit edge not
14469         when visiting its source block.
14471 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
14473         PR c++/83918
14474         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14475         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14477 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
14479         PR tree-optimization/83957
14480         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
14481         semicolon after for body surrounded by braces.
14483         PR tree-optimization/83081
14484         * profile-count.h (profile_probability::split): New method.
14485         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14486         Use profile_probability::split.
14487         (do_compare_rtx_and_jump): Fix adjustment of probabilities
14488         when splitting a single conditional jump into 2.
14490 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
14492         PR tree-optimization/69452
14493         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14494         decl.
14496 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14498         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14499         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14500         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14502 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14504         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14505         declaration.
14506         * config/rl78/rl78.md (movdi): New define_expand.
14507         * config/rl78/rl78.c (rl78_split_movdi): New function.
14509 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
14511         PR target/83862
14512         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14513         no longer used.
14514         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14515         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14516         128-bit to produce an UNSPEC move to get the double word with the
14517         signbit and then a shift directly to do signbit.
14518         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14519         implementation with a new version that just does either a direct
14520         move or a regular move.  Move memory interface to separate insns.
14521         Move insns so they are next to the expander.
14522         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14523         with signbit move.  Split big and little endian case.
14524         (signbit<mode>2_dm_mem_le): Likewise.
14525         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14526         (signbit<mode>2_dm2): Likewise.
14528 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14530         * config/rl78/rl78.md (anddi3): New define_expand.
14532 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14534         * config/rl78/rl78.md (umindi3): New define_expand.
14536 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14538         * config/rl78/rl78.md (smindi3): New define_expand.
14540 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14542         * config/rl78/rl78.md (smaxdi3): New define_expand.
14544 2018-01-22  Carl Love  <cel@us.ibm.com>
14546         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14547         LVX_V1TI): Add macro expansion.
14548         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14549         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14550         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14551         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14552         Change check to determine if the instruction is a byte reversing
14553         entry.  Fix typo in comment.
14554         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14555         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14556         Add def_builtin calls for new builtins.
14557         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14558         Add define_insn expansion.
14560 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14562         * config/rl78/rl78.md (umaxdi3): New define_expand.
14564 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14566         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14567         for non-QImode registers.
14569 2018-01-22  Richard Biener  <rguenther@suse.de>
14571         PR tree-optimization/83963
14572         * graphite-scop-detection.c (scop_detection::get_sese): Delay
14573         including the loop exit block.
14574         (scop_detection::merge_sese): Likewise.
14575         (scop_detection::add_scop): Do it here instead.
14577 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14579         * doc/sourcebuild.texi (arm_softfloat): Document.
14581 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
14583         PR gcc/77734
14584         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14585         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14586         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14588 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14589             David Edelsohn  <dje.gcc@gmail.com>
14591         PR target/83946
14592         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14593         Change "crset eq" to "crset 2".
14594         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14595         (*call_indirect_aix<mode>_nospec): Likewise.
14596         (*call_value_indirect_aix<mode>_nospec): Likewise.
14597         (*call_indirect_elfv2<mode>_nospec): Likewise.
14598         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14599         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14600         change assembly output from . to $.
14601         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14602         (indirect_jump<mode>_nospec): Change assembly output from . to $.
14603         (*tablejump<mode>_internal1_nospec): Likewise.
14605 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
14607         PR target/80870
14608         * config/sh/sh_optimize_sett_clrt.cc:
14609         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14611 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
14613         PR tree-optimization/83940
14614         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14615         offset_dt to vect_constant_def rather than vect_unknown_def_type.
14616         (vect_check_load_store_mask): Add a mask_dt_out parameter and
14617         use it to pass back the definition type.
14618         (vect_check_store_rhs): Likewise rhs_dt_out.
14619         (vect_build_gather_load_calls): Add a mask_dt argument and use
14620         it instead of a call to vect_is_simple_use.
14621         (vectorizable_store): Update calls to vect_check_load_store_mask
14622         and vect_check_store_rhs.  Use the dt returned by the latter instead
14623         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
14624         instead of calls to vect_is_simple_use.  Pass the scalar rather
14625         than the vector operand to vect_is_simple_use when handling
14626         second and subsequent copies of an rhs value.
14627         (vectorizable_load): Update calls to vect_check_load_store_mask
14628         and vect_build_gather_load_calls.  Use the cached mask_dt and
14629         gs_info.offset_dt instead of calls to vect_is_simple_use.
14631 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
14633         PR middle-end/83945
14634         * tree-emutls.c: Include gimplify.h.
14635         (lower_emutls_2): New function.
14636         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14637         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14638         it before further processing.
14640         PR target/83930
14641         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14642         UINTVAL (trueop1) instead of INTVAL (op1).
14644 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
14646         PR debug/81570
14647         PR debug/83728
14648         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14649         INCOMING_FRAME_SP_OFFSET if not defined.
14650         (scan_trace): Add ENTRY argument.  If true and
14651         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14652         emit a note to adjust the CFA offset.
14653         (create_cfi_notes): Adjust scan_trace callers.
14654         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14655         INCOMING_FRAME_SP_OFFSET in the CIE.
14656         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14657         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14658         Likewise.
14659         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14660         * doc/tm.texi: Regenerated.
14662 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14664         PR rtl-optimization/83147
14665         * lra-constraints.c (remove_inheritance_pseudos): Use
14666         lra_substitute_pseudo_within_insn.
14668 2018-01-19  Tom de Vries  <tom@codesourcery.com>
14669             Cesar Philippidis  <cesar@codesourcery.com>
14671         PR target/83920
14672         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14674 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
14676         PR target/83790
14677         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14678         spaces for function labels.
14680 2018-01-19  Martin Liska  <mliska@suse.cz>
14682         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14683         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14684         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14685         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14686         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14687         (PRED_CONST_RETURN): Change from 69 to 65.
14688         (PRED_NULL_RETURN): Change from 91 to 71.
14689         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14690         (PRED_LOOP_GUARD): Change from 66 to 73.
14692 2018-01-19  Martin Liska  <mliska@suse.cz>
14694         * predict.c (predict_insn_def): Add new assert.
14695         (struct branch_predictor): Change type to signed integer.
14696         (test_prediction_value_range): Amend test to cover
14697         PROB_UNINITIALIZED.
14698         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14699         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14700         (PRED_LOOP_ITERATIONS_MAX): Likewise.
14701         (PRED_LOOP_IV_COMPARE): Likewise.
14702         * predict.h (PROB_UNINITIALIZED): Define new constant.
14704 2018-01-19  Martin Liska  <mliska@suse.cz>
14706         * predict.c (dump_prediction): Add new format for
14707         analyze_brprob.py script which is enabled with -details
14708         suboption.
14709         * profile-count.h (precise_p): New function.
14711 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14713         PR tree-optimization/83922
14714         * tree-vect-loop.c (vect_verify_full_masking): Return false if
14715         there are no statements that need masking.
14716         (vect_active_double_reduction_p): New function.
14717         (vect_analyze_loop_operations): Use it when handling phis that
14718         are not in the loop header.
14720 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14722         PR tree-optimization/83914
14723         * tree-vect-loop.c (vectorizable_induction): Don't convert
14724         init_expr or apply the peeling adjustment for inductions
14725         that are nested within the vectorized loop.
14727 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14729         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14730         instead of NEG.
14732 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14734         PR sanitizer/81715
14735         PR testsuite/83882
14736         * function.h (gimplify_parameters): Add gimple_seq * argument.
14737         * function.c: Include gimple.h and options.h.
14738         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14739         for the added local temporaries if needed.
14740         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14741         if there are any parameter cleanups, wrap whole body into a
14742         try/finally with the cleanups.
14744 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
14746         PR target/82964
14747         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14748         Use GET_MODE_CLASS for scalar floating point.
14750 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14752         PR ipa/82256
14753         patch by PaX Team
14754         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14755         Fix call of call_cgraph_insertion_hooks.
14757 2018-01-18  Martin Sebor  <msebor@redhat.com>
14759         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14761 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14763         PR ipa/83619
14764         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14765         frequencies.
14767 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
14769         PR other/70268
14770         * common.opt: (-ffile-prefix-map): New option.
14771         * opts.c (common_handle_option): Defer it.
14772         * opts-global.c (handle_common_deferred_options): Handle it.
14773         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14774         * file-prefix-map.h: New file.
14775         (remap_debug_filename, add_debug_prefix_map): ...here.
14776         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14777         * final.c (debug_prefix_map, add_debug_prefix_map
14778         remap_debug_filename): Move to...
14779         * file-prefix-map.c: New file.
14780         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14781         generalize, get rid of alloca(), use strrchr() instead of strchr().
14782         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14783         Implement in terms of add_prefix_map().
14784         (remap_macro_filename, remap_debug_filename): Implement in term of
14785         remap_filename().
14786         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14787         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14788         * dbxout.c: Include file-prefix-map.h.
14789         * varasm.c: Likewise.
14790         * vmsdbgout.c: Likewise.
14791         * xcoffout.c: Likewise.
14792         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14793         * doc/cppopts.texi (-fmacro-prefix-map): Document.
14794         * doc/invoke.texi (-ffile-prefix-map): Document.
14795         (-fdebug-prefix-map): Update description.
14797 2018-01-18  Martin Liska  <mliska@suse.cz>
14799         * config/i386/i386.c (indirect_thunk_name): Document that also
14800         lfence is emitted.
14801         (output_indirect_thunk): Document why both instructions
14802         (pause and lfence) are generated.
14804 2018-01-18  Richard Biener  <rguenther@suse.de>
14806         PR tree-optimization/83887
14807         * graphite-scop-detection.c
14808         (scop_detection::get_nearest_dom_with_single_entry): Remove.
14809         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14810         (scop_detection::merge_sese): Re-implement with a flood-fill
14811         algorithm that properly finds a SESE region if it exists.
14813 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14815         PR c/61240
14816         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14817         pointer_diff optimizations use view_convert instead of convert.
14819 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14821         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14822         Generate different code for -mno-speculate-indirect-jumps.
14823         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14824         (*call_indirect_aix<mode>): Disable for
14825         -mno-speculate-indirect-jumps.
14826         (*call_indirect_aix<mode>_nospec): New define_insn.
14827         (*call_value_indirect_aix<mode>): Disable for
14828         -mno-speculate-indirect-jumps.
14829         (*call_value_indirect_aix<mode>_nospec): New define_insn.
14830         (*sibcall_nonlocal_sysv<mode>): Generate different code for
14831         -mno-speculate-indirect-jumps.
14832         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14834 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14836         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
14837         long double type, set the flags for noting the default long double
14838         type, even if we don't pass or return a long double type.
14840 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
14842         PR ipa/83051
14843         * ipa-inline.c (flatten_function): Do not overwrite final inlining
14844         failure.
14846 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
14848         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
14849         support for merge[hl].
14850         (fold_mergehl_helper): New helper function.
14851         (tree-vector-builder.h): New #include for tree_vector_builder usage.
14852         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
14853         (altivec_vmrglw_direct): Add xxmrglw insn.
14855 2018-01-17  Andrew Waterman  <andrew@sifive.com>
14857         * config/riscv/riscv.c (riscv_conditional_register_usage): If
14858         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
14860 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
14862         PR lto/83121
14863         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14864         call the lto_location_cache before reading the
14865         DECL_SOURCE_LOCATION of the types.
14867 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
14868             Richard Sandiford  <richard.sandiford@linaro.org>
14870         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14871         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14872         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14873         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14874         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14875         Add declaration.
14876         * config/aarch64/constraints.md (aarch64_movti_operand):
14877         Limit immediates.
14878         * config/aarch64/predicates.md (Uti): Add new constraint.
14880 2018-01-17 Carl Love  <cel@us.ibm.com>
14882         * config/rs6000/vsx.md (define_expand xl_len_r,
14883         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14884         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14885         lxvll.
14886         (define_expand, define_insn): Move the shift left from  the
14887         define_insn to the define_expand for lxvl and stxvl instructions.
14888         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14889         and XL_LEN_R definitions to PURE.
14891 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
14893         * config/i386/i386.c (indirect_thunk_name): Declare regno
14894         as unsigned int.  Compare regno with INVALID_REGNUM.
14895         (output_indirect_thunk): Ditto.
14896         (output_indirect_thunk_function): Ditto.
14897         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
14898         in the call to output_indirect_thunk_function.
14900 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
14902         PR middle-end/83884
14903         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14904         rather than the size of inner_type to determine the stack slot size
14905         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14907 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
14909         PR target/83546
14910         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14911         to PTA_SILVERMONT.
14913 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
14915         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14916         endian Linux systems to optionally enable multilibs for selecting
14917         the long double type if the user configured an explicit type.
14918         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14919         have no long double multilibs if not defined.
14920         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14921         warn if the user used -mabi={ieee,ibm}longdouble and we built
14922         multilibs for long double.
14923         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14924         appropriate multilib option.
14925         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14926         multilib options.
14927         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14928         for building long double multilibs.
14929         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14931 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
14933         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14934         copies.
14936         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14937         64 bits.
14938         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14939         128 bits.
14941         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14942         variables.
14944         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14945         return value.
14947 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14949         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14950         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14952 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14954         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14955         different rtl trees depending on TARGET_64BIT.
14956         (rs6000_gen_lvx): Likewise.
14958 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14960         * config/visium/visium.md (nop): Tweak comment.
14961         (hazard_nop): Likewise.
14963 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14965         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14966         -mspeculate-indirect-jumps.
14967         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14968         for -mno-speculate-indirect-jumps.
14969         (*call_indirect_elfv2<mode>_nospec): New define_insn.
14970         (*call_value_indirect_elfv2<mode>): Disable for
14971         -mno-speculate-indirect-jumps.
14972         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14973         (indirect_jump): Emit different RTL for
14974         -mno-speculate-indirect-jumps.
14975         (*indirect_jump<mode>): Disable for
14976         -mno-speculate-indirect-jumps.
14977         (*indirect_jump<mode>_nospec): New define_insn.
14978         (tablejump): Emit different RTL for
14979         -mno-speculate-indirect-jumps.
14980         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14981         (tablejumpsi_nospec): New define_expand.
14982         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14983         (tablejumpdi_nospec): New define_expand.
14984         (*tablejump<mode>_internal1): Disable for
14985         -mno-speculate-indirect-jumps.
14986         (*tablejump<mode>_internal1_nospec): New define_insn.
14987         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14988         option.
14990 2018-01-16  Artyom Skrobov tyomitch@gmail.com
14992         * caller-save.c (insert_save): Drop unnecessary parameter.  All
14993         callers updated.
14995 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14996             Richard Biener  <rguenth@suse.de>
14998         PR libgomp/83590
14999         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15000         return early, inline manually is_gimple_sizepos.  Make sure if we
15001         call gimplify_expr we don't end up with a gimple constant.
15002         * tree.c (variably_modified_type_p): Don't return true for
15003         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
15004         * gimplify.h (is_gimple_sizepos): Remove.
15006 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15008         PR tree-optimization/83857
15009         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15010         vectorizable_live_operation for pure SLP statements.
15011         (vectorizable_live_operation): Handle PHIs.
15013 2018-01-16  Richard Biener  <rguenther@suse.de>
15015         PR tree-optimization/83867
15016         * tree-vect-stmts.c (vect_transform_stmt): Precompute
15017         nested_in_vect_loop_p since the scalar stmt may get invalidated.
15019 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15021         PR c/83844
15022         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15023         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15024         If off is not INTEGER_CST, issue a may not be aligned warning
15025         rather than isn't aligned.  Use isn%'t rather than isn't.
15026         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15027         into MULT_EXPR.
15028         <case MULT_EXPR>: Improve the case when bottom and one of the
15029         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15030         operand, in that case check if the other operand is multiple of
15031         bottom divided by the INTEGER_CST operand.
15033 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15035         PR target/83858
15036         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15037         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15038         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15039         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15040         * config/pa/pa.c (pa_function_arg_advance): Likewise.
15041         (pa_function_arg, pa_arg_partial_bytes): Likewise.
15042         (pa_function_arg_size): New function.
15044 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15046         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15047         in a separate statement.
15049 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
15051         PR tree-optimization/83847
15052         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15053         group gathers and scatters.
15055 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15057         PR rtl-optimization/86620
15058         * params.def (max-sched-ready-insns): Bump minimum value to 1.
15060         PR rtl-optimization/83213
15061         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15062         to last if both are JUMP_INSNs.
15064         PR tree-optimization/83843
15065         * gimple-ssa-store-merging.c
15066         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15067         store_immediate_info for bswap/nop orig_stores.
15069 2018-01-15  Andrew Waterman  <andrew@sifive.com>
15071         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15072         !TARGET_MUL.
15073         <UDIV>: Increase cost if !TARGET_DIV.
15075 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
15077         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15078         (define_attr "cr_logical_3op"): New.
15079         (cceq_ior_compare): Adjust.
15080         (cceq_ior_compare_complement): Adjust.
15081         (*cceq_rev_compare): Adjust.
15082         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15083         (is_cracked_insn): Adjust.
15084         (insn_must_be_first_in_group): Adjust.
15085         * config/rs6000/40x.md: Adjust.
15086         * config/rs6000/440.md: Adjust.
15087         * config/rs6000/476.md: Adjust.
15088         * config/rs6000/601.md: Adjust.
15089         * config/rs6000/603.md: Adjust.
15090         * config/rs6000/6xx.md: Adjust.
15091         * config/rs6000/7450.md: Adjust.
15092         * config/rs6000/7xx.md: Adjust.
15093         * config/rs6000/8540.md: Adjust.
15094         * config/rs6000/cell.md: Adjust.
15095         * config/rs6000/e300c2c3.md: Adjust.
15096         * config/rs6000/e500mc.md: Adjust.
15097         * config/rs6000/e500mc64.md: Adjust.
15098         * config/rs6000/e5500.md: Adjust.
15099         * config/rs6000/e6500.md: Adjust.
15100         * config/rs6000/mpc.md: Adjust.
15101         * config/rs6000/power4.md: Adjust.
15102         * config/rs6000/power5.md: Adjust.
15103         * config/rs6000/power6.md: Adjust.
15104         * config/rs6000/power7.md: Adjust.
15105         * config/rs6000/power8.md: Adjust.
15106         * config/rs6000/power9.md: Adjust.
15107         * config/rs6000/rs64.md: Adjust.
15108         * config/rs6000/titan.md: Adjust.
15110 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15112         * config/i386/predicates.md (indirect_branch_operand): Rewrite
15113         ix86_indirect_branch_register logic.
15115 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15117         * config/i386/constraints.md (Bs): Update
15118         ix86_indirect_branch_register check.  Don't check
15119         ix86_indirect_branch_register with GOT_memory_operand.
15120         (Bw): Likewise.
15121         * config/i386/predicates.md (GOT_memory_operand): Don't check
15122         ix86_indirect_branch_register here.
15123         (GOT32_symbol_operand): Likewise.
15125 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15127         * config/i386/predicates.md (constant_call_address_operand):
15128         Rewrite ix86_indirect_branch_register logic.
15129         (sibcall_insn_operand): Likewise.
15131 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15133         * config/i386/constraints.md (Bs): Replace
15134         ix86_indirect_branch_thunk_register with
15135         ix86_indirect_branch_register.
15136         (Bw): Likewise.
15137         * config/i386/i386.md (indirect_jump): Likewise.
15138         (tablejump): Likewise.
15139         (*sibcall_memory): Likewise.
15140         (*sibcall_value_memory): Likewise.
15141         Peepholes of indirect call and jump via memory: Likewise.
15142         * config/i386/i386.opt: Likewise.
15143         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15144         (GOT_memory_operand): Likewise.
15145         (call_insn_operand): Likewise.
15146         (sibcall_insn_operand): Likewise.
15147         (GOT32_symbol_operand): Likewise.
15149 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15151         PR middle-end/83837
15152         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15153         type rather than type addr's type points to.
15154         (expand_omp_atomic_mutex): Likewise.
15155         (expand_omp_atomic): Likewise.
15157 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15159         PR target/83839
15160         * config/i386/i386.c (output_indirect_thunk_function): Use
15161         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15162         for  __x86_return_thunk.
15164 2018-01-15  Richard Biener  <rguenther@suse.de>
15166         PR middle-end/83850
15167         * expmed.c (extract_bit_field_1): Fix typo.
15169 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15171         PR target/83687
15172         * config/arm/iterators.md (VF): New mode iterator.
15173         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15174         Remove integer-related logic from pattern.
15175         (neon_vabd<mode>_3): Likewise.
15177 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15179         PR middle-end/82694
15180         * common.opt (fstrict-overflow): No longer an alias.
15181         (fwrapv-pointer): New option.
15182         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15183         also for pointer types based on flag_wrapv_pointer.
15184         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15185         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15186         opts->x_flag_wrapv got set.
15187         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15188         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15189         POINTER_TYPE_OVERFLOW_UNDEFINED.
15190         * match.pd: Likewise in address comparison pattern.
15191         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15193 2018-01-15  Richard Biener  <rguenther@suse.de>
15195         PR lto/83804
15196         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15197         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
15198         Reset type names to their identifier if their TYPE_DECL doesn't
15199         have linkage (and thus is used for ODR and devirt).
15200         (save_debug_info_for_decl): Remove.
15201         (save_debug_info_for_type): Likewise.
15202         (add_tree_to_fld_list): Adjust.
15203         * tree-pretty-print.c (dump_generic_node): Make dumping of
15204         type names more robust.
15206 2018-01-15  Richard Biener  <rguenther@suse.de>
15208         * BASE-VER: Bump to 8.0.1.
15210 2018-01-14  Martin Sebor  <msebor@redhat.com>
15212         PR other/83508
15213         * builtins.c (check_access): Avoid warning when the no-warning bit
15214         is set.
15216 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
15218         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15219         * ira-color (allocno_hard_regs_compare): Likewise.
15221 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
15223         PR target/83013
15224         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15225         Use .pushsection/.popsection.
15227 2018-01-14  Martin Sebor  <msebor@redhat.com>
15229         PR c++/81327
15230         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15232 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
15234         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15235         entry from extra_headers.
15236         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15237         extra_headers, make the list bitwise identical to the i?86-*-* one.
15239 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15241         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15242         -mcmodel=large with -mindirect-branch=thunk,
15243         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15244         -mfunction-return=thunk-extern.
15245         * doc/invoke.texi: Document -mcmodel=large is incompatible with
15246         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15247         -mfunction-return=thunk and -mfunction-return=thunk-extern.
15249 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15251         * config/i386/i386.c (print_reg): Print the name of the full
15252         integer register without '%'.
15253         (ix86_print_operand): Handle 'V'.
15254         * doc/extend.texi: Document 'V' modifier.
15256 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15258         * config/i386/constraints.md (Bs): Disallow memory operand for
15259         -mindirect-branch-register.
15260         (Bw): Likewise.
15261         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15262         (GOT_memory_operand): Likewise.
15263         (call_insn_operand): Likewise.
15264         (sibcall_insn_operand): Likewise.
15265         (GOT32_symbol_operand): Likewise.
15266         * config/i386/i386.md (indirect_jump): Call convert_memory_address
15267         for -mindirect-branch-register.
15268         (tablejump): Likewise.
15269         (*sibcall_memory): Likewise.
15270         (*sibcall_value_memory): Likewise.
15271         Disallow peepholes of indirect call and jump via memory for
15272         -mindirect-branch-register.
15273         (*call_pop): Replace m with Bw.
15274         (*call_value_pop): Likewise.
15275         (*sibcall_pop_memory): Replace m with Bs.
15276         * config/i386/i386.opt (mindirect-branch-register): New option.
15277         * doc/invoke.texi: Document -mindirect-branch-register option.
15279 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15281         * config/i386/i386-protos.h (ix86_output_function_return): New.
15282         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15283         set function_return_type.
15284         (indirect_thunk_name): Add ret_p to indicate thunk for function
15285         return.
15286         (output_indirect_thunk_function): Pass false to
15287         indirect_thunk_name.
15288         (ix86_output_indirect_branch_via_reg): Likewise.
15289         (ix86_output_indirect_branch_via_push): Likewise.
15290         (output_indirect_thunk_function): Create alias for function
15291         return thunk if regno < 0.
15292         (ix86_output_function_return): New function.
15293         (ix86_handle_fndecl_attribute): Handle function_return.
15294         (ix86_attribute_table): Add function_return.
15295         * config/i386/i386.h (machine_function): Add
15296         function_return_type.
15297         * config/i386/i386.md (simple_return_internal): Use
15298         ix86_output_function_return.
15299         (simple_return_internal_long): Likewise.
15300         * config/i386/i386.opt (mfunction-return=): New option.
15301         (indirect_branch): Mention -mfunction-return=.
15302         * doc/extend.texi: Document function_return function attribute.
15303         * doc/invoke.texi: Document -mfunction-return= option.
15305 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15307         * config/i386/i386-opts.h (indirect_branch): New.
15308         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15309         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15310         with local indirect jump when converting indirect call and jump.
15311         (ix86_set_indirect_branch_type): New.
15312         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15313         (indirectlabelno): New.
15314         (indirect_thunk_needed): Likewise.
15315         (indirect_thunk_bnd_needed): Likewise.
15316         (indirect_thunks_used): Likewise.
15317         (indirect_thunks_bnd_used): Likewise.
15318         (INDIRECT_LABEL): Likewise.
15319         (indirect_thunk_name): Likewise.
15320         (output_indirect_thunk): Likewise.
15321         (output_indirect_thunk_function): Likewise.
15322         (ix86_output_indirect_branch_via_reg): Likewise.
15323         (ix86_output_indirect_branch_via_push): Likewise.
15324         (ix86_output_indirect_branch): Likewise.
15325         (ix86_output_indirect_jmp): Likewise.
15326         (ix86_code_end): Call output_indirect_thunk_function if needed.
15327         (ix86_output_call_insn): Call ix86_output_indirect_branch if
15328         needed.
15329         (ix86_handle_fndecl_attribute): Handle indirect_branch.
15330         (ix86_attribute_table): Add indirect_branch.
15331         * config/i386/i386.h (machine_function): Add indirect_branch_type
15332         and has_local_indirect_jump.
15333         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15334         to true.
15335         (tablejump): Likewise.
15336         (*indirect_jump): Use ix86_output_indirect_jmp.
15337         (*tablejump_1): Likewise.
15338         (simple_return_indirect_internal): Likewise.
15339         * config/i386/i386.opt (mindirect-branch=): New option.
15340         (indirect_branch): New.
15341         (keep): Likewise.
15342         (thunk): Likewise.
15343         (thunk-inline): Likewise.
15344         (thunk-extern): Likewise.
15345         * doc/extend.texi: Document indirect_branch function attribute.
15346         * doc/invoke.texi: Document -mindirect-branch= option.
15348 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
15350         PR ipa/83051
15351         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15353 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
15355         * ipa-inline.c (want_inline_small_function_p): Return false if
15356         inlining has already failed with CIF_FINAL_ERROR.
15357         (update_caller_keys): Call want_inline_small_function_p before
15358         can_inline_edge_p.
15359         (update_callee_keys): Likewise.
15361 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15363         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15364         New function.
15365         (rs6000_quadword_masked_address_p): Likewise.
15366         (quad_aligned_load_p): Likewise.
15367         (quad_aligned_store_p): Likewise.
15368         (const_load_sequence_p): Add comment to describe the outer-most loop.
15369         (mimic_memory_attributes_and_flags): New function.
15370         (rs6000_gen_stvx): Likewise.
15371         (replace_swapped_aligned_store): Likewise.
15372         (rs6000_gen_lvx): Likewise.
15373         (replace_swapped_aligned_load): Likewise.
15374         (replace_swapped_load_constant): Capitalize argument name in
15375         comment describing this function.
15376         (rs6000_analyze_swaps): Add a third pass to search for vector loads
15377         and stores that access quad-word aligned addresses and replace
15378         with stvx or lvx instructions when appropriate.
15379         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15380         New function prototype.
15381         (rs6000_quadword_masked_address_p): Likewise.
15382         (rs6000_gen_lvx): Likewise.
15383         (rs6000_gen_stvx): Likewise.
15384         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15385         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15386         when memory address is aligned.
15387         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15388         this split to select lvx instruction when memory address is aligned.
15389         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15390         instruction when memory address is aligned.
15391         (*vsx_le_perm_load_v16qi): Likewise.
15392         (four unnamed splitters): Modify to select the stvx instruction
15393         when memory is aligned.
15395 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
15397         * predict.c (determine_unlikely_bbs): Handle correctly BBs
15398         which appears in the queue multiple times.
15400 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15401             Alan Hayward  <alan.hayward@arm.com>
15402             David Sherwood  <david.sherwood@arm.com>
15404         * tree-vectorizer.h (vec_lower_bound): New structure.
15405         (_loop_vec_info): Add check_nonzero and lower_bounds.
15406         (LOOP_VINFO_CHECK_NONZERO): New macro.
15407         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15408         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15409         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15410         fields.  Make seg_len the distance travelled, not including the
15411         access size.
15412         (dr_direction_indicator): Declare.
15413         (dr_zero_step_indicator): Likewise.
15414         (dr_known_forward_stride_p): Likewise.
15415         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15416         tree-ssanames.h.
15417         (runtime_alias_check_p): Allow runtime alias checks with
15418         variable strides.
15419         (operator ==): Compare access_size and align.
15420         (prune_runtime_alias_test_list): Rework for new distinction between
15421         the access_size and seg_len.
15422         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
15423         segment lengths.
15424         (get_segment_min_max): New function.
15425         (create_intersect_range_checks): Use it.
15426         (dr_step_indicator): New function.
15427         (dr_direction_indicator): Likewise.
15428         (dr_zero_step_indicator): Likewise.
15429         (dr_known_forward_stride_p): Likewise.
15430         * tree-loop-distribution.c (data_ref_segment_size): Return
15431         DR_STEP * (niters - 1).
15432         (compute_alias_check_pairs): Update call to the dr_with_seg_len
15433         constructor.
15434         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15435         (vect_preserves_scalar_order_p): New function, split out from...
15436         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
15437         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15438         (vect_vfa_access_size): New function.
15439         (vect_vfa_align): Likewise.
15440         (vect_compile_time_alias): Take access_size_a and access_b arguments.
15441         (dump_lower_bound): New function.
15442         (vect_check_lower_bound): Likewise.
15443         (vect_small_gap_p): Likewise.
15444         (vectorizable_with_step_bound_p): Likewise.
15445         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15446         depencies if the vectorization factor is 1.  Convert the checks
15447         for nonzero steps into checks on the bounds of DR_STEP.  Try using
15448         a bunds check for variable steps if the minimum required step is
15449         relatively small. Update calls to the dr_with_seg_len
15450         constructor and to vect_compile_time_alias.
15451         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15452         function.
15453         (vect_loop_versioning): Call it.
15454         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15455         when retrying.
15456         (vect_estimate_min_profitable_iters): Account for any bounds checks.
15458 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15459             Alan Hayward  <alan.hayward@arm.com>
15460             David Sherwood  <david.sherwood@arm.com>
15462         * doc/sourcebuild.texi (vect_scatter_store): Document.
15463         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15464         optabs.
15465         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15466         Document.
15467         * genopinit.c (main): Add supports_vec_scatter_store and
15468         supports_vec_scatter_store_cached to target_optabs.
15469         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15470         IFN_MASK_SCATTER_STORE.
15471         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15472         functions.
15473         * internal-fn.h (internal_store_fn_p): Declare.
15474         (internal_fn_stored_value_index): Likewise.
15475         * internal-fn.c (scatter_store_direct): New macro.
15476         (expand_scatter_store_optab_fn): New function.
15477         (direct_scatter_store_optab_supported_p): New macro.
15478         (internal_store_fn_p): New function.
15479         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15480         IFN_MASK_SCATTER_STORE.
15481         (internal_fn_mask_index): Likewise.
15482         (internal_fn_stored_value_index): New function.
15483         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15484         for scatter stores.
15485         * optabs-query.h (supports_vec_scatter_store_p): Declare.
15486         * optabs-query.c (supports_vec_scatter_store_p): New function.
15487         * tree-vectorizer.h (vect_get_store_rhs): Declare.
15488         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15489         true for scatter stores.
15490         (vect_gather_scatter_fn_p): Handle scatter stores too.
15491         (vect_check_gather_scatter): Consider using scatter stores if
15492         supports_vec_scatter_store_p.
15493         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15494         scatter stores too.
15495         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15496         internal_fn_stored_value_index.
15497         (check_load_store_masking): Handle scatter stores too.
15498         (vect_get_store_rhs): Make public.
15499         (vectorizable_call): Use internal_store_fn_p.
15500         (vectorizable_store): Handle scatter store internal functions.
15501         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15502         when deciding whether the end of the group has been reached.
15503         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15504         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15505         (mask_scatter_store<mode>): New insns.
15507 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15508             Alan Hayward  <alan.hayward@arm.com>
15509             David Sherwood  <david.sherwood@arm.com>
15511         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15512         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15513         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15514         function.
15515         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15516         Use vect_truncate_gather_scatter_offset if we can't treat the
15517         operation as a normal gather load or scatter store.
15518         (get_group_load_store_type): Take the gather_scatter_info
15519         as argument.  Try using a gather load or scatter store for
15520         single-element groups.
15521         (get_load_store_type): Update calls to get_group_load_store_type
15522         and vect_use_strided_gather_scatters_p.
15524 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15525             Alan Hayward  <alan.hayward@arm.com>
15526             David Sherwood  <david.sherwood@arm.com>
15528         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15529         optional tree argument.
15530         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15531         null target hooks.
15532         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15533         but continue to use the current value as a fallback.
15534         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15535         to compare the updates.
15536         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15537         (get_load_store_type): Use it when handling a strided access.
15538         (vect_get_strided_load_store_ops): New function.
15539         (vect_get_data_ptr_increment): Likewise.
15540         (vectorizable_load): Handle strided gather loads.  Always pass
15541         a step to vect_create_data_ref_ptr and bump_vector_ptr.
15543 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15544             Alan Hayward  <alan.hayward@arm.com>
15545             David Sherwood  <david.sherwood@arm.com>
15547         * doc/md.texi (gather_load@var{m}): Document.
15548         (mask_gather_load@var{m}): Likewise.
15549         * genopinit.c (main): Add supports_vec_gather_load and
15550         supports_vec_gather_load_cached to target_optabs.
15551         * optabs-tree.c (init_tree_optimization_optabs): Use
15552         ggc_cleared_alloc to allocate target_optabs.
15553         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15554         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15555         functions.
15556         * internal-fn.h (internal_load_fn_p): Declare.
15557         (internal_gather_scatter_fn_p): Likewise.
15558         (internal_fn_mask_index): Likewise.
15559         (internal_gather_scatter_fn_supported_p): Likewise.
15560         * internal-fn.c (gather_load_direct): New macro.
15561         (expand_gather_load_optab_fn): New function.
15562         (direct_gather_load_optab_supported_p): New macro.
15563         (direct_internal_fn_optab): New function.
15564         (internal_load_fn_p): Likewise.
15565         (internal_gather_scatter_fn_p): Likewise.
15566         (internal_fn_mask_index): Likewise.
15567         (internal_gather_scatter_fn_supported_p): Likewise.
15568         * optabs-query.c (supports_at_least_one_mode_p): New function.
15569         (supports_vec_gather_load_p): Likewise.
15570         * optabs-query.h (supports_vec_gather_load_p): Declare.
15571         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15572         and memory_type field.
15573         (NUM_PATTERNS): Bump to 15.
15574         * tree-vect-data-refs.c: Include internal-fn.h.
15575         (vect_gather_scatter_fn_p): New function.
15576         (vect_describe_gather_scatter_call): Likewise.
15577         (vect_check_gather_scatter): Try using internal functions for
15578         gather loads.  Recognize existing calls to a gather load function.
15579         (vect_analyze_data_refs): Consider using gather loads if
15580         supports_vec_gather_load_p.
15581         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15582         (vect_get_gather_scatter_offset_type): Likewise.
15583         (vect_convert_mask_for_vectype): Likewise.
15584         (vect_add_conversion_to_patterm): Likewise.
15585         (vect_try_gather_scatter_pattern): Likewise.
15586         (vect_recog_gather_scatter_pattern): New pattern recognizer.
15587         (vect_vect_recog_func_ptrs): Add it.
15588         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15589         internal_fn_mask_index and internal_gather_scatter_fn_p.
15590         (check_load_store_masking): Take the gather_scatter_info as an
15591         argument and handle gather loads.
15592         (vect_get_gather_scatter_ops): New function.
15593         (vectorizable_call): Check internal_load_fn_p.
15594         (vectorizable_load): Likewise.  Handle gather load internal
15595         functions.
15596         (vectorizable_store): Update call to check_load_store_masking.
15597         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15598         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15599         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15600         (aarch64_gather_scale_operand_d): New predicates.
15601         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15602         (mask_gather_load<mode>): New insns.
15604 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15605             Alan Hayward  <alan.hayward@arm.com>
15606             David Sherwood  <david.sherwood@arm.com>
15608         * optabs.def (fold_left_plus_optab): New optab.
15609         * doc/md.texi (fold_left_plus_@var{m}): Document.
15610         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15611         * internal-fn.c (fold_left_direct): Define.
15612         (expand_fold_left_optab_fn): Likewise.
15613         (direct_fold_left_optab_supported_p): Likewise.
15614         * fold-const-call.c (fold_const_fold_left): New function.
15615         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15616         * tree-parloops.c (valid_reduction_p): New function.
15617         (gather_scalar_reductions): Use it.
15618         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15619         (vect_finish_replace_stmt): Declare.
15620         * tree-vect-loop.c (fold_left_reduction_fn): New function.
15621         (needs_fold_left_reduction_p): New function, split out from...
15622         (vect_is_simple_reduction): ...here.  Accept reductions that
15623         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15624         (vect_force_simple_reduction): Also store the reduction type in
15625         the assignment's STMT_VINFO_REDUC_TYPE.
15626         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15627         (merge_with_identity): New function.
15628         (vect_expand_fold_left): Likewise.
15629         (vectorize_fold_left_reduction): Likewise.
15630         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
15631         scalar phi in place for it.  Check for target support and reject
15632         cases that would reassociate the operation.  Defer the transform
15633         phase to vectorize_fold_left_reduction.
15634         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15635         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15636         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15638 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15640         * tree-if-conv.c (predicate_mem_writes): Remove redundant
15641         call to ifc_temp_var.
15643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15644             Alan Hayward  <alan.hayward@arm.com>
15645             David Sherwood  <david.sherwood@arm.com>
15647         * target.def (legitimize_address_displacement): Take the original
15648         offset as a poly_int.
15649         * targhooks.h (default_legitimize_address_displacement): Update
15650         accordingly.
15651         * targhooks.c (default_legitimize_address_displacement): Likewise.
15652         * doc/tm.texi: Regenerate.
15653         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15654         as an argument, moving assert of ad->disp == ad->disp_term to...
15655         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
15656         Try calling targetm.legitimize_address_displacement before expanding
15657         the address rather than afterwards, and adjust for the new interface.
15658         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15659         Match the new hook interface.  Handle SVE addresses.
15660         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15661         new hook interface.
15663 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15665         * Makefile.in (OBJS): Add early-remat.o.
15666         * target.def (select_early_remat_modes): New hook.
15667         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15668         * doc/tm.texi: Regenerate.
15669         * targhooks.h (default_select_early_remat_modes): Declare.
15670         * targhooks.c (default_select_early_remat_modes): New function.
15671         * timevar.def (TV_EARLY_REMAT): New timevar.
15672         * passes.def (pass_early_remat): New pass.
15673         * tree-pass.h (make_pass_early_remat): Declare.
15674         * early-remat.c: New file.
15675         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15676         function.
15677         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15679 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15680             Alan Hayward  <alan.hayward@arm.com>
15681             David Sherwood  <david.sherwood@arm.com>
15683         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15684         vfm1 with a bound_epilog parameter.
15685         (vect_do_peeling): Update calls accordingly, and move the prologue
15686         call earlier in the function.  Treat the base bound_epilog as 0 for
15687         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
15688         this base when peeling for gaps.
15689         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15690         with fully-masked loops.
15691         (vect_estimate_min_profitable_iters): Handle the single peeled
15692         iteration in that case.
15694 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15695             Alan Hayward  <alan.hayward@arm.com>
15696             David Sherwood  <david.sherwood@arm.com>
15698         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15699         single-element interleaving even if the size is not a power of 2.
15700         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15701         accesses for single-element interleaving if the group size is
15702         not a power of 2.
15704 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15705             Alan Hayward  <alan.hayward@arm.com>
15706             David Sherwood  <david.sherwood@arm.com>
15708         * doc/md.texi (fold_extract_last_@var{m}): Document.
15709         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15710         * optabs.def (fold_extract_last_optab): New optab.
15711         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15712         * internal-fn.c (fold_extract_direct): New macro.
15713         (expand_fold_extract_optab_fn): Likewise.
15714         (direct_fold_extract_optab_supported_p): Likewise.
15715         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15716         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15717         EXTRACT_LAST_REDUCTION.
15718         (get_initial_def_for_reduction): Do not create an initial vector
15719         for EXTRACT_LAST_REDUCTION reductions.
15720         (vectorizable_reduction): Leave the scalar phi in place for
15721         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
15722         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
15723         epilogue code for EXTRACT_LAST_REDUCTION and defer the
15724         transform phase to vectorizable_condition.
15725         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15726         split out from...
15727         (vect_finish_stmt_generation): ...here.
15728         (vect_finish_replace_stmt): New function.
15729         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15730         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15731         pattern.
15732         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15734 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15735             Alan Hayward  <alan.hayward@arm.com>
15736             David Sherwood  <david.sherwood@arm.com>
15738         * doc/md.texi (extract_last_@var{m}): Document.
15739         * optabs.def (extract_last_optab): New optab.
15740         * internal-fn.def (EXTRACT_LAST): New internal function.
15741         * internal-fn.c (cond_unary_direct): New macro.
15742         (expand_cond_unary_optab_fn): Likewise.
15743         (direct_cond_unary_optab_supported_p): Likewise.
15744         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15745         loops using EXTRACT_LAST.
15746         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15747         (extract_last_<mode>): ...this optab.
15748         (vec_extract<mode><Vel>): Update accordingly.
15750 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15751             Alan Hayward  <alan.hayward@arm.com>
15752             David Sherwood  <david.sherwood@arm.com>
15754         * target.def (empty_mask_is_expensive): New hook.
15755         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15756         * doc/tm.texi: Regenerate.
15757         * targhooks.h (default_empty_mask_is_expensive): Declare.
15758         * targhooks.c (default_empty_mask_is_expensive): New function.
15759         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15760         if the target says that empty masks are expensive.
15761         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15762         New function.
15763         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15765 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15766             Alan Hayward  <alan.hayward@arm.com>
15767             David Sherwood  <david.sherwood@arm.com>
15769         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15770         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15771         (vect_use_loop_mask_for_alignment_p): New function.
15772         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15773         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15774         niters_skip argument.  Make sure that the first niters_skip elements
15775         of the first iteration are inactive.
15776         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15777         Update call to vect_set_loop_masks_directly.
15778         (get_misalign_in_elems): New function, split out from...
15779         (vect_gen_prolog_loop_niters): ...here.
15780         (vect_update_init_of_dr): Take a code argument that specifies whether
15781         the adjustment should be added or subtracted.
15782         (vect_update_init_of_drs): Likewise.
15783         (vect_prepare_for_masked_peels): New function.
15784         (vect_do_peeling): Skip prologue peeling if we're using a mask
15785         instead.  Update call to vect_update_inits_of_drs.
15786         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15787         mask_skip_niters.
15788         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15789         alignment.  Do not include the number of peeled iterations in
15790         the minimum threshold in that case.
15791         (vectorizable_induction): Adjust the start value down by
15792         LOOP_VINFO_MASK_SKIP_NITERS iterations.
15793         (vect_transform_loop): Call vect_prepare_for_masked_peels.
15794         Take the number of skipped iterations into account when calculating
15795         the loop bounds.
15796         * tree-vect-stmts.c (vect_gen_while_not): New function.
15798 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15799             Alan Hayward  <alan.hayward@arm.com>
15800             David Sherwood  <david.sherwood@arm.com>
15802         * doc/sourcebuild.texi (vect_fully_masked): Document.
15803         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15804         default value to 0.
15805         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15806         split out from...
15807         (vect_analyze_loop_2): ...here. Don't check the vectorization
15808         factor against the number of loop iterations if the loop is
15809         fully-masked.
15811 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15812             Alan Hayward  <alan.hayward@arm.com>
15813             David Sherwood  <david.sherwood@arm.com>
15815         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15816         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15817         (dump_groups): Update accordingly.
15818         (iv_use::mem_type): New member variable.
15819         (address_p): New function.
15820         (record_use): Add a mem_type argument and initialize the new
15821         mem_type field.
15822         (record_group_use): Add a mem_type argument.  Use address_p.
15823         Remove obsolete null checks of base_object.  Update call to record_use.
15824         (find_interesting_uses_op): Update call to record_group_use.
15825         (find_interesting_uses_cond): Likewise.
15826         (find_interesting_uses_address): Likewise.
15827         (get_mem_type_for_internal_fn): New function.
15828         (find_address_like_use): Likewise.
15829         (find_interesting_uses_stmt): Try find_address_like_use before
15830         calling find_interesting_uses_op.
15831         (addr_offset_valid_p): Use the iv mem_type field as the type
15832         of the addressed memory.
15833         (add_autoinc_candidates): Likewise.
15834         (get_address_cost): Likewise.
15835         (split_small_address_groups_p): Use address_p.
15836         (split_address_groups): Likewise.
15837         (add_iv_candidate_for_use): Likewise.
15838         (autoinc_possible_for_pair): Likewise.
15839         (rewrite_groups): Likewise.
15840         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
15841         (determine_group_iv_cost): Update after split of USE_ADDRESS.
15842         (get_alias_ptr_type_for_ptr_address): New function.
15843         (rewrite_use_address): Rewrite address uses in calls that were
15844         identified by find_address_like_use.
15846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15847             Alan Hayward  <alan.hayward@arm.com>
15848             David Sherwood  <david.sherwood@arm.com>
15850         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
15851         TARGET_MEM_REFs.
15852         * gimple-expr.h (is_gimple_addressable: Likewise.
15853         * gimple-expr.c (is_gimple_address): Likewise.
15854         * internal-fn.c (expand_call_mem_ref): New function.
15855         (expand_mask_load_optab_fn): Use it.
15856         (expand_mask_store_optab_fn): Likewise.
15858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15859             Alan Hayward  <alan.hayward@arm.com>
15860             David Sherwood  <david.sherwood@arm.com>
15862         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15863         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15864         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15865         (cond_umax@var{mode}): Document.
15866         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15867         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15868         (cond_umin_optab, cond_umax_optab): New optabs.
15869         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15870         (COND_IOR, COND_XOR): New internal functions.
15871         * internal-fn.h (get_conditional_internal_fn): Declare.
15872         * internal-fn.c (cond_binary_direct): New macro.
15873         (expand_cond_binary_optab_fn): Likewise.
15874         (direct_cond_binary_optab_supported_p): Likewise.
15875         (get_conditional_internal_fn): New function.
15876         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15877         Cope with reduction statements that are vectorized as calls rather
15878         than assignments.
15879         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15880         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15881         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15882         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15883         (UNSPEC_COND_EOR): New unspecs.
15884         (optab): Add mappings for them.
15885         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15886         (sve_int_op, sve_fp_op): New int attributes.
15888 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15889             Alan Hayward  <alan.hayward@arm.com>
15890             David Sherwood  <david.sherwood@arm.com>
15892         * optabs.def (while_ult_optab): New optab.
15893         * doc/md.texi (while_ult@var{m}@var{n}): Document.
15894         * internal-fn.def (WHILE_ULT): New internal function.
15895         * internal-fn.h (direct_internal_fn_supported_p): New override
15896         that takes two types as argument.
15897         * internal-fn.c (while_direct): New macro.
15898         (expand_while_optab_fn): New function.
15899         (convert_optab_supported_p): Likewise.
15900         (direct_while_optab_supported_p): New macro.
15901         * wide-int.h (wi::udiv_ceil): New function.
15902         * tree-vectorizer.h (rgroup_masks): New structure.
15903         (vec_loop_masks): New typedef.
15904         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15905         and fully_masked_p.
15906         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15907         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15908         (vect_max_vf): New function.
15909         (slpeel_make_loop_iterate_ntimes): Delete.
15910         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15911         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15912         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15913         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15914         internal-fn.h, stor-layout.h and optabs-query.h.
15915         (vect_set_loop_mask): New function.
15916         (add_preheader_seq): Likewise.
15917         (add_header_seq): Likewise.
15918         (interleave_supported_p): Likewise.
15919         (vect_maybe_permute_loop_masks): Likewise.
15920         (vect_set_loop_masks_directly): Likewise.
15921         (vect_set_loop_condition_masked): Likewise.
15922         (vect_set_loop_condition_unmasked): New function, split out from
15923         slpeel_make_loop_iterate_ntimes.
15924         (slpeel_make_loop_iterate_ntimes): Rename to..
15925         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
15926         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15927         (vect_do_peeling): Update call accordingly.
15928         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15929         loops.
15930         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15931         mask_compare_type, can_fully_mask_p and fully_masked_p.
15932         (release_vec_loop_masks): New function.
15933         (_loop_vec_info): Use it to free the loop masks.
15934         (can_produce_all_loop_masks_p): New function.
15935         (vect_get_max_nscalars_per_iter): Likewise.
15936         (vect_verify_full_masking): Likewise.
15937         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15938         retries, and free the mask rgroups before retrying.  Check loop-wide
15939         reasons for disallowing fully-masked loops.  Make the final decision
15940         about whether use a fully-masked loop or not.
15941         (vect_estimate_min_profitable_iters): Do not assume that peeling
15942         for the number of iterations will be needed for fully-masked loops.
15943         (vectorizable_reduction): Disable fully-masked loops.
15944         (vectorizable_live_operation): Likewise.
15945         (vect_halve_mask_nunits): New function.
15946         (vect_double_mask_nunits): Likewise.
15947         (vect_record_loop_mask): Likewise.
15948         (vect_get_loop_mask): Likewise.
15949         (vect_transform_loop): Handle the case in which the final loop
15950         iteration might handle a partial vector.  Call vect_set_loop_condition
15951         instead of slpeel_make_loop_iterate_ntimes.
15952         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15953         (check_load_store_masking): New function.
15954         (prepare_load_store_mask): Likewise.
15955         (vectorizable_store): Handle fully-masked loops.
15956         (vectorizable_load): Likewise.
15957         (supportable_widening_operation): Use vect_halve_mask_nunits for
15958         booleans.
15959         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15960         (vect_gen_while): New function.
15961         * config/aarch64/aarch64.md (umax<mode>3): New expander.
15962         (aarch64_uqdec<mode>): New insn.
15964 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15965             Alan Hayward  <alan.hayward@arm.com>
15966             David Sherwood  <david.sherwood@arm.com>
15968         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15969         (reduc_xor_scal_optab): New optabs.
15970         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15971         (reduc_xor_scal_@var{m}): Document.
15972         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15973         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15974         internal functions.
15975         * fold-const-call.c (fold_const_call): Handle them.
15976         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15977         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15978         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15979         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15980         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15981         (UNSPEC_XORV): New unspecs.
15982         (optab): Add entries for them.
15983         (BITWISEV): New int iterator.
15984         (bit_reduc_op): New int attributes.
15986 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15987             Alan Hayward  <alan.hayward@arm.com>
15988             David Sherwood  <david.sherwood@arm.com>
15990         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15991         * internal-fn.def (VEC_SHL_INSERT): New internal function.
15992         * optabs.def (vec_shl_insert_optab): New optab.
15993         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15994         (duplicate_and_interleave): Likewise.
15995         * tree-vect-loop.c: Include internal-fn.h.
15996         (neutral_op_for_slp_reduction): New function, split out from
15997         get_initial_defs_for_reduction.
15998         (get_initial_def_for_reduction): Handle option 2 for variable-length
15999         vectors by loading the neutral value into a vector and then shifting
16000         the initial value into element 0.
16001         (get_initial_defs_for_reduction): Replace the code argument with
16002         the neutral value calculated by neutral_op_for_slp_reduction.
16003         Use gimple_build_vector for constant-length vectors.
16004         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16005         but the first group_size elements have a neutral value.
16006         Use duplicate_and_interleave otherwise.
16007         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16008         Update call to get_initial_defs_for_reduction.  Handle SLP
16009         reductions for variable-length vectors by creating one vector
16010         result for each scalar result, with the elements associated
16011         with other scalar results stubbed out with the neutral value.
16012         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16013         Require IFN_VEC_SHL_INSERT for double reductions on
16014         variable-length vectors, or SLP reductions that have
16015         a neutral value.  Require can_duplicate_and_interleave_p
16016         support for variable-length unchained SLP reductions if there
16017         is no neutral value, such as for MIN/MAX reductions.  Also require
16018         the number of vector elements to be a multiple of the number of
16019         SLP statements when doing variable-length unchained SLP reductions.
16020         Update call to vect_create_epilog_for_reduction.
16021         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16022         and remove initial values.
16023         (duplicate_and_interleave): Make public.
16024         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16025         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16027 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16028             Alan Hayward  <alan.hayward@arm.com>
16029             David Sherwood  <david.sherwood@arm.com>
16031         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16032         (can_duplicate_and_interleave_p): New function.
16033         (vect_get_and_check_slp_defs): Take the vector of statements
16034         rather than just the current one.  Remove excess parentheses.
16035         Restriction rejectinon of vect_constant_def and vect_external_def
16036         for variable-length vectors to boolean types, or types for which
16037         can_duplicate_and_interleave_p is false.
16038         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16039         (duplicate_and_interleave): New function.
16040         (vect_get_constant_vectors): Use gimple_build_vector for
16041         constant-length vectors and suitable variable-length constant
16042         vectors.  Use duplicate_and_interleave for other variable-length
16043         vectors.  Don't defer the update when inserting new statements.
16045 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16046             Alan Hayward  <alan.hayward@arm.com>
16047             David Sherwood  <david.sherwood@arm.com>
16049         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16050         min_profitable_iters doesn't go negative.
16052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16053             Alan Hayward  <alan.hayward@arm.com>
16054             David Sherwood  <david.sherwood@arm.com>
16056         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16057         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16058         * optabs.def (vec_mask_load_lanes_optab): New optab.
16059         (vec_mask_store_lanes_optab): Likewise.
16060         * internal-fn.def (MASK_LOAD_LANES): New internal function.
16061         (MASK_STORE_LANES): Likewise.
16062         * internal-fn.c (mask_load_lanes_direct): New macro.
16063         (mask_store_lanes_direct): Likewise.
16064         (expand_mask_load_optab_fn): Handle masked operations.
16065         (expand_mask_load_lanes_optab_fn): New macro.
16066         (expand_mask_store_optab_fn): Handle masked operations.
16067         (expand_mask_store_lanes_optab_fn): New macro.
16068         (direct_mask_load_lanes_optab_supported_p): Likewise.
16069         (direct_mask_store_lanes_optab_supported_p): Likewise.
16070         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16071         parameter.
16072         (vect_load_lanes_supported): Likewise.
16073         * tree-vect-data-refs.c (strip_conversion): New function.
16074         (can_group_stmts_p): Likewise.
16075         (vect_analyze_data_ref_accesses): Use it instead of checking
16076         for a pair of assignments.
16077         (vect_store_lanes_supported): Take a masked_p parameter.
16078         (vect_load_lanes_supported): Likewise.
16079         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16080         vect_store_lanes_supported and vect_load_lanes_supported.
16081         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16082         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16083         parameter.  Don't allow gaps for masked accesses.
16084         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
16085         and vect_load_lanes_supported.
16086         (get_load_store_type): Take a masked_p parameter and update
16087         call to get_group_load_store_type.
16088         (vectorizable_store): Update call to get_load_store_type.
16089         Handle IFN_MASK_STORE_LANES.
16090         (vectorizable_load): Update call to get_load_store_type.
16091         Handle IFN_MASK_LOAD_LANES.
16093 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16094             Alan Hayward  <alan.hayward@arm.com>
16095             David Sherwood  <david.sherwood@arm.com>
16097         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16098         modes for SVE.
16099         * config/aarch64/aarch64-protos.h
16100         (aarch64_sve_struct_memory_operand_p): Declare.
16101         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16102         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16103         (VPRED, vpred): Handle SVE structure modes.
16104         * config/aarch64/constraints.md (Utx): New constraint.
16105         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16106         (aarch64_sve_struct_nonimmediate_operand): New predicates.
16107         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16108         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16109         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16110         structure modes.  Split into pieces after RA.
16111         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16112         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16113         New patterns.
16114         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16115         SVE structure modes.
16116         (aarch64_classify_address): Likewise.
16117         (sizetochar): Move earlier in file.
16118         (aarch64_print_operand): Handle SVE register lists.
16119         (aarch64_array_mode): New function.
16120         (aarch64_sve_struct_memory_operand_p): Likewise.
16121         (TARGET_ARRAY_MODE): Redefine.
16123 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16124             Alan Hayward  <alan.hayward@arm.com>
16125             David Sherwood  <david.sherwood@arm.com>
16127         * target.def (array_mode): New target hook.
16128         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16129         * doc/tm.texi: Regenerate.
16130         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16131         * hooks.c (hook_optmode_mode_uhwi_none): New function.
16132         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16133         targetm.array_mode.
16134         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
16135         type sizes.
16137 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16138             Alan Hayward  <alan.hayward@arm.com>
16139             David Sherwood  <david.sherwood@arm.com>
16141         * fold-const.c (fold_binary_loc): Check the argument types
16142         rather than the result type when testing for a vector operation.
16144 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16146         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16147         * doc/tm.texi: Regenerate.
16149 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16150             Alan Hayward  <alan.hayward@arm.com>
16151             David Sherwood  <david.sherwood@arm.com>
16153         * doc/invoke.texi (-msve-vector-bits=): Document new option.
16154         (sve): Document new AArch64 extension.
16155         * doc/md.texi (w): Extend the description of the AArch64
16156         constraint to include SVE vectors.
16157         (Upl, Upa): Document new AArch64 predicate constraints.
16158         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16159         enum.
16160         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16161         (msve-vector-bits=): New option.
16162         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16163         SVE when these are disabled.
16164         (sve): New extension.
16165         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16166         modes.  Adjust their number of units based on aarch64_sve_vg.
16167         (MAX_BITSIZE_MODE_ANY_MODE): Define.
16168         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16169         aarch64_addr_query_type.
16170         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16171         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16172         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16173         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16174         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16175         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16176         (aarch64_simd_imm_zero_p): Delete.
16177         (aarch64_check_zero_based_sve_index_immediate): Declare.
16178         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16179         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16180         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16181         (aarch64_sve_float_mul_immediate_p): Likewise.
16182         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16183         rather than an rtx.
16184         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16185         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16186         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16187         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16188         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16189         (aarch64_regmode_natural_size): Likewise.
16190         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16191         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16192         left one place.
16193         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16194         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16195         for VG and the SVE predicate registers.
16196         (V_ALIASES): Add a "z"-prefixed alias.
16197         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16198         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16199         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16200         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16201         (REG_CLASS_NAMES): Add entries for them.
16202         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
16203         and the predicate registers.
16204         (aarch64_sve_vg): Declare.
16205         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16206         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16207         (REGMODE_NATURAL_SIZE): Define.
16208         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16209         SVE macros.
16210         * config/aarch64/aarch64.c: Include cfgrtl.h.
16211         (simd_immediate_info): Add a constructor for series vectors,
16212         and an associated step field.
16213         (aarch64_sve_vg): New variable.
16214         (aarch64_dbx_register_number): Handle VG and the predicate registers.
16215         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16216         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16217         (VEC_ANY_DATA, VEC_STRUCT): New constants.
16218         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16219         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16220         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16221         (aarch64_get_mask_mode): New functions.
16222         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16223         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16224         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
16225         predicate modes and predicate registers.  Explicitly restrict
16226         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
16227         to store a vector mode if it is recognized by
16228         aarch64_classify_vector_mode.
16229         (aarch64_regmode_natural_size): New function.
16230         (aarch64_hard_regno_caller_save_mode): Return the original mode
16231         for predicates.
16232         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16233         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16234         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16235         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16236         functions.
16237         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
16238         does not overlap dest if the function is frame-related.  Handle
16239         SVE constants.
16240         (aarch64_split_add_offset): New function.
16241         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16242         them aarch64_add_offset.
16243         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16244         and update call to aarch64_sub_sp.
16245         (aarch64_add_cfa_expression): New function.
16246         (aarch64_expand_prologue): Pass extra temporary registers to the
16247         functions above.  Handle the case in which we need to emit new
16248         DW_CFA_expressions for registers that were originally saved
16249         relative to the stack pointer, but now have to be expressed
16250         relative to the frame pointer.
16251         (aarch64_output_mi_thunk): Pass extra temporary registers to the
16252         functions above.
16253         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
16254         IP0 and IP1 values for SVE frames.
16255         (aarch64_expand_vec_series): New function.
16256         (aarch64_expand_sve_widened_duplicate): Likewise.
16257         (aarch64_expand_sve_const_vector): Likewise.
16258         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16259         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
16260         into the register, rather than emitting a SET directly.
16261         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16262         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16263         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16264         (offset_9bit_signed_scaled_p): New functions.
16265         (aarch64_replicate_bitmask_imm): New function.
16266         (aarch64_bitmask_imm): Use it.
16267         (aarch64_cannot_force_const_mem): Reject expressions involving
16268         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
16269         (aarch64_classify_index): Handle SVE indices, by requiring
16270         a plain register index with a scale that matches the element size.
16271         (aarch64_classify_address): Handle SVE addresses.  Assert that
16272         the mode of the address is VOIDmode or an integer mode.
16273         Update call to aarch64_classify_symbol.
16274         (aarch64_classify_symbolic_expression): Update call to
16275         aarch64_classify_symbol.
16276         (aarch64_const_vec_all_in_range_p): New function.
16277         (aarch64_print_vector_float_operand): Likewise.
16278         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
16279         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
16280         and the FP immediates 1.0 and 0.5.
16281         (aarch64_print_address_internal): Handle SVE addresses.
16282         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16283         (aarch64_regno_regclass): Handle predicate registers.
16284         (aarch64_secondary_reload): Handle big-endian reloads of SVE
16285         data modes.
16286         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16287         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16288         (aarch64_convert_sve_vector_bits): New function.
16289         (aarch64_override_options): Use it to handle -msve-vector-bits=.
16290         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16291         rather than an rtx.
16292         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16293         Handle SVE vector and predicate modes.  Accept VL-based constants
16294         that need only one temporary register, and VL offsets that require
16295         no temporary registers.
16296         (aarch64_conditional_register_usage): Mark the predicate registers
16297         as fixed if SVE isn't available.
16298         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16299         Return true for SVE vector and predicate modes.
16300         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16301         rather than an unsigned int.  Handle SVE modes.
16302         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
16303         SVE modes.
16304         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16305         if SVE is enabled.
16306         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16307         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16308         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16309         (aarch64_sve_float_mul_immediate_p): New functions.
16310         (aarch64_sve_valid_immediate): New function.
16311         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16312         Explicitly reject structure modes.  Check for INDEX constants.
16313         Handle PTRUE and PFALSE constants.
16314         (aarch64_check_zero_based_sve_index_immediate): New function.
16315         (aarch64_simd_imm_zero_p): Delete.
16316         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16317         vector modes.  Accept constants in the range of CNT[BHWD].
16318         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16319         ask for an Advanced SIMD mode.
16320         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16321         (aarch64_simd_vector_alignment): Handle SVE predicates.
16322         (aarch64_vectorize_preferred_vector_alignment): New function.
16323         (aarch64_simd_vector_alignment_reachable): Use it instead of
16324         the vector size.
16325         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16326         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16327         functions.
16328         (MAX_VECT_LEN): Delete.
16329         (expand_vec_perm_d): Add a vec_flags field.
16330         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16331         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16332         (aarch64_evpc_ext): Don't apply a big-endian lane correction
16333         for SVE modes.
16334         (aarch64_evpc_rev): Rename to...
16335         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
16336         (aarch64_evpc_rev_global): New function.
16337         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16338         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16339         MAX_VECT_LEN.
16340         (aarch64_evpc_sve_tbl): New function.
16341         (aarch64_expand_vec_perm_const_1): Update after rename of
16342         aarch64_evpc_rev.  Handle SVE permutes too, trying
16343         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16344         than aarch64_evpc_tbl.
16345         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16346         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16347         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16348         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16349         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16350         (aarch64_expand_sve_vcond): New functions.
16351         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16352         of aarch64_vector_mode_p.
16353         (aarch64_dwarf_poly_indeterminate_value): New function.
16354         (aarch64_compute_pressure_classes): Likewise.
16355         (aarch64_can_change_mode_class): Likewise.
16356         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16357         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16358         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16359         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16360         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16361         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16362         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16363         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16364         constraints.
16365         (Dn, Dl, Dr): Accept const as well as const_vector.
16366         (Dz): Likewise.  Compare against CONST0_RTX.
16367         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16368         of "vector" where appropriate.
16369         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16370         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16371         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16372         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16373         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16374         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16375         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16376         (v_int_equiv): Extend to SVE modes.
16377         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16378         mode attributes.
16379         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16380         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16381         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16382         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16383         (SVE_COND_FP_CMP): New int iterators.
16384         (perm_hilo): Handle the new unpack unspecs.
16385         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16386         attributes.
16387         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16388         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16389         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16390         (aarch64_equality_operator, aarch64_constant_vector_operand)
16391         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16392         (aarch64_sve_nonimmediate_operand): Likewise.
16393         (aarch64_sve_general_operand): Likewise.
16394         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16395         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16396         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16397         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16398         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16399         (aarch64_sve_float_arith_immediate): Likewise.
16400         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16401         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16402         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16403         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16404         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16405         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16406         (aarch64_sve_float_arith_operand): Likewise.
16407         (aarch64_sve_float_arith_with_sub_operand): Likewise.
16408         (aarch64_sve_float_mul_operand): Likewise.
16409         (aarch64_sve_vec_perm_operand): Likewise.
16410         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16411         (aarch64_mov_operand): Accept const_poly_int and const_vector.
16412         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16413         as well as const_vector.
16414         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16415         in file.  Use CONST0_RTX and CONSTM1_RTX.
16416         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
16417         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16418         Use aarch64_simd_imm_zero.
16419         * config/aarch64/aarch64-sve.md: New file.
16420         * config/aarch64/aarch64.md: Include it.
16421         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16422         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16423         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16424         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16425         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16426         (sve): New attribute.
16427         (enabled): Disable instructions with the sve attribute unless
16428         TARGET_SVE.
16429         (movqi, movhi): Pass CONST_POLY_INT operaneds through
16430         aarch64_expand_mov_immediate.
16431         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16432         CNT[BHSD] immediates.
16433         (movti): Split CONST_POLY_INT moves into two halves.
16434         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16435         Split additions that need a temporary here if the destination
16436         is the stack pointer.
16437         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16438         (*add<mode>3_poly_1): New instruction.
16439         (set_clobber_cc): New expander.
16441 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16443         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16444         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
16445         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16446         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16447         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
16448         Change innermode from fixed_mode_size to machine_mode.
16449         (simplify_subreg): Update call accordingly.  Handle a constant-sized
16450         subreg of a variable-length CONST_VECTOR.
16452 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16453             Alan Hayward  <alan.hayward@arm.com>
16454             David Sherwood  <david.sherwood@arm.com>
16456         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16457         (add_offset_to_base): New function, split out from...
16458         (create_mem_ref): ...here.  When handling a scale other than 1,
16459         check first whether the address is valid without the offset.
16460         Add it into the base if so, leaving the index and scale as-is.
16462 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16464         PR c++/83778
16465         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16466         fold_for_warn before checking if arg2 is INTEGER_CST.
16468 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
16470         * config/rs6000/predicates.md (load_multiple_operation): Delete.
16471         (store_multiple_operation): Delete.
16472         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16473         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16474         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16475         guarded by TARGET_STRING.
16476         (rs6000_output_load_multiple): Delete.
16477         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16478         OPTION_MASK_STRING / TARGET_STRING handling.
16479         (print_operand) <'N', 'O'>: Add comment that these are unused now.
16480         (const rs6000_opt_masks) <"string">: Change mask to 0.
16481         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16482         (MASK_STRING): Delete.
16483         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16484         parts.  Simplify.
16485         (load_multiple): Delete.
16486         (*ldmsi8): Delete.
16487         (*ldmsi7): Delete.
16488         (*ldmsi6): Delete.
16489         (*ldmsi5): Delete.
16490         (*ldmsi4): Delete.
16491         (*ldmsi3): Delete.
16492         (store_multiple): Delete.
16493         (*stmsi8): Delete.
16494         (*stmsi7): Delete.
16495         (*stmsi6): Delete.
16496         (*stmsi5): Delete.
16497         (*stmsi4): Delete.
16498         (*stmsi3): Delete.
16499         (movmemsi_8reg): Delete.
16500         (corresponding unnamed define_insn): Delete.
16501         (movmemsi_6reg): Delete.
16502         (corresponding unnamed define_insn): Delete.
16503         (movmemsi_4reg): Delete.
16504         (corresponding unnamed define_insn): Delete.
16505         (movmemsi_2reg): Delete.
16506         (corresponding unnamed define_insn): Delete.
16507         (movmemsi_1reg): Delete.
16508         (corresponding unnamed define_insn): Delete.
16509         * config/rs6000/rs6000.opt (mno-string): New.
16510         (mstring): Replace by deprecation warning stub.
16511         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16513 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16515         * regrename.c (regrename_do_replace): If replacing the same
16516         reg multiple times, try to reuse last created gen_raw_REG.
16518         PR debug/81155
16519         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16520         main to workaround a bug in GDB.
16522 2018-01-12  Tom de Vries  <tom@codesourcery.com>
16524         PR target/83737
16525         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16527 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
16529         PR rtl-optimization/80481
16530         * ira-color.c (get_cap_member): New function.
16531         (allocnos_conflict_by_live_ranges_p): Use it.
16532         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16533         (setup_slot_coalesced_allocno_live_ranges): Ditto.
16535 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
16537         PR target/83628
16538         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16539         (*saddl_se_1): Ditto.
16540         (*ssubsi_1): Ditto.
16541         (*ssubl_se_1): Ditto.
16543 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16545         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16546         rather than wi::to_widest for DR_INITs.
16547         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16548         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16549         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16550         INTEGER_CSTs.
16551         (vect_analyze_group_access_1): Note that here.
16553 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16555         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16556         polynomial type sizes.
16558 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16560         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16561         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16562         (gimple_add_tmp_var): Likewise.
16564 2018-01-12  Martin Liska  <mliska@suse.cz>
16566         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16567         (gimple_alloc_sizes): Likewise.
16568         (dump_gimple_statistics): Use PRIu64 in printf format.
16569         * gimple.h: Change uint64_t to int.
16571 2018-01-12  Martin Liska  <mliska@suse.cz>
16573         * tree-core.h: Use uint64_t instead of int.
16574         * tree.c (tree_node_counts): Likewise.
16575         (tree_node_sizes): Likewise.
16576         (dump_tree_statistics): Use PRIu64 in printf format.
16578 2018-01-12  Martin Liska  <mliska@suse.cz>
16580         * Makefile.in: As qsort_chk is implemented in vec.c, add
16581         vec.o to linkage of gencfn-macros.
16582         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16583         passing the info to record_node_allocation_statistics.
16584         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16585         and pass the info.
16586         * ggc-common.c (struct ggc_usage): Add operator== and use
16587         it in operator< and compare function.
16588         * mem-stats.h (struct mem_usage): Likewise.
16589         * vec.c (struct vec_usage): Remove operator< and compare
16590         function. Can be simply inherited.
16592 2018-01-12  Martin Jambor  <mjambor@suse.cz>
16594         PR target/81616
16595         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16596         * tree-ssa-math-opts.c: Include domwalk.h.
16597         (convert_mult_to_fma_1): New function.
16598         (fma_transformation_info): New type.
16599         (fma_deferring_state): Likewise.
16600         (cancel_fma_deferring): New function.
16601         (result_of_phi): Likewise.
16602         (last_fma_candidate_feeds_initial_phi): Likewise.
16603         (convert_mult_to_fma): Added deferring logic, split actual
16604         transformation to convert_mult_to_fma_1.
16605         (math_opts_dom_walker): New type.
16606         (math_opts_dom_walker::after_dom_children): New method, body moved
16607         here from pass_optimize_widening_mul::execute, added deferring logic
16608         bits.
16609         (pass_optimize_widening_mul::execute): Moved most of code to
16610         math_opts_dom_walker::after_dom_children.
16611         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16612         * config/i386/i386.c (ix86_option_override_internal): Added
16613         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16615 2018-01-12  Richard Biener  <rguenther@suse.de>
16617         PR debug/83157
16618         * dwarf2out.c (gen_variable_die): Do not reset old_die for
16619         inline instance vars.
16621 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
16623         PR target/81819
16624         * config/rx/rx.c (rx_is_restricted_memory_address):
16625         Handle SUBREG case.
16627 2018-01-12  Richard Biener  <rguenther@suse.de>
16629         PR tree-optimization/80846
16630         * target.def (split_reduction): New target hook.
16631         * targhooks.c (default_split_reduction): New function.
16632         * targhooks.h (default_split_reduction): Declare.
16633         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16634         target requests first reduce vectors by combining low and high
16635         parts.
16636         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16637         (get_vectype_for_scalar_type_and_size): Export.
16638         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16639         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16640         * doc/tm.texi: Regenerate.
16641         * config/i386/i386.c (ix86_split_reduction): Implement
16642         TARGET_VECTORIZE_SPLIT_REDUCTION.
16644 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16646         PR target/83368
16647         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16648         in PIC mode except for TARGET_VXWORKS_RTP.
16649         * config/sparc/sparc.c: Include cfgrtl.h.
16650         (TARGET_INIT_PIC_REG): Define.
16651         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16652         (sparc_pic_register_p): New predicate.
16653         (sparc_legitimate_address_p): Use it.
16654         (sparc_legitimize_pic_address): Likewise.
16655         (sparc_delegitimize_address): Likewise.
16656         (sparc_mode_dependent_address_p): Likewise.
16657         (gen_load_pcrel_sym): Remove 4th parameter.
16658         (load_got_register): Adjust call to above.  Remove obsolete stuff.
16659         (sparc_expand_prologue): Do not call load_got_register here.
16660         (sparc_flat_expand_prologue): Likewise.
16661         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16662         (sparc_use_pseudo_pic_reg): New function.
16663         (sparc_init_pic_reg): Likewise.
16664         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16665         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16667 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
16669         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16670         Add item for branch_cost.
16672 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16674         PR rtl-optimization/83565
16675         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16676         not extend the result to a larger mode for rotate operations.
16677         (num_sign_bit_copies1): Likewise.
16679 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16681         PR target/40411
16682         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16683         -symbolic.
16684         Use values-Xc.o for -pedantic.
16685         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16687 2018-01-12  Martin Liska  <mliska@suse.cz>
16689         PR ipa/83054
16690         * ipa-devirt.c (final_warning_record::grow_type_warnings):
16691         New function.
16692         (possible_polymorphic_call_targets): Use it.
16693         (ipa_devirt): Likewise.
16695 2018-01-12  Martin Liska  <mliska@suse.cz>
16697         * profile-count.h (enum profile_quality): Use 0 as invalid
16698         enum value of profile_quality.
16700 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16702         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16703         -mext-string options.
16705 2018-01-12  Richard Biener  <rguenther@suse.de>
16707         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16708         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16709         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16710         Likewise.
16711         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16713 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16715         * configure.ac (--with-long-double-format): Add support for the
16716         configuration option to change the default long double format on
16717         PowerPC systems.
16718         * config.gcc (powerpc*-linux*-*): Likewise.
16719         * configure: Regenerate.
16720         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16721         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16722         used without modification.
16724 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16726         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16727         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16728         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16729         MISC_BUILTIN_SPEC_BARRIER.
16730         (rs6000_init_builtins): Likewise.
16731         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16732         enum value.
16733         (speculation_barrier): New define_insn.
16734         * doc/extend.texi: Document __builtin_speculation_barrier.
16736 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16738         PR target/83203
16739         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16740         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16741         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16742         iterators.
16743         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
16744         integral modes instead of "ss" and "sd".
16745         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16746         vectors with 32-bit and 64-bit elements.
16747         (vecdupssescalarmodesuffix): New mode attribute.
16748         (vec_dup<mode>): Use it.
16750 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
16752         PR target/83330
16753         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16754         frame if argument is passed on stack.
16756 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16758         PR target/82682
16759         * ree.c (combine_reaching_defs): Optimize also
16760         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16761         reg2=any_extend(exp); reg1=reg2;, formatting fix.
16763 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16765         PR middle-end/83189
16766         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16768 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16770         PR middle-end/83718
16771         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16772         after they are computed.
16774 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
16776         PR tree-optimization/83695
16777         * gimple-loop-linterchange.cc
16778         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16779         reset cached scev information after interchange.
16780         (pass_linterchange::execute): Remove call to scev_reset_htab.
16782 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16784         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16785         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16786         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16787         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16788         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16789         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16790         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16791         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16792         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16793         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16794         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16795         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16796         (V_lane_reg): Likewise.
16797         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16798         New define_expand.
16799         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16800         (vfmal_lane_low<mode>_intrinsic,
16801         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16802         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16803         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16804         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16805         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16806         vfmsl_lane_high<mode>_intrinsic): New define_insns.
16808 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16810         * config/arm/arm-cpus.in (fp16fml): New feature.
16811         (ALL_SIMD): Add fp16fml.
16812         (armv8.2-a): Add fp16fml as an option.
16813         (armv8.3-a): Likewise.
16814         (armv8.4-a): Add fp16fml as part of fp16.
16815         * config/arm/arm.h (TARGET_FP16FML): Define.
16816         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16817         when appropriate.
16818         * config/arm/arm-modes.def (V2HF): Define.
16819         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16820         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16821         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16822         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16823         vfmsl_low, vfmsl_high): New set of builtins.
16824         * config/arm/iterators.md (PLUSMINUS): New code iterator.
16825         (vfml_op): New code attribute.
16826         (VFMLHALVES): New int iterator.
16827         (VFML, VFMLSEL): New mode attributes.
16828         (V_reg): Define mapping for V2HF.
16829         (V_hi, V_lo): New mode attributes.
16830         (VF_constraint): Likewise.
16831         (vfml_half, vfml_half_selector): New int attributes.
16832         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16833         define_expand.
16834         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16835         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
16836         New define_insn.
16837         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
16838         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
16839         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
16840         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
16841         documentation.
16842         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
16843         Document new effective target and option set.
16845 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16847         * config/arm/arm-cpus.in (armv8_4): New feature.
16848         (ARMv8_4a): New fgroup.
16849         (armv8.4-a): New arch.
16850         * config/arm/arm-tables.opt: Regenerate.
16851         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
16852         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
16853         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
16854         Add matching rules for -march=armv8.4-a and extensions.
16855         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
16857 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
16859         PR target/81821
16860         * config/rx/rx.md (BW): New mode attribute.
16861         (sync_lock_test_and_setsi): Add mode suffix to insn output.
16863 2018-01-11  Richard Biener  <rguenther@suse.de>
16865         PR tree-optimization/83435
16866         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16867         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16868         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16870 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16871             Alan Hayward  <alan.hayward@arm.com>
16872             David Sherwood  <david.sherwood@arm.com>
16874         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16875         field.
16876         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
16877         (aarch64_print_address_internal): Use it to check for a zero offset.
16879 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16880             Alan Hayward  <alan.hayward@arm.com>
16881             David Sherwood  <david.sherwood@arm.com>
16883         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16884         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16885         Return a poly_int64 rather than a HOST_WIDE_INT.
16886         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16887         rather than a HOST_WIDE_INT.
16888         * config/aarch64/aarch64.h (aarch64_frame): Protect with
16889         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
16890         hard_fp_offset, frame_size, initial_adjust, callee_offset and
16891         final_offset from HOST_WIDE_INT to poly_int64.
16892         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16893         to_constant when getting the number of units in an Advanced SIMD
16894         mode.
16895         (aarch64_builtin_vectorized_function): Check for a constant number
16896         of units.
16897         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16898         GET_MODE_SIZE.
16899         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16900         attribute instead of GET_MODE_NUNITS.
16901         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16902         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16903         GET_MODE_SIZE for fixed-size registers.
16904         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16905         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16906         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16907         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16908         (aarch64_print_operand, aarch64_print_address_internal)
16909         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16910         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16911         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16912         Handle polynomial GET_MODE_SIZE.
16913         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
16914         wider than SImode without modification.
16915         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16916         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16917         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16918         passing and returning SVE modes.
16919         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16920         rather than GEN_INT.
16921         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16922         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16923         (aarch64_allocate_and_probe_stack_space): Likewise.
16924         (aarch64_layout_frame): Cope with polynomial offsets.
16925         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16926         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
16927         polynomial offsets.
16928         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16929         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16930         poly_int64 rather than a HOST_WIDE_INT.
16931         (aarch64_get_separate_components, aarch64_process_components)
16932         (aarch64_expand_prologue, aarch64_expand_epilogue)
16933         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16934         (aarch64_anchor_offset): New function, split out from...
16935         (aarch64_legitimize_address): ...here.
16936         (aarch64_builtin_vectorization_cost): Handle polynomial
16937         TYPE_VECTOR_SUBPARTS.
16938         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16939         GET_MODE_NUNITS.
16940         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16941         number of elements from the PARALLEL rather than the mode.
16942         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16943         rather than GET_MODE_BITSIZE.
16944         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16945         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16946         (aarch64_expand_vec_perm_const_1): Handle polynomial
16947         d->perm.length () and d->perm elements.
16948         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
16949         Apply to_constant to d->perm elements.
16950         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16951         polynomial CONST_VECTOR_NUNITS.
16952         (aarch64_move_pointer): Take amount as a poly_int64 rather
16953         than an int.
16954         (aarch64_progress_pointer): Avoid temporary variable.
16955         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16956         the mode attribute instead of GET_MODE.
16958 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16959             Alan Hayward  <alan.hayward@arm.com>
16960             David Sherwood  <david.sherwood@arm.com>
16962         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16963         x exists before using it.
16964         (aarch64_add_constant_internal): Rename to...
16965         (aarch64_add_offset_1): ...this.  Replace regnum with separate
16966         src and dest rtxes.  Handle the case in which they're different,
16967         including when the offset is zero.  Replace scratchreg with an rtx.
16968         Use 2 additions if there is no spare register into which we can
16969         move a 16-bit constant.
16970         (aarch64_add_constant): Delete.
16971         (aarch64_add_offset): Replace reg with separate src and dest
16972         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
16973         Use aarch64_add_offset_1.
16974         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16975         an rtx rather than an int.  Take the delta as a poly_int64
16976         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
16977         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16978         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16979         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16980         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16981         and aarch64_add_sp.
16982         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16983         aarch64_add_constant.
16985 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16987         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16988         Use scalar_float_mode.
16990 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16992         * config/aarch64/aarch64-simd.md
16993         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16994         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16995         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16996         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16997         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16998         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16999         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17000         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17001         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17002         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17004 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17006         PR target/83514
17007         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17008         targ_options->x_arm_arch_string is non NULL.
17010 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
17012         * config/aarch64/aarch64.h
17013         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
17015 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
17017         PR target/82096
17018         * expmed.c (emit_store_flag_force): Swap if const op0
17019         and change VOIDmode to mode of op0.
17021 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17023         PR rtl-optimization/83761
17024         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17025         than bytes to mode_for_size.
17027 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17029         PR middle-end/83189
17030         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17031         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17032         profile.
17034 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17036         PR middle-end/83575
17037         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17038         when in layout mode.
17039         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17040         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17041         partition fixup.
17043 2018-01-10  Michael Collison  <michael.collison@arm.com>
17045         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17046         * config/aarch64/aarch64-option-extension.def: Add
17047         AARCH64_OPT_EXTENSION of 'fp16fml'.
17048         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17049         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17050         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17051         * config/aarch64/constraints.md (Ui7): New constraint.
17052         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17053         (VFMLA_SEL_W): Ditto.
17054         (f16quad): Ditto.
17055         (f16mac1): Ditto.
17056         (VFMLA16_LOW): New int iterator.
17057         (VFMLA16_HIGH): Ditto.
17058         (UNSPEC_FMLAL): New unspec.
17059         (UNSPEC_FMLSL): Ditto.
17060         (UNSPEC_FMLAL2): Ditto.
17061         (UNSPEC_FMLSL2): Ditto.
17062         (f16mac): New code attribute.
17063         * config/aarch64/aarch64-simd-builtins.def
17064         (aarch64_fmlal_lowv2sf): Ditto.
17065         (aarch64_fmlsl_lowv2sf): Ditto.
17066         (aarch64_fmlalq_lowv4sf): Ditto.
17067         (aarch64_fmlslq_lowv4sf): Ditto.
17068         (aarch64_fmlal_highv2sf): Ditto.
17069         (aarch64_fmlsl_highv2sf): Ditto.
17070         (aarch64_fmlalq_highv4sf): Ditto.
17071         (aarch64_fmlslq_highv4sf): Ditto.
17072         (aarch64_fmlal_lane_lowv2sf): Ditto.
17073         (aarch64_fmlsl_lane_lowv2sf): Ditto.
17074         (aarch64_fmlal_laneq_lowv2sf): Ditto.
17075         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17076         (aarch64_fmlalq_lane_lowv4sf): Ditto.
17077         (aarch64_fmlsl_lane_lowv4sf): Ditto.
17078         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17079         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17080         (aarch64_fmlal_lane_highv2sf): Ditto.
17081         (aarch64_fmlsl_lane_highv2sf): Ditto.
17082         (aarch64_fmlal_laneq_highv2sf): Ditto.
17083         (aarch64_fmlsl_laneq_highv2sf): Ditto.
17084         (aarch64_fmlalq_lane_highv4sf): Ditto.
17085         (aarch64_fmlsl_lane_highv4sf): Ditto.
17086         (aarch64_fmlalq_laneq_highv4sf): Ditto.
17087         (aarch64_fmlsl_laneq_highv4sf): Ditto.
17088         * config/aarch64/aarch64-simd.md:
17089         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17090         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17091         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17092         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17093         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17094         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17095         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17096         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17097         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17098         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17099         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17100         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17101         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17102         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17103         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17104         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17105         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17106         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17107         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17108         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17109         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17110         (vfmlsl_low_u32): Ditto.
17111         (vfmlalq_low_u32): Ditto.
17112         (vfmlslq_low_u32): Ditto.
17113         (vfmlal_high_u32): Ditto.
17114         (vfmlsl_high_u32): Ditto.
17115         (vfmlalq_high_u32): Ditto.
17116         (vfmlslq_high_u32): Ditto.
17117         (vfmlal_lane_low_u32): Ditto.
17118         (vfmlsl_lane_low_u32): Ditto.
17119         (vfmlal_laneq_low_u32): Ditto.
17120         (vfmlsl_laneq_low_u32): Ditto.
17121         (vfmlalq_lane_low_u32): Ditto.
17122         (vfmlslq_lane_low_u32): Ditto.
17123         (vfmlalq_laneq_low_u32): Ditto.
17124         (vfmlslq_laneq_low_u32): Ditto.
17125         (vfmlal_lane_high_u32): Ditto.
17126         (vfmlsl_lane_high_u32): Ditto.
17127         (vfmlal_laneq_high_u32): Ditto.
17128         (vfmlsl_laneq_high_u32): Ditto.
17129         (vfmlalq_lane_high_u32): Ditto.
17130         (vfmlslq_lane_high_u32): Ditto.
17131         (vfmlalq_laneq_high_u32): Ditto.
17132         (vfmlslq_laneq_high_u32): Ditto.
17133         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17134         (AARCH64_FL_FOR_ARCH8_4): New.
17135         (AARCH64_ISA_F16FML): New ISA flag.
17136         (TARGET_F16FML): New feature flag for fp16fml.
17137         (doc/invoke.texi): Document new fp16fml option.
17139 2018-01-10  Michael Collison  <michael.collison@arm.com>
17141         * config/aarch64/aarch64-builtins.c:
17142         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17143         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17144         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17145         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17146         (AARCH64_ISA_SHA3): New ISA flag.
17147         (TARGET_SHA3): New feature flag for sha3.
17148         * config/aarch64/iterators.md (sha512_op): New int attribute.
17149         (CRYPTO_SHA512): New int iterator.
17150         (UNSPEC_SHA512H): New unspec.
17151         (UNSPEC_SHA512H2): Ditto.
17152         (UNSPEC_SHA512SU0): Ditto.
17153         (UNSPEC_SHA512SU1): Ditto.
17154         * config/aarch64/aarch64-simd-builtins.def
17155         (aarch64_crypto_sha512hqv2di): New builtin.
17156         (aarch64_crypto_sha512h2qv2di): Ditto.
17157         (aarch64_crypto_sha512su0qv2di): Ditto.
17158         (aarch64_crypto_sha512su1qv2di): Ditto.
17159         (aarch64_eor3qv8hi): Ditto.
17160         (aarch64_rax1qv2di): Ditto.
17161         (aarch64_xarqv2di): Ditto.
17162         (aarch64_bcaxqv8hi): Ditto.
17163         * config/aarch64/aarch64-simd.md:
17164         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17165         (aarch64_crypto_sha512su0qv2di): Ditto.
17166         (aarch64_crypto_sha512su1qv2di): Ditto.
17167         (aarch64_eor3qv8hi): Ditto.
17168         (aarch64_rax1qv2di): Ditto.
17169         (aarch64_xarqv2di): Ditto.
17170         (aarch64_bcaxqv8hi): Ditto.
17171         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17172         (vsha512h2q_u64): Ditto.
17173         (vsha512su0q_u64): Ditto.
17174         (vsha512su1q_u64): Ditto.
17175         (veor3q_u16): Ditto.
17176         (vrax1q_u64): Ditto.
17177         (vxarq_u64): Ditto.
17178         (vbcaxq_u16): Ditto.
17179         * config/arm/types.md (crypto_sha512): New type attribute.
17180         (crypto_sha3): Ditto.
17181         (doc/invoke.texi): Document new sha3 option.
17183 2018-01-10  Michael Collison  <michael.collison@arm.com>
17185         * config/aarch64/aarch64-builtins.c:
17186         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17187         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17188         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17189         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17190         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17191         (AARCH64_ISA_SM4): New ISA flag.
17192         (TARGET_SM4): New feature flag for sm4.
17193         * config/aarch64/aarch64-simd-builtins.def
17194         (aarch64_sm3ss1qv4si): Ditto.
17195         (aarch64_sm3tt1aq4si): Ditto.
17196         (aarch64_sm3tt1bq4si): Ditto.
17197         (aarch64_sm3tt2aq4si): Ditto.
17198         (aarch64_sm3tt2bq4si): Ditto.
17199         (aarch64_sm3partw1qv4si): Ditto.
17200         (aarch64_sm3partw2qv4si): Ditto.
17201         (aarch64_sm4eqv4si): Ditto.
17202         (aarch64_sm4ekeyqv4si): Ditto.
17203         * config/aarch64/aarch64-simd.md:
17204         (aarch64_sm3ss1qv4si): Ditto.
17205         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17206         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17207         (aarch64_sm4eqv4si): Ditto.
17208         (aarch64_sm4ekeyqv4si): Ditto.
17209         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17210         (sm3part_op): Ditto.
17211         (CRYPTO_SM3TT): Ditto.
17212         (CRYPTO_SM3PART): Ditto.
17213         (UNSPEC_SM3SS1): New unspec.
17214         (UNSPEC_SM3TT1A): Ditto.
17215         (UNSPEC_SM3TT1B): Ditto.
17216         (UNSPEC_SM3TT2A): Ditto.
17217         (UNSPEC_SM3TT2B): Ditto.
17218         (UNSPEC_SM3PARTW1): Ditto.
17219         (UNSPEC_SM3PARTW2): Ditto.
17220         (UNSPEC_SM4E): Ditto.
17221         (UNSPEC_SM4EKEY): Ditto.
17222         * config/aarch64/constraints.md (Ui2): New constraint.
17223         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17224         * config/arm/types.md (crypto_sm3): New type attribute.
17225         (crypto_sm4): Ditto.
17226         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17227         (vsm3tt1aq_u32): Ditto.
17228         (vsm3tt1bq_u32): Ditto.
17229         (vsm3tt2aq_u32): Ditto.
17230         (vsm3tt2bq_u32): Ditto.
17231         (vsm3partw1q_u32): Ditto.
17232         (vsm3partw2q_u32): Ditto.
17233         (vsm4eq_u32): Ditto.
17234         (vsm4ekeyq_u32): Ditto.
17235         (doc/invoke.texi): Document new sm4 option.
17237 2018-01-10  Michael Collison  <michael.collison@arm.com>
17239         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17240         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17241         (AARCH64_FL_FOR_ARCH8_4): New.
17242         (AARCH64_FL_V8_4): New flag.
17243         (doc/invoke.texi): Document new armv8.4-a option.
17245 2018-01-10  Michael Collison  <michael.collison@arm.com>
17247         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17248         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17249         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17250         * config/aarch64/aarch64-option-extension.def: Add
17251         AARCH64_OPT_EXTENSION of 'sha2'.
17252         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17253         (crypto): Disable sha2 and aes if crypto disabled.
17254         (crypto): Enable aes and sha2 if enabled.
17255         (simd): Disable sha2 and aes if simd disabled.
17256         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17257         New flags.
17258         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17259         (TARGET_SHA2): New feature flag for sha2.
17260         (TARGET_AES): New feature flag for aes.
17261         * config/aarch64/aarch64-simd.md:
17262         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17263         conditional on TARGET_AES.
17264         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17265         (aarch64_crypto_sha1hsi): Make pattern conditional
17266         on TARGET_SHA2.
17267         (aarch64_crypto_sha1hv4si): Ditto.
17268         (aarch64_be_crypto_sha1hv4si): Ditto.
17269         (aarch64_crypto_sha1su1v4si): Ditto.
17270         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17271         (aarch64_crypto_sha1su0v4si): Ditto.
17272         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17273         (aarch64_crypto_sha256su0v4si): Ditto.
17274         (aarch64_crypto_sha256su1v4si): Ditto.
17275         (doc/invoke.texi): Document new aes and sha2 options.
17277 2018-01-10  Martin Sebor  <msebor@redhat.com>
17279         PR tree-optimization/83781
17280         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17281         as string arrays.
17283 2018-01-11  Martin Sebor  <msebor@gmail.com>
17284             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17286         PR tree-optimization/83501
17287         PR tree-optimization/81703
17289         * tree-ssa-strlen.c (get_string_cst): Rename...
17290         (get_string_len): ...to this.  Handle global constants.
17291         (handle_char_store): Adjust.
17293 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
17294             Jim Wilson  <jimw@sifive.com>
17296         * config/riscv/riscv-protos.h (riscv_output_return): New.
17297         * config/riscv/riscv.c (struct machine_function): New naked_p field.
17298         (riscv_attribute_table, riscv_output_return),
17299         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17300         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17301         (riscv_compute_frame_info): Only compute frame->mask if not a naked
17302         function.
17303         (riscv_expand_prologue): Add early return for naked function.
17304         (riscv_expand_epilogue): Likewise.
17305         (riscv_function_ok_for_sibcall): Return false for naked function.
17306         (riscv_set_current_function): New.
17307         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17308         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17309         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17310         * doc/extend.texi (RISC-V Function Attributes): New.
17312 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17314         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17315         check for 128-bit long double before checking TCmode.
17316         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17317         128-bit long doubles before checking TFmode or TCmode.
17318         (FLOAT128_IBM_P): Likewise.
17320 2018-01-10  Martin Sebor  <msebor@redhat.com>
17322         PR tree-optimization/83671
17323         * builtins.c (c_strlen): Unconditionally return zero for the empty
17324         string.
17325         Use -Warray-bounds for warnings.
17326         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17327         for non-constant array indices with COMPONENT_REF, arrays of
17328         arrays, and pointers to arrays.
17329         (gimple_fold_builtin_strlen): Determine and set length range for
17330         non-constant character arrays.
17332 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
17334         PR middle-end/81897
17335         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17336         empty blocks.
17338 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
17340         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17342 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17344         PR target/83399
17345         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17346         VECTOR_MEM_ALTIVEC_OR_VSX_P.
17347         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17348         indexed_or_indirect_operand predicate.
17349         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17350         (*vsx_le_perm_load_v8hi): Likewise.
17351         (*vsx_le_perm_load_v16qi): Likewise.
17352         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17353         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17354         (*vsx_le_perm_store_v8hi): Likewise.
17355         (*vsx_le_perm_store_v16qi): Likewise.
17356         (eight unnamed splitters): Likewise.
17358 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17360         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17361         * config/rs6000/emmintrin.h: Likewise.
17362         * config/rs6000/mmintrin.h: Likewise.
17363         * config/rs6000/xmmintrin.h: Likewise.
17365 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
17367         PR c++/43486
17368         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17369         "public_flag".
17370         * tree.c (tree_nop_conversion): Return true for location wrapper
17371         nodes.
17372         (maybe_wrap_with_location): New function.
17373         (selftest::check_strip_nops): New function.
17374         (selftest::test_location_wrappers): New function.
17375         (selftest::tree_c_tests): Call it.
17376         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17377         (maybe_wrap_with_location): New decl.
17378         (EXPR_LOCATION_WRAPPER_P): New macro.
17379         (location_wrapper_p): New inline function.
17380         (tree_strip_any_location_wrapper): New inline function.
17382 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
17384         PR target/83735
17385         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17386         stack_realign_offset for the largest alignment of stack slot
17387         actually used.
17388         (ix86_find_max_used_stack_alignment): New function.
17389         (ix86_finalize_stack_frame_flags): Use it.  Set
17390         max_used_stack_alignment if we don't realign stack.
17391         * config/i386/i386.h (machine_function): Add
17392         max_used_stack_alignment.
17394 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
17396         * config/arm/arm.opt (-mbranch-cost): New option.
17397         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17398         account.
17400 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
17402         PR target/83629
17403         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17404         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17406 2018-01-10  Richard Biener  <rguenther@suse.de>
17408         PR debug/83765
17409         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17410         early out so it also covers the case where we have a non-NULL
17411         origin.
17413 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17415         PR tree-optimization/83753
17416         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17417         for non-strided grouped accesses if the number of elements is 1.
17419 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17421         PR target/81616
17422         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17423         * i386.h (TARGET_USE_GATHER): Define.
17424         * x86-tune.def (X86_TUNE_USE_GATHER): New.
17426 2018-01-10  Martin Liska  <mliska@suse.cz>
17428         PR bootstrap/82831
17429         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17430         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17431         partitioning.
17432         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17433         CLEANUP_NO_PARTITIONING is not set.
17435 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17437         * doc/rtl.texi: Remove documentation of (const ...) wrappers
17438         for vectors, as a partial revert of r254296.
17439         * rtl.h (const_vec_p): Delete.
17440         (const_vec_duplicate_p): Don't test for vector CONSTs.
17441         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17442         * expmed.c (make_tree): Likewise.
17444         Revert:
17445         * common.md (E, F): Use CONSTANT_P instead of checking for
17446         CONST_VECTOR.
17447         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17448         checking for CONST_VECTOR.
17450 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17452         PR middle-end/83575
17453         * predict.c (force_edge_cold): Handle in more sane way edges
17454         with no prediction.
17456 2018-01-09  Carl Love  <cel@us.ibm.com>
17458         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17459         V4SI, V4SF types.
17460         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17461         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17462         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17463         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
17464         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17465         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
17466         * config/rs6000/rs6000-protos.h: Add extern defition for
17467         rs6000_generate_float2_double_code.
17468         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17469         function.
17470         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17471         (float2_v2df): Add define_expand.
17473 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
17475         PR target/83628
17476         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17477         op_mode in the force_to_mode call.
17479 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17481         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17482         instead of checking each element individually.
17483         (aarch64_evpc_uzp): Likewise.
17484         (aarch64_evpc_zip): Likewise.
17485         (aarch64_evpc_ext): Likewise.
17486         (aarch64_evpc_rev): Likewise.
17487         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17488         instead of checking each element individually.  Return true without
17489         generating rtl if
17490         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17491         whether all selected elements come from the same input, instead of
17492         checking each element individually.  Remove calls to gen_rtx_REG,
17493         start_sequence and end_sequence and instead assert that no rtl is
17494         generated.
17496 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17498         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17499         order of HIGH and CONST checks.
17501 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17503         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17504         if the destination isn't an SSA_NAME.
17506 2018-01-09  Richard Biener  <rguenther@suse.de>
17508         PR tree-optimization/83668
17509         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17510         move prologue...
17511         (canonicalize_loop_form): ... here, renamed from ...
17512         (canonicalize_loop_closed_ssa_form): ... this and amended to
17513         swap successor edges for loop exit blocks to make us use
17514         the RPO order we need for initial schedule generation.
17516 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
17518         PR tree-optimization/64811
17519         * match.pd: When optimizing comparisons with Inf, avoid
17520         introducing or losing exceptions from comparisons with NaN.
17522 2018-01-09  Martin Liska  <mliska@suse.cz>
17524         PR sanitizer/82517
17525         * asan.c (shadow_mem_size): Add gcc_assert.
17527 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
17529         Don't save registers in main().
17531         PR target/83738
17532         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17533         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17534         * config/avr/avr.c (avr_set_current_function): Don't error if
17535         naked, OS_task or OS_main are specified at the same time.
17536         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17537         OS_main.
17538         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17539         attribute.
17540         * common/config/avr/avr-common.c (avr_option_optimization_table):
17541         Switch on -mmain-is-OS_task for optimizing compilations.
17543 2018-01-09  Richard Biener  <rguenther@suse.de>
17545         PR tree-optimization/83572
17546         * graphite.c: Include cfganal.h.
17547         (graphite_transform_loops): Connect infinite loops to exit
17548         and remove fake edges at the end.
17550 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17552         * ipa-inline.c (edge_badness): Revert accidental checkin.
17554 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17556         PR ipa/80763
17557         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17558         symbols; not inline clones.
17560 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
17562         PR target/83507
17563         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17564         hard registers.  Formatting fixes.
17566         PR preprocessor/83722
17567         * gcc.c (try_generate_repro): Pass
17568         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17569         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17570         do_report_bug.
17572 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
17573             Kito Cheng  <kito.cheng@gmail.com>
17575         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17576         (riscv_leaf_function_p): Delete.
17577         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17579 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17581         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17582         function.
17583         (do_ifelse): New function.
17584         (do_isel): New function.
17585         (do_sub3): New function.
17586         (do_add3): New function.
17587         (do_load_mask_compare): New function.
17588         (do_overlap_load_compare): New function.
17589         (expand_compare_loop): New function.
17590         (expand_block_compare): Call expand_compare_loop() when appropriate.
17591         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17592         option description.
17593         (-mblock-compare-inline-loop-limit): New option.
17595 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17597         PR target/83677
17598         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17599         Reverse order of second and third operands in first alternative.
17600         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17601         of first and second elements in UNSPEC_VPERMR vector.
17602         (altivec_expand_vec_perm_le): Likewise.
17604 2018-01-08  Jeff Law  <law@redhat.com>
17606         PR rtl-optimizatin/81308
17607         * tree-switch-conversion.c (cfg_altered): New file scoped static.
17608         (process_switch): If group_case_labels makes a change, then set
17609         cfg_altered.
17610         (pass_convert_switch::execute): If a switch is converted, then
17611         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
17613         PR rtl-optimization/81308
17614         * recog.c (split_all_insns): Conditionally cleanup the CFG after
17615         splitting insns.
17617 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
17619         PR target/83663 - Revert r255946
17620         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17621         generation for cases where splatting a value is not useful.
17622         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17623         across a vec_duplicate and a paradoxical subreg forming a vector
17624         mode to a vec_concat.
17626 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17628         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17629         -march=armv8.3-a variants.
17630         * config/arm/t-multilib: Likewise.
17631         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
17633 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17635         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17636         to generate rtl.
17637         (cceq_ior_compare_complement): Give it a name so I can use it, and
17638         change boolean_or_operator predicate to boolean_operator so it can
17639         be used to generate a crand.
17640         (eqne): New code iterator.
17641         (bd/bd_neg): New code_attrs.
17642         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17643         a single define_insn.
17644         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17645         decrement (bdnzt/bdnzf/bdzt/bdzf).
17646         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17647         with the new names of the branch decrement patterns, and added the
17648         names of the branch decrement conditional patterns.
17650 2018-01-08  Richard Biener  <rguenther@suse.de>
17652         PR tree-optimization/83563
17653         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17654         cache.
17656 2018-01-08  Richard Biener  <rguenther@suse.de>
17658         PR middle-end/83713
17659         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17661 2018-01-08  Richard Biener  <rguenther@suse.de>
17663         PR tree-optimization/83685
17664         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17665         references to abnormals.
17667 2018-01-08  Richard Biener  <rguenther@suse.de>
17669         PR lto/83719
17670         * dwarf2out.c (output_indirect_strings): Handle empty
17671         skeleton_debug_str_hash.
17672         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17674 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17676         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17677         (emit_store_direct): Likewise.
17678         (arc_trampoline_adjust_address): Likewise.
17679         (arc_asm_trampoline_template): New function.
17680         (arc_initialize_trampoline): Use asm_trampoline_template.
17681         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17682         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17683         * config/arc/arc.md (flush_icache): Delete pattern.
17685 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17687         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17688         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17689         munaligned-access.
17691 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17693         PR target/83681
17694         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17695         by not USED_FOR_TARGET.
17696         (make_pass_resolve_sw_modes): Likewise.
17698 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17700         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17701         USED_FOR_TARGET.
17703 2018-01-08  Richard Biener  <rguenther@suse.de>
17705         PR middle-end/83580
17706         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17708 2018-01-08  Richard Biener  <rguenther@suse.de>
17710         PR middle-end/83517
17711         * match.pd ((t * 2) / 2) -> t): Add missing :c.
17713 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
17715         PR middle-end/81897
17716         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17717         basic blocks with a small number of successors.
17718         (convert_control_dep_chain_into_preds): Improve handling of
17719         forwarder blocks.
17720         (dump_predicates): Split apart into...
17721         (dump_pred_chain): ...here...
17722         (dump_pred_info): ...and here.
17723         (can_one_predicate_be_invalidated_p): Add debugging printfs.
17724         (can_chain_union_be_invalidated_p): Improve check for invalidation
17725         of paths.
17726         (uninit_uses_cannot_happen): Avoid unnecessary if
17727         convert_control_dep_chain_into_preds yielded nothing.
17729 2018-01-06  Martin Sebor  <msebor@redhat.com>
17731         PR tree-optimization/83640
17732         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17733         subtracting negative offset from size.
17734         (builtin_access::overlap): Adjust offset bounds of the access to fall
17735         within the size of the object if possible.
17737 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
17739         PR rtl-optimization/83699
17740         * expmed.c (extract_bit_field_1): Restrict the vector usage of
17741         extract_bit_field_as_subreg to cases in which the extracted
17742         value is also a vector.
17744         * lra-constraints.c (process_alt_operands): Test for the equivalence
17745         substitutions when detecting a possible reload cycle.
17747 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
17749         PR debug/83480
17750         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17751         by default if flag_selective_schedling{,2}.  Formatting fixes.
17753         PR rtl-optimization/83682
17754         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17755         if it has non-VECTOR_MODE element mode.
17756         (vec_duplicate_p): Likewise.
17758         PR middle-end/83694
17759         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17760         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17762 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17764         PR target/83604
17765         * config/i386/i386-builtin.def
17766         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17767         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17768         Require also OPTION_MASK_ISA_AVX512F in addition to
17769         OPTION_MASK_ISA_GFNI.
17770         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17771         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17772         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17773         to OPTION_MASK_ISA_GFNI.
17774         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17775         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17776         OPTION_MASK_ISA_AVX512BW.
17777         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17778         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17779         addition to OPTION_MASK_ISA_GFNI.
17780         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17781         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17782         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17783         to OPTION_MASK_ISA_GFNI.
17784         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17785         a requirement for all ISAs rather than any of them with a few
17786         exceptions.
17787         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17788         processing.
17789         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17790         bitmasks to be enabled with 3 exceptions, instead of requiring any
17791         enabled ISA with lots of exceptions.
17792         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17793         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17794         Change avx512bw in isa attribute to avx512f.
17795         * config/i386/sgxintrin.h: Add license boilerplate.
17796         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
17797         to __AVX512F__ and __AVX512VL to __AVX512VL__.
17798         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17799         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17800         defined.
17801         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17802         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17803         temporarily sse2 rather than sse if not enabled already.
17805         PR target/83604
17806         * config/i386/sse.md (VI248_VLBW): Rename to ...
17807         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
17808         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17809         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17810         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17811         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17812         mode iterator instead of VI248_VLBW.
17814 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
17816         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17817         (record_modified): Skip clobbers; add debug output.
17818         (param_change_prob): Use sreal frequencies.
17820 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17822         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17823         punt for user-aligned variables.
17825 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17827         * tree-chrec.c (chrec_contains_symbols): Return true for
17828         POLY_INT_CST.
17830 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
17832         PR target/82439
17833         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17834         of (x|y) == x for BICS pattern.
17836 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17838         PR tree-optimization/83605
17839         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
17840         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
17841         can throw.
17843 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17845         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
17846         * config/epiphany/rtems.h: New file.
17848 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17849             Uros Bizjak  <ubizjak@gmail.com>
17851         PR target/83554
17852         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
17853         QIreg_operand instead of register_operand predicate.
17854         * config/i386/i386.c (ix86_rop_should_change_byte_p,
17855         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
17856         comments instead of -fmitigate[-_]rop.
17858 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17860         PR bootstrap/81926
17861         * cgraphunit.c (symbol_table::compile): Switch to text_section
17862         before calling assembly_start debug hook.
17863         * run-rtl-passes.c (run_rtl_passes): Likewise.
17864         Include output.h.
17866 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17868         * tree-vrp.c (extract_range_from_binary_expr_1): Check
17869         range_int_cst_p rather than !symbolic_range_p before calling
17870         extract_range_from_multiplicative_op_1.
17872 2018-01-04  Jeff Law  <law@redhat.com>
17874         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17875         redundant test in assertion.
17877 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17879         * doc/rtl.texi: Document machine_mode wrapper classes.
17881 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17883         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17884         using tree_to_uhwi.
17886 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17888         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17889         the VEC_PERM_EXPR fold to fail.
17891 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17893         PR debug/83585
17894         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17895         to switched_sections.
17897 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17899         PR target/83680
17900         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17901         test for d.testing.
17903 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
17905         PR target/83387
17906         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17907         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17909 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17911         PR debug/83666
17912         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17913         is BLKmode and bitpos not zero or mode change is needed.
17915 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17917         PR target/83675
17918         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17919         TARGET_VIS2.
17921 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
17923         PR target/83628
17924         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17925         instead of MULT rtx.  Update all corresponding splitters.
17926         (*saddl_se): Ditto.
17927         (*ssub<modesuffix>): Ditto.
17928         (*ssubl_se): Ditto.
17929         (*cmp_sadd_di): Update split patterns.
17930         (*cmp_sadd_si): Ditto.
17931         (*cmp_sadd_sidi): Ditto.
17932         (*cmp_ssub_di): Ditto.
17933         (*cmp_ssub_si): Ditto.
17934         (*cmp_ssub_sidi): Ditto.
17935         * config/alpha/predicates.md (const23_operand): New predicate.
17936         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17937         Look for ASHIFT, not MULT inner operand.
17938         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17940 2018-01-04  Martin Liska  <mliska@suse.cz>
17942         PR gcov-profile/83669
17943         * gcov.c (output_intermediate_file): Add version to intermediate
17944         gcov file.
17945         * doc/gcov.texi: Document new field 'version' in intermediate
17946         file format. Fix location of '-k' option of gcov command.
17948 2018-01-04  Martin Liska  <mliska@suse.cz>
17950         PR ipa/82352
17951         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17953 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17955         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17957 2018-01-03  Martin Sebor  <msebor@redhat.com>
17959         PR tree-optimization/83655
17960         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17961         checking calls with invalid arguments.
17963 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17965         * tree-vect-stmts.c (vect_get_store_rhs): New function.
17966         (vectorizable_mask_load_store): Delete.
17967         (vectorizable_call): Return false for masked loads and stores.
17968         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
17969         instead of gimple_assign_rhs1.
17970         (vectorizable_load): Handle IFN_MASK_LOAD.
17971         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17973 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17975         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17976         split out from..,
17977         (vectorizable_mask_load_store): ...here.
17978         (vectorizable_load): ...and here.
17980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17982         * tree-vect-stmts.c (vect_build_all_ones_mask)
17983         (vect_build_zero_merge_argument): New functions, split out from...
17984         (vectorizable_load): ...here.
17986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17988         * tree-vect-stmts.c (vect_check_store_rhs): New function,
17989         split out from...
17990         (vectorizable_mask_load_store): ...here.
17991         (vectorizable_store): ...and here.
17993 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17995         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17996         split out from...
17997         (vectorizable_mask_load_store): ...here.
17999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18001         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18002         (vect_model_store_cost): Take a vec_load_store_type instead of a
18003         vect_def_type.
18004         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18005         (vect_model_store_cost): Take a vec_load_store_type instead of a
18006         vect_def_type.
18007         (vectorizable_mask_load_store): Update accordingly.
18008         (vectorizable_store): Likewise.
18009         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18011 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18013         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18014         IFN_MASK_LOAD calls here rather than...
18015         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18018             Alan Hayward  <alan.hayward@arm.com>
18019             David Sherwood  <david.sherwood@arm.com>
18021         * expmed.c (extract_bit_field_1): For vector extracts,
18022         fall back to extract_bit_field_as_subreg if vec_extract
18023         isn't available.
18025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18026             Alan Hayward  <alan.hayward@arm.com>
18027             David Sherwood  <david.sherwood@arm.com>
18029         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18030         they are variable or constant sized.
18031         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18032         slots for constant-sized data.
18034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18035             Alan Hayward  <alan.hayward@arm.com>
18036             David Sherwood  <david.sherwood@arm.com>
18038         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18039         handling COND_EXPRs with boolean comparisons, try to find a better
18040         basis for the mask type than the boolean itself.
18042 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18044         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18045         is calculated and how it can be overridden.
18046         * genmodes.c (max_bitsize_mode_any_mode): New variable.
18047         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18048         if defined.
18049         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18050         if nonzero.
18052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18053             Alan Hayward  <alan.hayward@arm.com>
18054             David Sherwood  <david.sherwood@arm.com>
18056         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18057         Remove the mode argument.
18058         (aarch64_simd_valid_immediate): Remove the mode and inverse
18059         arguments.
18060         * config/aarch64/iterators.md (bitsize): New iterator.
18061         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18062         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18063         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18064         aarch64_simd_valid_immediate.
18065         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18066         (aarch64_reg_or_bic_imm): Likewise.
18067         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18068         with an insn_type enum and msl with a modifier_type enum.
18069         Replace element_width with a scalar_mode.  Change the shift
18070         to unsigned int.  Add constructors for scalar_float_mode and
18071         scalar_int_mode elements.
18072         (aarch64_vect_float_const_representable_p): Delete.
18073         (aarch64_can_const_movi_rtx_p)
18074         (aarch64_simd_scalar_immediate_valid_for_move)
18075         (aarch64_simd_make_constant): Update call to
18076         aarch64_simd_valid_immediate.
18077         (aarch64_advsimd_valid_immediate_hs): New function.
18078         (aarch64_advsimd_valid_immediate): Likewise.
18079         (aarch64_simd_valid_immediate): Remove mode and inverse
18080         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
18081         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18082         and aarch64_float_const_representable_p on the result.
18083         (aarch64_output_simd_mov_immediate): Remove mode argument.
18084         Update call to aarch64_simd_valid_immediate and use of
18085         simd_immediate_info.
18086         (aarch64_output_scalar_simd_mov_immediate): Update call
18087         accordingly.
18089 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18090             Alan Hayward  <alan.hayward@arm.com>
18091             David Sherwood  <david.sherwood@arm.com>
18093         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18094         (mode_nunits): Likewise CONST_MODE_NUNITS.
18095         * machmode.def (ADJUST_NUNITS): Document.
18096         * genmodes.c (mode_data::need_nunits_adj): New field.
18097         (blank_mode): Update accordingly.
18098         (adj_nunits): New variable.
18099         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18100         parameter.
18101         (emit_mode_size_inline): Set need_bytesize_adj for all modes
18102         listed in adj_nunits.
18103         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18104         listed in adj_nunits.  Don't emit case statements for such modes.
18105         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18106         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
18107         nothing if adj_nunits is nonnull.
18108         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18109         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18110         (emit_mode_fbit): Update use of print_maybe_const_decl.
18111         (emit_move_size): Likewise.  Treat the array as non-const
18112         if adj_nunits.
18113         (emit_mode_adjustments): Handle adj_nunits.
18115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18117         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18118         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18119         (VECTOR_MODES): Use it.
18120         (make_vector_modes): Take the prefix as an argument.
18122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18123             Alan Hayward  <alan.hayward@arm.com>
18124             David Sherwood  <david.sherwood@arm.com>
18126         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18127         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18128         for MODE_VECTOR_BOOL.
18129         * machmode.def (VECTOR_BOOL_MODE): Document.
18130         * genmodes.c (VECTOR_BOOL_MODE): New macro.
18131         (make_vector_bool_mode): New function.
18132         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18133         MODE_VECTOR_BOOL.
18134         * lto-streamer-in.c (lto_input_mode_table): Likewise.
18135         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18136         Likewise.
18137         * stor-layout.c (int_mode_for_mode): Likewise.
18138         * tree.c (build_vector_type_for_mode): Likewise.
18139         * varasm.c (output_constant_pool_2): Likewise.
18140         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18141         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
18142         for MODE_VECTOR_BOOL.
18143         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18144         of mode class checks.
18145         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18146         instead of a list of mode class checks.
18147         (expand_vector_scalar_condition): Likewise.
18148         (type_for_widest_vector_mode): Handle BImode as an inner mode.
18150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18151             Alan Hayward  <alan.hayward@arm.com>
18152             David Sherwood  <david.sherwood@arm.com>
18154         * machmode.h (mode_size): Change from unsigned short to
18155         poly_uint16_pod.
18156         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18157         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18158         or if measurement_type is not polynomial.
18159         (fixed_size_mode::includes_p): Check for constant-sized modes.
18160         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18161         return a poly_uint16 rather than an unsigned short.
18162         (emit_mode_size): Change the type of mode_size from unsigned short
18163         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
18164         (emit_mode_adjustments): Cope with polynomial vector sizes.
18165         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18166         for GET_MODE_SIZE.
18167         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18168         for GET_MODE_SIZE.
18169         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18170         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18171         * caller-save.c (setup_save_areas): Likewise.
18172         (replace_reg_with_saved_mem): Likewise.
18173         * calls.c (emit_library_call_value_1): Likewise.
18174         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18175         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18176         (gen_lowpart_for_combine): Likewise.
18177         * convert.c (convert_to_integer_1): Likewise.
18178         * cse.c (equiv_constant, cse_insn): Likewise.
18179         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18180         (cselib_subst_to_values): Likewise.
18181         * dce.c (word_dce_process_block): Likewise.
18182         * df-problems.c (df_word_lr_mark_ref): Likewise.
18183         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18184         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18185         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18186         (rtl_for_decl_location): Likewise.
18187         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18188         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18189         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18190         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18191         (expand_expr_real_1): Likewise.
18192         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18193         (pad_below): Likewise.
18194         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18195         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18196         * ira.c (get_subreg_tracking_sizes): Likewise.
18197         * ira-build.c (ira_create_allocno_objects): Likewise.
18198         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18199         (ira_sort_regnos_for_alter_reg): Likewise.
18200         * ira-costs.c (record_operand_costs): Likewise.
18201         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18202         (resolve_simple_move): Likewise.
18203         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18204         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18205         (lra_constraints): Likewise.
18206         (CONST_POOL_OK_P): Reject variable-sized modes.
18207         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18208         (add_pseudo_to_slot, lra_spill): Likewise.
18209         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18210         * optabs-query.c (get_best_extraction_insn): Likewise.
18211         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18212         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18213         (expand_mult_highpart, valid_multiword_target_p): Likewise.
18214         * recog.c (offsettable_address_addr_space_p): Likewise.
18215         * regcprop.c (maybe_mode_change): Likewise.
18216         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18217         * regrename.c (build_def_use): Likewise.
18218         * regstat.c (dump_reg_info): Likewise.
18219         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18220         (find_reloads, find_reloads_subreg_address): Likewise.
18221         * reload1.c (eliminate_regs_1): Likewise.
18222         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18223         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18224         (simplify_binary_operation_1, simplify_subreg): Likewise.
18225         * targhooks.c (default_function_arg_padding): Likewise.
18226         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18227         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18228         (verify_gimple_assign_ternary): Likewise.
18229         * tree-inline.c (estimate_move_cost): Likewise.
18230         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18231         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18232         (get_address_cost_ainc): Likewise.
18233         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18234         (vect_supportable_dr_alignment): Likewise.
18235         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18236         (vectorizable_reduction): Likewise.
18237         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18238         (vectorizable_operation, vectorizable_load): Likewise.
18239         * tree.c (build_same_sized_truth_vector_type): Likewise.
18240         * valtrack.c (cleanup_auto_inc_dec): Likewise.
18241         * var-tracking.c (emit_note_insn_var_location): Likewise.
18242         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18243         (ADDR_VEC_ALIGN): Likewise.
18245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18246             Alan Hayward  <alan.hayward@arm.com>
18247             David Sherwood  <david.sherwood@arm.com>
18249         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18250         unsigned short.
18251         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18252         or if measurement_type is polynomial.
18253         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18254         * combine.c (make_extraction): Likewise.
18255         * dse.c (find_shift_sequence): Likewise.
18256         * dwarf2out.c (mem_loc_descriptor): Likewise.
18257         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18258         (extract_bit_field, extract_low_bits): Likewise.
18259         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18260         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18261         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18262         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18263         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18264         * reload.c (find_reloads): Likewise.
18265         * reload1.c (alter_reg): Likewise.
18266         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18267         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18268         * tree-if-conv.c (predicate_mem_writes): Likewise.
18269         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18270         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18271         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18272         * valtrack.c (dead_debug_insert_temp): Likewise.
18273         * varasm.c (mergeable_constant_section): Likewise.
18274         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18276 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18277             Alan Hayward  <alan.hayward@arm.com>
18278             David Sherwood  <david.sherwood@arm.com>
18280         * expr.c (expand_assignment): Cope with polynomial mode sizes
18281         when assigning to a CONCAT.
18283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18284             Alan Hayward  <alan.hayward@arm.com>
18285             David Sherwood  <david.sherwood@arm.com>
18287         * machmode.h (mode_precision): Change from unsigned short to
18288         poly_uint16_pod.
18289         (mode_to_precision): Return a poly_uint16 rather than an unsigned
18290         short.
18291         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18292         or if measurement_type is not polynomial.
18293         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
18294         in which the mode is already known to be a scalar_int_mode.
18295         * genmodes.c (emit_mode_precision): Change the type of mode_precision
18296         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
18297         initializer.
18298         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18299         for GET_MODE_PRECISION.
18300         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18301         for GET_MODE_PRECISION.
18302         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18303         as polynomial.
18304         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18305         (expand_field_assignment, make_extraction): Likewise.
18306         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18307         (get_last_value): Likewise.
18308         * convert.c (convert_to_integer_1): Likewise.
18309         * cse.c (cse_insn): Likewise.
18310         * expr.c (expand_expr_real_1): Likewise.
18311         * lra-constraints.c (simplify_operand_subreg): Likewise.
18312         * optabs-query.c (can_atomic_load_p): Likewise.
18313         * optabs.c (expand_atomic_load): Likewise.
18314         (expand_atomic_store): Likewise.
18315         * ree.c (combine_reaching_defs): Likewise.
18316         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18317         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18318         * tree.h (type_has_mode_precision_p): Likewise.
18319         * ubsan.c (instrument_si_overflow): Likewise.
18321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18322             Alan Hayward  <alan.hayward@arm.com>
18323             David Sherwood  <david.sherwood@arm.com>
18325         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18326         polynomial numbers of units.
18327         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18328         (valid_vector_subparts_p): New function.
18329         (build_vector_type): Remove temporary shim and take the number
18330         of units as a poly_uint64 rather than an int.
18331         (build_opaque_vector_type): Take the number of units as a
18332         poly_uint64 rather than an int.
18333         * tree.c (build_vector_from_ctor): Handle polynomial
18334         TYPE_VECTOR_SUBPARTS.
18335         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18336         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18337         (build_vector_from_val): If the number of units is variable,
18338         use build_vec_duplicate_cst for constant operands and
18339         VEC_DUPLICATE_EXPR otherwise.
18340         (make_vector_type): Remove temporary is_constant ().
18341         (build_vector_type, build_opaque_vector_type): Take the number of
18342         units as a poly_uint64 rather than an int.
18343         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18344         VECTOR_CST_NELTS.
18345         * cfgexpand.c (expand_debug_expr): Likewise.
18346         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18347         (store_constructor, expand_expr_real_1): Likewise.
18348         (const_scalar_mask_from_tree): Likewise.
18349         * fold-const-call.c (fold_const_reduction): Likewise.
18350         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18351         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18352         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18353         (fold_relational_const): Likewise.
18354         (native_interpret_vector): Likewise.  Change the size from an
18355         int to an unsigned int.
18356         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18357         TYPE_VECTOR_SUBPARTS.
18358         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18359         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18360         duplicating a non-constant operand into a variable-length vector.
18361         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18362         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18363         * ipa-icf.c (sem_variable::equals): Likewise.
18364         * match.pd: Likewise.
18365         * omp-simd-clone.c (simd_clone_subparts): Likewise.
18366         * print-tree.c (print_node): Likewise.
18367         * stor-layout.c (layout_type): Likewise.
18368         * targhooks.c (default_builtin_vectorization_cost): Likewise.
18369         * tree-cfg.c (verify_gimple_comparison): Likewise.
18370         (verify_gimple_assign_binary): Likewise.
18371         (verify_gimple_assign_ternary): Likewise.
18372         (verify_gimple_assign_single): Likewise.
18373         * tree-pretty-print.c (dump_generic_node): Likewise.
18374         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18375         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18376         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18377         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18378         (vect_shift_permute_load_chain): Likewise.
18379         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18380         (expand_vector_condition, optimize_vector_constructor): Likewise.
18381         (lower_vec_perm, get_compute_type): Likewise.
18382         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18383         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18384         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18385         (vect_recog_mask_conversion_pattern): Likewise.
18386         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18387         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18388         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18389         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18390         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18391         (vectorizable_shift, vectorizable_operation, vectorizable_store)
18392         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18393         (supportable_widening_operation): Likewise.
18394         (supportable_narrowing_operation): Likewise.
18395         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18396         Likewise.
18397         * varasm.c (output_constant): Likewise.
18399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18400             Alan Hayward  <alan.hayward@arm.com>
18401             David Sherwood  <david.sherwood@arm.com>
18403         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18404         so that both the length == 3 and length != 3 cases set up their
18405         own permute vectors.  Add comments explaining why we know the
18406         number of elements is constant.
18407         (vect_permute_load_chain): Likewise.
18409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18410             Alan Hayward  <alan.hayward@arm.com>
18411             David Sherwood  <david.sherwood@arm.com>
18413         * machmode.h (mode_nunits): Change from unsigned char to
18414         poly_uint16_pod.
18415         (ONLY_FIXED_SIZE_MODES): New macro.
18416         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18417         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18418         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18419         New typedefs.
18420         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18421         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18422         or if measurement_type is not polynomial.
18423         * genmodes.c (ZERO_COEFFS): New macro.
18424         (emit_mode_nunits_inline): Make mode_nunits_inline return a
18425         poly_uint16.
18426         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18427         Use ZERO_COEFFS when emitting initializers.
18428         * data-streamer.h (bp_pack_poly_value): New function.
18429         (bp_unpack_poly_value): Likewise.
18430         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18431         for GET_MODE_NUNITS.
18432         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18433         for GET_MODE_NUNITS.
18434         * tree.c (make_vector_type): Remove temporary shim and make
18435         the real function take the number of units as a poly_uint64
18436         rather than an int.
18437         (build_vector_type_for_mode): Handle polynomial nunits.
18438         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18439         * emit-rtl.c (const_vec_series_p_1): Likewise.
18440         (gen_rtx_CONST_VECTOR): Likewise.
18441         * fold-const.c (test_vec_duplicate_folding): Likewise.
18442         * genrecog.c (validate_pattern): Likewise.
18443         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18444         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18445         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18446         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18447         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18448         * rtlanal.c (subreg_get_info): Likewise.
18449         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18450         (vect_grouped_load_supported): Likewise.
18451         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18452         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18453         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18454         (simplify_const_unary_operation, simplify_binary_operation_1)
18455         (simplify_const_binary_operation, simplify_ternary_operation)
18456         (test_vector_ops_duplicate, test_vector_ops): Likewise.
18457         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18458         instead of CONST_VECTOR_NUNITS.
18459         * varasm.c (output_constant_pool_2): Likewise.
18460         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18461         explicit-encoded elements in the XVEC for variable-length vectors.
18463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18465         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18467 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18468             Alan Hayward  <alan.hayward@arm.com>
18469             David Sherwood  <david.sherwood@arm.com>
18471         * coretypes.h (fixed_size_mode): Declare.
18472         (fixed_size_mode_pod): New typedef.
18473         * builtins.h (target_builtins::x_apply_args_mode)
18474         (target_builtins::x_apply_result_mode): Change type to
18475         fixed_size_mode_pod.
18476         * builtins.c (apply_args_size, apply_result_size, result_vector)
18477         (expand_builtin_apply_args_1, expand_builtin_apply)
18478         (expand_builtin_return): Update accordingly.
18480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18482         * cse.c (hash_rtx_cb): Hash only the encoded elements.
18483         * cselib.c (cselib_hash_rtx): Likewise.
18484         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18485         CONST_VECTOR encoding.
18487 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18488             Jeff Law  <law@redhat.com>
18490         PR target/83641
18491         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18492         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18493         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18494         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18496         PR target/83641
18497         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18498         explicitly probe *sp in a noreturn function if there were any callee
18499         register saves or frame pointer is needed.
18501 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18503         PR debug/83621
18504         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18505         BLKmode for ternary, binary or unary expressions.
18507         PR debug/83645
18508         * var-tracking.c (delete_vta_debug_insn): New inline function.
18509         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18510         insns from get_insns () to NULL instead of each bb separately.
18511         Use delete_vta_debug_insn.  No longer static.
18512         (vt_debug_insns_local, variable_tracking_main_1): Adjust
18513         delete_vta_debug_insns callers.
18514         * rtl.h (delete_vta_debug_insns): Declare.
18515         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18516         instead of variable_tracking_main.
18518 2018-01-03  Martin Sebor  <msebor@redhat.com>
18520         PR tree-optimization/83603
18521         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18522         arguments past the endof the argument list in functions declared
18523         without a prototype.
18524         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18525         Avoid checking when arguments are null.
18527 2018-01-03  Martin Sebor  <msebor@redhat.com>
18529         PR c/83559
18530         * doc/extend.texi (attribute const): Fix a typo.
18531         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18532         issuing -Wsuggest-attribute for void functions.
18534 2018-01-03  Martin Sebor  <msebor@redhat.com>
18536         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18537         offset_int::from instead of wide_int::to_shwi.
18538         (maybe_diag_overlap): Remove assertion.
18539         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18540         * gimple-ssa-sprintf.c (format_directive): Same.
18541         (parse_directive): Same.
18542         (sprintf_dom_walker::compute_format_length): Same.
18543         (try_substitute_return_value): Same.
18545 2018-01-03  Jeff Law  <law@redhat.com>
18547         PR middle-end/83654
18548         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18549         non-constant residual for zero at runtime and avoid probing in
18550         that case.  Reorganize code for trailing problem to mirror handling
18551         of the residual.
18553 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18555         PR tree-optimization/83501
18556         * tree-ssa-strlen.c (get_string_cst): New.
18557         (handle_char_store): Call get_string_cst.
18559 2018-01-03  Martin Liska  <mliska@suse.cz>
18561         PR tree-optimization/83593
18562         * tree-ssa-strlen.c: Include tree-cfg.h.
18563         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18564         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18565         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18566         to false.
18567         (strlen_dom_walker::before_dom_children): Call
18568         gimple_purge_dead_eh_edges. Dump tranformation with details
18569         dump flags.
18570         (strlen_dom_walker::before_dom_children): Update call by adding
18571         new argument cleanup_eh.
18572         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18574 2018-01-03  Martin Liska  <mliska@suse.cz>
18576         PR ipa/83549
18577         * cif-code.def (VARIADIC_THUNK): New enum value.
18578         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18579         thunks.
18581 2018-01-03  Jan Beulich  <jbeulich@suse.com>
18583         * sse.md (mov<mode>_internal): Tighten condition for when to use
18584         vmovdqu<ssescalarsize> for TI and OI modes.
18586 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18588         Update copyright years.
18590 2018-01-03  Martin Liska  <mliska@suse.cz>
18592         PR ipa/83594
18593         * ipa-visibility.c (function_and_variable_visibility): Skip
18594         functions with noipa attribure.
18596 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18598         * gcc.c (process_command): Update copyright notice dates.
18599         * gcov-dump.c (print_version): Ditto.
18600         * gcov.c (print_version): Ditto.
18601         * gcov-tool.c (print_version): Ditto.
18602         * gengtype.c (create_file): Ditto.
18603         * doc/cpp.texi: Bump @copying's copyright year.
18604         * doc/cppinternals.texi: Ditto.
18605         * doc/gcc.texi: Ditto.
18606         * doc/gccint.texi: Ditto.
18607         * doc/gcov.texi: Ditto.
18608         * doc/install.texi: Ditto.
18609         * doc/invoke.texi: Ditto.
18611 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18613         * vector-builder.h (vector_builder::m_full_nelts): Change from
18614         unsigned int to poly_uint64.
18615         (vector_builder::full_nelts): Update prototype accordingly.
18616         (vector_builder::new_vector): Likewise.
18617         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18618         (vector_builder::operator ==): Likewise.
18619         (vector_builder::finalize): Likewise.
18620         * int-vector-builder.h (int_vector_builder::int_vector_builder):
18621         Take the number of elements as a poly_uint64 rather than an
18622         unsigned int.
18623         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18624         from unsigned int to poly_uint64.
18625         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18626         (vec_perm_indices::new_vector): Likewise.
18627         (vec_perm_indices::length): Likewise.
18628         (vec_perm_indices::nelts_per_input): Likewise.
18629         (vec_perm_indices::input_nelts): Likewise.
18630         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18631         number of elements per input as a poly_uint64 rather than an
18632         unsigned int.  Use the original encoding for variable-length
18633         vectors, rather than clamping each individual element.
18634         For the second and subsequent elements in each pattern,
18635         clamp the step and base before clamping their sum.
18636         (vec_perm_indices::series_p): Handle polynomial element counts.
18637         (vec_perm_indices::all_in_range_p): Likewise.
18638         (vec_perm_indices_to_tree): Likewise.
18639         (vec_perm_indices_to_rtx): Likewise.
18640         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18641         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18642         (tree_vector_builder::new_binary_operation): Handle polynomial
18643         element counts.  Return false if we need to know the number
18644         of elements at compile time.
18645         * fold-const.c (fold_vec_perm): Punt if the number of elements
18646         isn't known at compile time.
18648 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18650         * vec-perm-indices.h (vec_perm_builder): Change element type
18651         from HOST_WIDE_INT to poly_int64.
18652         (vec_perm_indices::element_type): Update accordingly.
18653         (vec_perm_indices::clamp): Handle polynomial element_types.
18654         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18655         (vec_perm_indices::all_in_range_p): Likewise.
18656         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18657         than shwi trees.
18658         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18659         polynomial vec_perm_indices element types.
18660         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18661         * fold-const.c (fold_vec_perm): Likewise.
18662         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18663         * tree-vect-generic.c (lower_vec_perm): Likewise.
18664         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18665         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18666         element type to HOST_WIDE_INT.
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         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18673         rather than an int.  Use plus_constant.
18674         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18675         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18677 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18678             Alan Hayward  <alan.hayward@arm.com>
18679             David Sherwood  <david.sherwood@arm.com>
18681         * calls.c (emit_call_1, expand_call): Change struct_value_size from
18682         a HOST_WIDE_INT to a poly_int64.
18684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18685             Alan Hayward  <alan.hayward@arm.com>
18686             David Sherwood  <david.sherwood@arm.com>
18688         * calls.c (load_register_parameters): Cope with polynomial
18689         mode sizes.  Require a constant size for BLKmode parameters
18690         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
18691         forces a parameter to be padded at the lsb end in order to
18692         fill a complete number of words, require the parameter size
18693         to be ordered wrt UNITS_PER_WORD.
18695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18696             Alan Hayward  <alan.hayward@arm.com>
18697             David Sherwood  <david.sherwood@arm.com>
18699         * reload1.c (spill_stack_slot_width): Change element type
18700         from unsigned int to poly_uint64_pod.
18701         (alter_reg): Treat mode sizes as polynomial.
18703 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18704             Alan Hayward  <alan.hayward@arm.com>
18705             David Sherwood  <david.sherwood@arm.com>
18707         * reload.c (complex_word_subreg_p): New function.
18708         (reload_inner_reg_of_subreg, push_reload): Use it.
18710 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18711             Alan Hayward  <alan.hayward@arm.com>
18712             David Sherwood  <david.sherwood@arm.com>
18714         * lra-constraints.c (process_alt_operands): Reject matched
18715         operands whose sizes aren't ordered.
18716         (match_reload): Refer to this check here.
18718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18719             Alan Hayward  <alan.hayward@arm.com>
18720             David Sherwood  <david.sherwood@arm.com>
18722         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18723         that the mode size is in the set {1, 2, 4, 8, 16}.
18725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18726             Alan Hayward  <alan.hayward@arm.com>
18727             David Sherwood  <david.sherwood@arm.com>
18729         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18730         Use plus_constant instead of gen_rtx_PLUS.
18732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18733             Alan Hayward  <alan.hayward@arm.com>
18734             David Sherwood  <david.sherwood@arm.com>
18736         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18737         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18738         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18739         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18740         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18741         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18742         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18743         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18744         * config/i386/i386.c (ix86_push_rounding): ...this new function.
18745         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18746         a poly_int64.
18747         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18748         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18749         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18750         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18751         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18752         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18753         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18754         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18755         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18756         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18757         function.
18758         * expr.c (emit_move_resolve_push): Treat the input and result
18759         of PUSH_ROUNDING as a poly_int64.
18760         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18761         (emit_push_insn): Likewise.
18762         * lra-eliminations.c (mark_not_eliminable): Likewise.
18763         * recog.c (push_operand): Likewise.
18764         * reload1.c (elimination_effects): Likewise.
18765         * rtlanal.c (nonzero_bits1): Likewise.
18766         * calls.c (store_one_arg): Likewise.  Require the padding to be
18767         known at compile time.
18769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18770             Alan Hayward  <alan.hayward@arm.com>
18771             David Sherwood  <david.sherwood@arm.com>
18773         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18774         Use plus_constant instead of gen_rtx_PLUS.
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         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18781         rather than an int.
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         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18788         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18789         via stack temporaries.  Treat the mode size as polynomial too.
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         * expr.c (expand_expr_real_2): When handling conversions involving
18796         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18797         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
18798         as a poly_uint64 too.
18800 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18801             Alan Hayward  <alan.hayward@arm.com>
18802             David Sherwood  <david.sherwood@arm.com>
18804         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18806 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18807             Alan Hayward  <alan.hayward@arm.com>
18808             David Sherwood  <david.sherwood@arm.com>
18810         * combine.c (can_change_dest_mode): Handle polynomial
18811         REGMODE_NATURAL_SIZE.
18812         * expmed.c (store_bit_field_1): Likewise.
18813         * expr.c (store_constructor): Likewise.
18814         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18815         and polynomial REGMODE_NATURAL_SIZE.
18816         (gen_lowpart_common): Likewise.
18817         * reginfo.c (record_subregs_of_mode): Likewise.
18818         * rtlanal.c (read_modify_subreg_p): Likewise.
18820 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18821             Alan Hayward  <alan.hayward@arm.com>
18822             David Sherwood  <david.sherwood@arm.com>
18824         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18825         numbers of elements.
18827 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18828             Alan Hayward  <alan.hayward@arm.com>
18829             David Sherwood  <david.sherwood@arm.com>
18831         * match.pd: Cope with polynomial numbers of vector elements.
18833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18834             Alan Hayward  <alan.hayward@arm.com>
18835             David Sherwood  <david.sherwood@arm.com>
18837         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
18838         in a POINTER_PLUS_EXPR.
18840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18841             Alan Hayward  <alan.hayward@arm.com>
18842             David Sherwood  <david.sherwood@arm.com>
18844         * omp-simd-clone.c (simd_clone_subparts): New function.
18845         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
18846         (ipa_simd_modify_function_body): Likewise.
18848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18849             Alan Hayward  <alan.hayward@arm.com>
18850             David Sherwood  <david.sherwood@arm.com>
18852         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
18853         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
18854         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
18855         (expand_vector_condition, vector_element): Likewise.
18856         (subparts_gt): New function.
18857         (get_compute_type): Use subparts_gt.
18858         (count_type_subparts): Delete.
18859         (expand_vector_operations_1): Use subparts_gt instead of
18860         count_type_subparts.
18862 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18863             Alan Hayward  <alan.hayward@arm.com>
18864             David Sherwood  <david.sherwood@arm.com>
18866         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18867         (vect_compile_time_alias): ...this new function.  Do the calculation
18868         on poly_ints rather than trees.
18869         (vect_prune_runtime_alias_test_list): Update call accordingly.
18871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18872             Alan Hayward  <alan.hayward@arm.com>
18873             David Sherwood  <david.sherwood@arm.com>
18875         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18876         numbers of units.
18877         (vect_schedule_slp_instance): Likewise.
18879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18880             Alan Hayward  <alan.hayward@arm.com>
18881             David Sherwood  <david.sherwood@arm.com>
18883         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18884         constant and extern definitions for variable-length vectors.
18885         (vect_get_constant_vectors): Note that the number of units
18886         is known to be constant.
18888 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18889             Alan Hayward  <alan.hayward@arm.com>
18890             David Sherwood  <david.sherwood@arm.com>
18892         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18893         of units as polynomial.  Choose between WIDE and NARROW based
18894         on multiple_p.
18896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18897             Alan Hayward  <alan.hayward@arm.com>
18898             David Sherwood  <david.sherwood@arm.com>
18900         * tree-vect-stmts.c (simd_clone_subparts): New function.
18901         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18903 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18904             Alan Hayward  <alan.hayward@arm.com>
18905             David Sherwood  <david.sherwood@arm.com>
18907         * tree-vect-stmts.c (vectorizable_call): Treat the number of
18908         vectors as polynomial.  Use build_index_vector for
18909         IFN_GOMP_SIMD_LANE.
18911 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18912             Alan Hayward  <alan.hayward@arm.com>
18913             David Sherwood  <david.sherwood@arm.com>
18915         * tree-vect-stmts.c (get_load_store_type): Treat the number of
18916         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18917         for variable-length vectors.
18918         (vectorizable_mask_load_store): Treat the number of units as
18919         polynomial, asserting that it is constant if the condition has
18920         already been enforced.
18921         (vectorizable_store, vectorizable_load): Likewise.
18923 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18924             Alan Hayward  <alan.hayward@arm.com>
18925             David Sherwood  <david.sherwood@arm.com>
18927         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18928         of units as polynomial.  Punt if we can't tell at compile time
18929         which vector contains the final result.
18931 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18932             Alan Hayward  <alan.hayward@arm.com>
18933             David Sherwood  <david.sherwood@arm.com>
18935         * tree-vect-loop.c (vectorizable_induction): Treat the number
18936         of units as polynomial.  Punt on SLP inductions.  Use an integer
18937         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
18938         cast of such a series for variable-length floating-point
18939         reductions.
18941 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18942             Alan Hayward  <alan.hayward@arm.com>
18943             David Sherwood  <david.sherwood@arm.com>
18945         * tree.h (build_index_vector): Declare.
18946         * tree.c (build_index_vector): New function.
18947         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18948         of units as polynomial, forcibly converting it to a constant if
18949         vectorizable_reduction has already enforced the condition.
18950         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
18951         to create a {1,2,3,...} vector.
18952         (vectorizable_reduction): Treat the number of units as polynomial.
18953         Choose vectype_in based on the largest scalar element size rather
18954         than the smallest number of units.  Enforce the restrictions
18955         relied on above.
18957 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18958             Alan Hayward  <alan.hayward@arm.com>
18959             David Sherwood  <david.sherwood@arm.com>
18961         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18962         number of units as polynomial.
18964 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18965             Alan Hayward  <alan.hayward@arm.com>
18966             David Sherwood  <david.sherwood@arm.com>
18968         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18969         * target.def (autovectorize_vector_sizes): Return the vector sizes
18970         by pointer, using vector_sizes rather than a bitmask.
18971         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18972         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18973         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18974         Likewise.
18975         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18976         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18977         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18978         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18979         * omp-general.c (omp_max_vf): Likewise.
18980         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18981         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18982         * tree-vect-loop.c (vect_analyze_loop): Likewise.
18983         * tree-vect-slp.c (vect_slp_bb): Likewise.
18984         * doc/tm.texi: Regenerate.
18985         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18986         to a poly_uint64.
18987         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18988         the vector size as a poly_uint64 rather than an unsigned int.
18989         (current_vector_size): Change from an unsigned int to a poly_uint64.
18990         (get_vectype_for_scalar_type): Update accordingly.
18991         * tree.h (build_truth_vector_type): Take the size and number of
18992         units as a poly_uint64 rather than an unsigned int.
18993         (build_vector_type): Add a temporary overload that takes
18994         the number of units as a poly_uint64 rather than an unsigned int.
18995         * tree.c (make_vector_type): Likewise.
18996         (build_truth_vector_type): Take the number of units as a poly_uint64
18997         rather than an unsigned int.
18999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19000             Alan Hayward  <alan.hayward@arm.com>
19001             David Sherwood  <david.sherwood@arm.com>
19003         * target.def (get_mask_mode): Take the number of units and length
19004         as poly_uint64s rather than unsigned ints.
19005         * targhooks.h (default_get_mask_mode): Update accordingly.
19006         * targhooks.c (default_get_mask_mode): Likewise.
19007         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19008         * doc/tm.texi: Regenerate.
19010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19011             Alan Hayward  <alan.hayward@arm.com>
19012             David Sherwood  <david.sherwood@arm.com>
19014         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19015         * omp-general.c (omp_max_vf): Likewise.
19016         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19017         (expand_omp_simd): Handle polynomial safelen.
19018         * omp-low.c (omplow_simd_context): Add a default constructor.
19019         (omplow_simd_context::max_vf): Change from int to poly_uint64.
19020         (lower_rec_simd_input_clauses): Update accordingly.
19021         (lower_rec_input_clauses): Likewise.
19023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19024             Alan Hayward  <alan.hayward@arm.com>
19025             David Sherwood  <david.sherwood@arm.com>
19027         * tree-vectorizer.h (vect_nunits_for_cost): New function.
19028         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19029         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19030         (vect_analyze_slp_cost): Likewise.
19031         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19032         (vect_model_load_cost): Likewise.
19034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19035             Alan Hayward  <alan.hayward@arm.com>
19036             David Sherwood  <david.sherwood@arm.com>
19038         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19039         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19040         from an unsigned int * to a poly_uint64_pod *.
19041         (calculate_unrolling_factor): New function.
19042         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
19044 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19045             Alan Hayward  <alan.hayward@arm.com>
19046             David Sherwood  <david.sherwood@arm.com>
19048         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19049         from an unsigned int to a poly_uint64.
19050         (_loop_vec_info::slp_unrolling_factor): Likewise.
19051         (_loop_vec_info::vectorization_factor): Change from an int
19052         to a poly_uint64.
19053         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19054         (vect_get_num_vectors): New function.
19055         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19056         (vect_get_num_copies): Use vect_get_num_vectors.
19057         (vect_analyze_data_ref_dependences): Change max_vf from an int *
19058         to an unsigned int *.
19059         (vect_analyze_data_refs): Change min_vf from an int * to a
19060         poly_uint64 *.
19061         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19062         than an unsigned HOST_WIDE_INT.
19063         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19064         (vect_analyze_data_ref_dependence): Change max_vf from an int *
19065         to an unsigned int *.
19066         (vect_analyze_data_ref_dependences): Likewise.
19067         (vect_compute_data_ref_alignment): Handle polynomial vf.
19068         (vect_enhance_data_refs_alignment): Likewise.
19069         (vect_prune_runtime_alias_test_list): Likewise.
19070         (vect_shift_permute_load_chain): Likewise.
19071         (vect_supportable_dr_alignment): Likewise.
19072         (dependence_distance_ge_vf): Take the vectorization factor as a
19073         poly_uint64 rather than an unsigned HOST_WIDE_INT.
19074         (vect_analyze_data_refs): Change min_vf from an int * to a
19075         poly_uint64 *.
19076         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19077         vfm1 as a poly_uint64 rather than an int.  Make the same change
19078         for the returned bound_scalar.
19079         (vect_gen_vector_loop_niters): Handle polynomial vf.
19080         (vect_do_peeling): Likewise.  Update call to
19081         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19082         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19083         be constant.
19084         * tree-vect-loop.c (vect_determine_vectorization_factor)
19085         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19086         (vect_get_known_peeling_cost): Likewise.
19087         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19088         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19089         (vect_transform_loop): Likewise.  Use the lowest possible VF when
19090         updating the upper bounds of the loop.
19091         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
19092         rather than an int.
19093         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19094         polynomial unroll factors.
19095         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19096         (vect_make_slp_decision): Likewise.
19097         (vect_supported_load_permutation_p): Likewise, and polynomial
19098         vf too.
19099         (vect_analyze_slp_cost): Handle polynomial vf.
19100         (vect_slp_analyze_node_operations): Likewise.
19101         (vect_slp_analyze_bb_1): Likewise.
19102         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19103         than an unsigned HOST_WIDE_INT.
19104         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19105         (vectorizable_load): Handle polynomial vf.
19106         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19107         a poly_uint64.
19108         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19110 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19111             Alan Hayward  <alan.hayward@arm.com>
19112             David Sherwood  <david.sherwood@arm.com>
19114         * match.pd: Handle bit operations involving three constants
19115         and try to fold one pair.
19117 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19119         * tree-vect-loop-manip.c: Include gimple-fold.h.
19120         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19121         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
19122         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19123         Add a path that uses a step of VF instead of 1, but disable it
19124         for now.
19125         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19126         and niters_no_overflow parameters.  Update calls to
19127         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19128         Create a new SSA name if the latter choses to use a ste other
19129         than zero, and return it via niters_vector_mult_vf_var.
19130         * tree-vect-loop.c (vect_transform_loop): Update calls to
19131         vect_do_peeling, vect_gen_vector_loop_niters and
19132         slpeel_make_loop_iterate_ntimes.
19133         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19134         (vect_gen_vector_loop_niters): Update declarations after above changes.
19136 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
19138         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19139         128-bit round to integer instructions.
19140         (ceil<mode>2): Likewise.
19141         (btrunc<mode>2): Likewise.
19142         (round<mode>2): Likewise.
19144 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19146         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19147         unaligned VSX load/store on P8/P9.
19148         (expand_block_clear): Allow the use of unaligned VSX
19149         load/store on P8/P9.
19151 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19153         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19154         New function.
19155         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19156         swap associated with both a load and a store.
19158 2018-01-02  Andrew Waterman  <andrew@sifive.com>
19160         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19161         * config/riscv/riscv.md (clear_cache): Use it.
19163 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
19165         * web.c: Remove out-of-date comment.
19167 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19169         * expr.c (fixup_args_size_notes): Check that any existing
19170         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19171         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19172         (emit_single_push_insn): ...here.
19174 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19176         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19177         (const_vector_encoded_nelts): New function.
19178         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19179         (const_vector_int_elt, const_vector_elt): Declare.
19180         * emit-rtl.c (const_vector_int_elt_1): New function.
19181         (const_vector_elt): Likewise.
19182         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19183         of CONST_VECTOR_ELT.
19185 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19187         * expr.c: Include rtx-vector-builder.h.
19188         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19189         directly on the tree encoding.
19190         (const_vector_from_tree): Likewise.
19191         * optabs.c: Include rtx-vector-builder.h.
19192         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19193         sequence of "u" values.
19194         * vec-perm-indices.c: Include rtx-vector-builder.h.
19195         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19196         directly on the vec_perm_indices encoding.
19198 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19200         * doc/rtl.texi (const_vector): Describe new encoding scheme.
19201         * Makefile.in (OBJS): Add rtx-vector-builder.o.
19202         * rtx-vector-builder.h: New file.
19203         * rtx-vector-builder.c: Likewise.
19204         * rtl.h (rtx_def::u2): Add a const_vector field.
19205         (CONST_VECTOR_NPATTERNS): New macro.
19206         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19207         (CONST_VECTOR_DUPLICATE_P): Likewise.
19208         (CONST_VECTOR_STEPPED_P): Likewise.
19209         (CONST_VECTOR_ENCODED_ELT): Likewise.
19210         (const_vec_duplicate_p): Check for a duplicated vector encoding.
19211         (unwrap_const_vec_duplicate): Likewise.
19212         (const_vec_series_p): Check for a non-duplicated vector encoding.
19213         Say that the function only returns true for integer vectors.
19214         * emit-rtl.c: Include rtx-vector-builder.h.
19215         (gen_const_vec_duplicate_1): Delete.
19216         (gen_const_vector): Call gen_const_vec_duplicate instead of
19217         gen_const_vec_duplicate_1.
19218         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19219         (gen_const_vec_duplicate): Use rtx_vector_builder.
19220         (gen_const_vec_series): Likewise.
19221         (gen_rtx_CONST_VECTOR): Likewise.
19222         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19223         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19224         Build a new vector rather than modifying a CONST_VECTOR in-place.
19225         (handle_special_swappables): Update call accordingly.
19226         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19227         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19228         Build a new vector rather than modifying a CONST_VECTOR in-place.
19229         (handle_special_swappables): Update call accordingly.
19231 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19233         * simplify-rtx.c (simplify_const_binary_operation): Use
19234         CONST_VECTOR_ELT instead of XVECEXP.
19236 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19238         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19239         the selector elements to be different from the data elements
19240         if the selector is a VECTOR_CST.
19241         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19242         ssizetype for the selector.
19244 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19246         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19247         before testing each element individually.
19248         * tree-vect-generic.c (lower_vec_perm): Likewise.
19250 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19252         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19253         * selftest-run-tests.c (selftest::run_tests): Call it.
19254         * vector-builder.h (vector_builder::operator ==): New function.
19255         (vector_builder::operator !=): Likewise.
19256         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19257         (vec_perm_indices::all_from_input_p): New function.
19258         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19259         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19260         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19261         instead of reading the VECTOR_CST directly.  Detect whether both
19262         vector inputs are the same before constructing the vec_perm_indices,
19263         and update the number of inputs argument accordingly.  Use the
19264         utility functions added above.  Only construct sel2 if we need to.
19266 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19268         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19269         the broadcast of the low byte.
19270         (expand_mult_highpart): Use an explicit encoding for the permutes.
19271         * optabs-query.c (can_mult_highpart_p): Likewise.
19272         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19273         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19274         (vectorizable_bswap): Likewise.
19275         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19276         explicit encoding for the power-of-2 permutes.
19277         (vect_permute_store_chain): Likewise.
19278         (vect_grouped_load_supported): Likewise.
19279         (vect_permute_load_chain): Likewise.
19281 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19283         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19284         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19285         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19286         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19287         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19288         (vect_gen_perm_mask_any): Likewise.
19290 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19292         * int-vector-builder.h: New file.
19293         * vec-perm-indices.h: Include int-vector-builder.h.
19294         (vec_perm_indices): Redefine as an int_vector_builder.
19295         (auto_vec_perm_indices): Delete.
19296         (vec_perm_builder): Redefine as a stand-alone class.
19297         (vec_perm_indices::vec_perm_indices): New function.
19298         (vec_perm_indices::clamp): Likewise.
19299         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19300         (vec_perm_indices::new_vector): New function.
19301         (vec_perm_indices::new_expanded_vector): Update for new
19302         vec_perm_indices class.
19303         (vec_perm_indices::rotate_inputs): New function.
19304         (vec_perm_indices::all_in_range_p): Operate directly on the
19305         encoded form, without computing elided elements.
19306         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19307         encoding.  Update for new vec_perm_indices class.
19308         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19309         the given vec_perm_builder.
19310         (expand_vec_perm_var): Update vec_perm_builder constructor.
19311         (expand_mult_highpart): Use vec_perm_builder instead of
19312         auto_vec_perm_indices.
19313         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19314         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
19315         or double series encoding as appropriate.
19316         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19317         vec_perm_indices instead of auto_vec_perm_indices.
19318         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19319         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19320         (vect_permute_store_chain): Likewise.
19321         (vect_grouped_load_supported): Likewise.
19322         (vect_permute_load_chain): Likewise.
19323         (vect_shift_permute_load_chain): Likewise.
19324         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19325         (vect_transform_slp_perm_load): Likewise.
19326         (vect_schedule_slp_instance): Likewise.
19327         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19328         (vectorizable_mask_load_store): Likewise.
19329         (vectorizable_bswap): Likewise.
19330         (vectorizable_store): Likewise.
19331         (vectorizable_load): Likewise.
19332         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19333         vec_perm_indices instead of auto_vec_perm_indices.  Use
19334         tree_to_vec_perm_builder to read the vector from a tree.
19335         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19336         vec_perm_builder instead of a vec_perm_indices.
19337         (have_whole_vector_shift): Use vec_perm_builder and
19338         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
19339         truncation to calc_vec_perm_mask_for_shift.
19340         (vect_create_epilog_for_reduction): Likewise.
19341         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19342         from auto_vec_perm_indices to vec_perm_indices.
19343         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19344         instead of changing individual elements.
19345         (aarch64_vectorize_vec_perm_const): Use new_vector to install
19346         the vector in d.perm.
19347         * config/arm/arm.c (expand_vec_perm_d::perm): Change
19348         from auto_vec_perm_indices to vec_perm_indices.
19349         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19350         instead of changing individual elements.
19351         (arm_vectorize_vec_perm_const): Use new_vector to install
19352         the vector in d.perm.
19353         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19354         Update vec_perm_builder constructor.
19355         (rs6000_expand_interleave): Likewise.
19356         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19357         (rs6000_expand_interleave): Likewise.
19359 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19361         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19362         to qimode could truncate the indices.
19363         * optabs.c (expand_vec_perm_var): Likewise.
19365 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19367         * Makefile.in (OBJS): Add vec-perm-indices.o.
19368         * vec-perm-indices.h: New file.
19369         * vec-perm-indices.c: Likewise.
19370         * target.h (vec_perm_indices): Replace with a forward class
19371         declaration.
19372         (auto_vec_perm_indices): Move to vec-perm-indices.h.
19373         * optabs.h: Include vec-perm-indices.h.
19374         (expand_vec_perm): Delete.
19375         (selector_fits_mode_p, expand_vec_perm_var): Declare.
19376         (expand_vec_perm_const): Declare.
19377         * target.def (vec_perm_const_ok): Replace with...
19378         (vec_perm_const): ...this new hook.
19379         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19380         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19381         * doc/tm.texi: Regenerate.
19382         * optabs.def (vec_perm_const): Delete.
19383         * doc/md.texi (vec_perm_const): Likewise.
19384         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19385         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19386         expand_vec_perm for constant permutation vectors.  Assert that
19387         the mode of variable permutation vectors is the integer equivalent
19388         of the mode that is being permuted.
19389         * optabs-query.h (selector_fits_mode_p): Declare.
19390         * optabs-query.c: Include vec-perm-indices.h.
19391         (selector_fits_mode_p): New function.
19392         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19393         is defined, instead of checking whether the vec_perm_const_optab
19394         exists.  Use targetm.vectorize.vec_perm_const instead of
19395         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
19396         fit in the vector mode before using a variable permute.
19397         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19398         vec_perm_indices instead of an rtx.
19399         (expand_vec_perm): Replace with...
19400         (expand_vec_perm_const): ...this new function.  Take the selector
19401         as a vec_perm_indices rather than an rtx.  Also take the mode of
19402         the selector.  Update call to shift_amt_for_vec_perm_mask.
19403         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19404         Use vec_perm_indices::new_expanded_vector to expand the original
19405         selector into bytes.  Check whether the indices fit in the vector
19406         mode before using a variable permute.
19407         (expand_vec_perm_var): Make global.
19408         (expand_mult_highpart): Use expand_vec_perm_const.
19409         * fold-const.c: Includes vec-perm-indices.h.
19410         * tree-ssa-forwprop.c: Likewise.
19411         * tree-vect-data-refs.c: Likewise.
19412         * tree-vect-generic.c: Likewise.
19413         * tree-vect-loop.c: Likewise.
19414         * tree-vect-slp.c: Likewise.
19415         * tree-vect-stmts.c: Likewise.
19416         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19417         Delete.
19418         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19419         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19420         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19421         (aarch64_vectorize_vec_perm_const): ...this new function.
19422         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19423         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19424         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19425         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19426         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19427         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19428         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19429         into...
19430         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
19431         check for NEON modes.
19432         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19433         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19434         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19435         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19436         into...
19437         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
19438         the old VEC_PERM_CONST conditions.
19439         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19440         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19441         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19442         (ia64_vectorize_vec_perm_const_ok): Merge into...
19443         (ia64_vectorize_vec_perm_const): ...this new function.
19444         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19445         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19446         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19447         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19448         * config/mips/mips.c (mips_expand_vec_perm_const)
19449         (mips_vectorize_vec_perm_const_ok): Merge into...
19450         (mips_vectorize_vec_perm_const): ...this new function.
19451         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19452         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19453         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19454         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19455         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19456         (rs6000_expand_vec_perm_const): Delete.
19457         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19458         Delete.
19459         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19460         (altivec_expand_vec_perm_const_le): Take each operand individually.
19461         Operate on constant selectors rather than rtxes.
19462         (altivec_expand_vec_perm_const): Likewise.  Update call to
19463         altivec_expand_vec_perm_const_le.
19464         (rs6000_expand_vec_perm_const): Delete.
19465         (rs6000_vectorize_vec_perm_const_ok): Delete.
19466         (rs6000_vectorize_vec_perm_const): New function.
19467         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19468         an element count and rtx array.
19469         (rs6000_expand_extract_even): Update call accordingly.
19470         (rs6000_expand_interleave): Likewise.
19471         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19472         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19473         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19474         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19475         (rs6000_expand_vec_perm_const): Delete.
19476         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19477         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19478         (altivec_expand_vec_perm_const_le): Take each operand individually.
19479         Operate on constant selectors rather than rtxes.
19480         (altivec_expand_vec_perm_const): Likewise.  Update call to
19481         altivec_expand_vec_perm_const_le.
19482         (rs6000_expand_vec_perm_const): Delete.
19483         (rs6000_vectorize_vec_perm_const_ok): Delete.
19484         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
19485         reference to the SPE evmerge intructions.
19486         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19487         an element count and rtx array.
19488         (rs6000_expand_extract_even): Update call accordingly.
19489         (rs6000_expand_interleave): Likewise.
19490         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19491         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19492         new function.
19493         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19495 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19497         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19498         vector mode and that that mode matches the mode of the data
19499         being permuted.
19500         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19501         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
19502         directly using expand_vec_perm_1 when forcing selectors into
19503         registers.
19504         (expand_vec_perm_var): New function, split out from expand_vec_perm.
19506 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19508         * optabs-query.h (can_vec_perm_p): Delete.
19509         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19510         * optabs-query.c (can_vec_perm_p): Split into...
19511         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19512         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19513         particular selector is valid.
19514         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19515         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19516         (vect_grouped_load_supported): Likewise.
19517         (vect_shift_permute_load_chain): Likewise.
19518         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19519         (vect_transform_slp_perm_load): Likewise.
19520         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19521         (vectorizable_bswap): Likewise.
19522         (vect_gen_perm_mask_checked): Likewise.
19523         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
19524         implementations of variable permutation vectors into account
19525         when deciding which selector to use.
19526         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19527         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19528         with a false third argument.
19529         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19530         to test whether the constant selector is valid and can_vec_perm_var_p
19531         to test whether a variable selector is valid.
19533 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19535         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19536         * optabs-query.c (can_vec_perm_p): Likewise.
19537         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19538         instead of vec_perm_indices.
19539         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19540         (vect_gen_perm_mask_checked): Likewise,
19541         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19542         (vect_gen_perm_mask_checked): Likewise,
19544 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19546         * optabs-query.h (qimode_for_vec_perm): Declare.
19547         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19548         (qimode_for_vec_perm): ...this new function.
19549         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19551 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19553         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19554         does not have a conditional at the top.
19556 2018-01-02  Richard Biener  <rguenther@suse.de>
19558         * ipa-inline.c (big_speedup_p): Fix expression.
19560 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19562         PR target/81616
19563         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19564         for generic 4->6.
19566 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19568         PR target/81616
19569         Generic tuning.
19570         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19571         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19572         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19573         cond_taken_branch_cost 3->4.
19575 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
19577         PR tree-optimization/83581
19578         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19579         TODO_cleanup_cfg if any changes have been made.
19581         PR middle-end/83608
19582         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19583         convert_modes if target mode has the right side, but different mode
19584         class.
19586         PR middle-end/83609
19587         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19588         last argument when extracting from CONCAT.  If either from_real or
19589         from_imag is NULL, use expansion through memory.  If result is not
19590         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19591         the parts directly to inner mode, if even that fails, use expansion
19592         through memory.
19594         PR middle-end/83623
19595         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19596         check for bswap in mode rather than HImode and use that in expand_unop
19597         too.
19599 Copyright (C) 2018 Free Software Foundation, Inc.
19601 Copying and distribution of this file, with or without modification,
19602 are permitted in any medium without royalty provided the copyright
19603 notice and this notice are preserved.