2018-05-25 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob7d38aeaa15b8b290a40a00cddcbd0b9bbac34e81
1 2018-05-25  Richard Biener  <rguenther@suse.de>
3         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
4         defaulted to true.
5         (ref_maybe_used_by_stmt_p): Likewise.
6         (stmt_may_clobber_ref_p): Likewise.
7         (stmt_may_clobber_ref_p_1): Likewise.
8         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9         and pass it along.
10         (ref_maybe_used_by_stmt_p): Likewise.
11         (stmt_may_clobber_ref_p): Likewise.
12         (stmt_may_clobber_ref_p_1): Likewise.
13         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14         the alias oracle to disambiguate DRs with stmts DR analysis
15         couldn't handle.
16         (vect_analyze_data_refs): Do not give up on not analyzable
17         DRs for BB vectorization.  Remove code truncating the dataref
18         vector.
20 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
22         PR target/85832
23         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
24         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
25         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
27 2018-05-25  Richard Biener  <rguenther@suse.de>
29         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
30         function, combining stmt data ref gathering and fatal analysis
31         parts.
32         (vect_analyze_data_refs): Remove now redudnant code and simplify.
33         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
34         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
35         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
36         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
38 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
40         PR tree-optimization/85720
41         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
42         SCC if all partitions are builtins.
43         (version_loop_by_alias_check): New parameter.  Generate cancelable
44         runtime alias check if all partitions are builtins.
45         (distribute_loop): Update call to above function.
47 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
49         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
50         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
51         (parm_default_def_partition_arg): Ditto.
52         (set_parm_default_def_partition): Ditto.
53         (get_parm_default_def_partitions): Ditto and make it static.
54         (get_undefined_value_partitions): Ditto and make it static.
55         (remove_ssa_form): Refactor call to init_var_map here.
56         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
57         computation for loop region.
58         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
59         (register_default_def): Delete.
60         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
61         (parm_default_def_partition_arg): Ditto.
62         (set_parm_default_def_partition): Ditto.
63         (get_parm_default_def_partitions): Ditto and make it static.
64         (get_undefined_value_partitions): Ditto and make it static.
65         (coalesce_with_default, coalesce_with_default): Update comment.
66         (create_coalesce_list_for_region): New func factored out from
67         create_outofssa_var_map.
68         (populate_coalesce_list_for_outofssa): New func factored out from
69         create_outofssa_var_map and coalesce_ssa_name.
70         (create_outofssa_var_map): Delete.
71         (coalesce_ssa_name): Refactor to support live range computation.
72         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
73         (get_parm_default_def_partitions): Delete.
74         (get_undefined_value_partitions): Ditto.
75         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
76         computation for loop region.
77         (new_tree_live_info, loe_visit_block): Ditto.
78         (live_worklist, set_var_live_on_entry): Ditto.
79         (calculate_live_on_exit, verify_live_on_entry): Ditto.
80         * tree-ssa-live.h (struct _var_map): New fields.
81         (init_var_map): Change decl.
82         (region_contains_p): New.
84 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
86         * tree-ssa-live.h (live_merge_and_clear): Delete.
88 2018-05-25  Richard Biener  <rguenther@suse.de>
90         PR c++/85912
91         * tree-dump.c (dequeue_and_dump): Remove access to removed
92         operand 2 of a SWITCH_EXPR.
94 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
96         * doc/sourcebuild.texi (vect_double_cond_arith): Include
97         multiplication and division.
98         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
99         (cond_udiv@var{m}, cond_umod@var{m}): Document.
100         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
101         (cond_udiv_optab, cond_umod_optab): New optabs.
102         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
103         (IFN_COND_RDIV): New internal functions.
104         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
105         TRUNC_MOD_EXPR and RDIV_EXPR.
106         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
107         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
108         New unspecs.
109         (SVE_INT_BINARY): Include mult.
110         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
111         (optab, sve_int_op): Handle mult.
112         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
113         UNSPEC_COND_DIV.
114         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
115         for SVE_INT_BINARY_SD.
117 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
119         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
120         (optab, sve_int_op): Handle div and udiv.
121         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
122         for SVE_INT_BINARY_SD.
123         (*<optab><mode>3): New insn for the same.
125 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
127         * tree-vect-patterns.c: Include predict.h.
128         (vect_recog_divmod_pattern): Restrict check for division support
129         to when optimizing for size.
131 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
133         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
134         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
135         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
136         (gimple_match_op::set_op): Likewise.
137         (gimple_resimplify4): Declare.
138         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
139         (expr::gen_transform): Likewise.
140         (decision_tree::gen): Generate a simplification routine for 4 operands.
141         * gimple-match-head.c (gimple_simplify): Add an overload for
142         4 operands.  In the top-level function, handle up to 4 call
143         arguments and call gimple_resimplify4.
144         (gimple_resimplify4): New function.
145         (build_call_internal): Pass a fourth operand.
146         (maybe_push_to_seq): Likewise.
147         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
148         Fold VEC_COND_EXPRs of an operation and a default value into
149         an IFN_COND_* function if possible.
150         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
151         New unspecs.
152         (SVE_COND_FP_BINARY): Include them.
153         (optab, sve_fp_op): Handle them.
154         (SVE_INT_BINARY_REV): New code iterator.
155         (SVE_COND_FP_BINARY_REV): New int iterator.
156         (commutative): New int attribute.
157         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
158         Declare.
159         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
160         function.
161         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
162         (*cond_<optab><mode>): New patterns for reversed operands.
164 2018-05-25  Richard Biener  <rguenther@suse.de>
166         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
167         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
168         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
169         (STMT_VINFO_GROUPED_ACCESS): Adjust.
170         * tree-vect-data-refs.c (everywhere): Adjust users.
171         * tree-vect-loop.c (everywhere): Likewise.
172         * tree-vect-slp.c (everywhere): Likewise.
173         * tree-vect-stmts.c (everywhere): Likewise.
174         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
176 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
178         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
179         Rename to...
180         (gcc_cv_as_section_exclude): ... this.
181         Try Solaris as #exclude syntax.
182         * configure: Regenerate.
183         * config.in: Regenerate.
184         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
185         SECTION_EXCLUDE.
186         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
187         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
189         * varasm.c (default_elf_asm_named_section): Don't check if
190         HAVE_GAS_SECTION_EXCLUDE is defined.
192 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
194         * doc/md.texi: Update the documentation of the cond_* optabs
195         to mention the new final operand.  Fix GET_MODE_NUNITS call.
196         Describe the scalar case too.
197         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
198         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
199         instead of 2.
200         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
201         (get_conditional_internal_fn): Update comment.
202         * tree-vect-loop.c (vectorizable_reduction): Pass the original
203         accumulator value as a final argument to conditional functions.
204         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
205         a define_expand and add an "else" operand.  Assert for now that
206         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
207         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
208         (*cond_<optab><mode>): New patterns.
209         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
210         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
211         (UNSPEC_COND_EOR): Delete.
212         (optab): Remove associated mappings.
213         (SVE_INT_BINARY): New code iterator.
214         (sve_int_op): Remove int attribute and add "minus" to the code
215         attribute.
216         (SVE_COND_INT_OP): Delete.
217         (SVE_COND_FP_OP): Rename to...
218         (SVE_COND_FP_BINARY): ...this.
220 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
222         * optabs.c (can_reuse_operands_p): New function.
223         (maybe_legitimize_operands): Try to reuse the results for
224         earlier operands.
226 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
228         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
229         Add {q} suffix to insn mnemonic.
231 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
233         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
234         (msp430_warn_func_return): New.
236 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
238         * fold-const.c (tree_nonzero_bits): New function.
239         * fold-const.h (tree_nonzero_bits): Likewise.
240         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
241         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
243 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
245         PR target/85900
246         PR target/85345
247         * varasm.c (assemble_alias): Check ifunc_resolver only on
248         FUNCTION_DECL.
250 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
252         PR target/85903
253         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
254         when memory input operand is handled.
256 2018-05-24  Luis Machado  <luis.machado@linaro.org>
258         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
259         global.
260         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
262 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
264         * match.pd: Delay FMA folds until after vectorization.
266 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
268         PR target/83009
269         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
270         address check not strict.
272 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
274         * gimple-match.h (gimple_match_op): New class.
275         (mprts_hook): Replace parameters with a gimple_match_op *.
276         (maybe_build_generic_op): Likewise.
277         (gimple_simplified_result_is_gimple_val): Replace parameters with
278         a const gimple_match_op *.
279         (gimple_simplify): Replace code_helper * and tree * parameters with
280         a gimple_match_op * parameter.
281         (gimple_resimplify1): Replace code_helper *, tree and tree *
282         parameters with a gimple_match_op * parameter.
283         (gimple_resimplify2): Likewise.
284         (gimple_resimplify3): Likewise.
285         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
286         parameters with a gimple_match_op * parameter.
287         * gimple-match-head.c (gimple_simplify): Change prototypes of
288         auto-generated functions to take a gimple_match_op * instead of
289         separate code_helper * and tree * parameters.  Make the same
290         change in the top-level overload and update calls to the
291         gimple_resimplify routines.  Update calls to the auto-generated
292         functions and to maybe_push_res_to_seq in the publicly-facing
293         operation-specific gimple_simplify overloads.
294         (gimple_match_op::MAX_NUM_OPS): Define.
295         (gimple_resimplify1): Replace rcode and ops with a single res_op
296         parameter.  Update call to gimple_simplify.
297         (gimple_resimplify2): Likewise.
298         (gimple_resimplify3): Likewise.
299         (mprts_hook): Replace parameters with a gimple_match_op *.
300         (maybe_build_generic_op): Likewise.
301         (build_call_internal): Replace type, nargs and ops with
302         a gimple_match_op *.
303         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
304         with a single gimple_match_op *.  Update calls to mprts_hook,
305         build_call_internal and gimple_simplified_result_is_gimple_val.
306         Factor out code that is common to the tree_code and combined_fn cases.
307         * genmatch.c (expr::gen_transform): Replace tem_code and
308         tem_ops with a gimple_match_op called tem_op.  Update calls
309         to the gimple_resimplify functions and maybe_push_res_to_seq.
310         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
311         res_ops.  Update call to the gimple_resimplify functions.
312         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
313         (decision_tree::gen): Make the functions take a gimple_match_op *
314         called res_op instead of separate res_code and res_ops parameters.
315         Update call accordingly.
316         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
317         and ops with a single res_op parameter.  Update calls to
318         maybe_build_generic_op and maybe_push_res_to_seq.
319         (fold_stmt_1): Update calls to gimple_simplify and
320         replace_stmt_with_simplification.
321         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
322         and gimple_simplified_result_is_gimple_val.
323         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
324         gimple_simplify.
325         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
326         with a gimple_match_op *.
327         (vn_nary_build_or_lookup): Likewise.  Update call to
328         vn_nary_build_or_lookup_1.
329         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
330         gimple_match_op *.  Update calls to the gimple_resimplify routines
331         and to gimple_simplified_result_is_gimple_val.
332         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
333         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
334         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
335         (visit_nary_op): Likewise.
336         (visit_reference_op_load): Likewise.
338 2018-05-23  Luis Machado  <luis.machado@linaro.org>
340         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
341         modifier for printing the step amount.
343 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
345         PR target/78849
346         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
347         types.
349 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
351         * doc/sourcebuild.texi (Endianness): New subsubsection.
353 2018-05-23  Luis Machado  <luis.machado@linaro.org>
355         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
356         <prefetch_dynamic_strides>: New const bool field.
357         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
358         prefetch_dynamic_strides.
359         (exynosm1_prefetch_tune): Likewise.
360         (thunderxt88_prefetch_tune): Likewise.
361         (thunderx_prefetch_tune): Likewise.
362         (thunderx2t99_prefetch_tune): Likewise.
363         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
364         false.
365         (aarch64_override_options_internal): Update to set
366         PARAM_PREFETCH_DYNAMIC_STRIDES.
367         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
368         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
369         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
370         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
371         prefetch-dynamic-strides setting.
373 2018-05-23  Luis Machado  <luis.machado@linaro.org>
375         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
376         <minimum_stride>: New const int field.
377         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
378         minimum_stride field defaulting to -1.
379         (exynosm1_prefetch_tune): Likewise.
380         (thunderxt88_prefetch_tune): Likewise.
381         (thunderx_prefetch_tune): Likewise.
382         (thunderx2t99_prefetch_tune): Likewise.
383         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
384         <default_opt_level>: Set to 3.
385         (aarch64_override_options_internal): Update to set
386         PARAM_PREFETCH_MINIMUM_STRIDE.
387         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
388         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
389         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
390         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
391         stride is constant and is below the minimum stride threshold.
393 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
395         * config/arm/arm-cpus.in (mode26): Delete.
396         (armv4): Delete mode26 reference.
397         * config/arm/arm.c (arm_configure_build_target): Delete use of
398         isa_bit_mode26.
400 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
402         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
403         New insn pattern.
404         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
405         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
406         for non-SSE modes.
407         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
408         (floatunsdidf2): Ditto.
410 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
412         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
413         (fixuns_trunc<mode>si2_avx512f): Ditto.
414         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
415         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
416         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
418 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
420         PR rtl-optimization/79985
421         * df-scan.c (df_insn_refs_collect): Remove special case for
422         global registers and asm statements.
424 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
426         * extend.texi (Global Register Variables): Rewrite the bullet list.
427         Note that the register is available for allocation. Note that access
428         via inline asm must use constraints. Add note about async-signal
429         handlers. Remove paragraph about automagic register selection.
431 2018-05-23  Richard Biener  <rguenther@suse.de>
433         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
434         of fixed offset from memset VN.
436 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
438         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
439         first_interp field.
440         (alloc_cand_and_find_basis): Initialize first_interp field.
441         (slsr_process_mul): Modify first_interp field.
442         (slsr_process_add): Likewise.
443         (slsr_process_cast): Modify first_interp field for each new
444         interpretation.
445         (slsr_process_copy): Likewise.
446         (dump_candidate): Dump first_interp field.
447         (replace_mult_candidate): Process all interpretations, not just
448         subsequent ones.
449         (replace_rhs_if_not_dup): Likewise.
450         (replace_one_candidate): Likewise.
452 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
454         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
455         Add new boolean.
456         (aarch64_needs_frame_chain): New function.
457         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
459 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
461         PR target/84882
462         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
463         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
464         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
465         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
466         as true for strict-align.
467         (aarch64_can_inline_p): Perform checks even when callee has no
468         attributes to check for strict alignment.
469         * doc/extend.texi (AArch64 Function Attributes): Document
470         no-strict-align.
471         * doc/invoke.texi: (AArch64 Options): Likewise.
473 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
475         PR tree-optimization/85853
476         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
477         the handling of the root of the node to...
478         (vect_slp_analyze_node_operations_1): ...this new function,
479         and run the whole thing with the child nodes' def types
480         set according to their SLP node's def type.
482 2018-05-23  Richard Biener  <rguenther@suse.de>
484         PR middle-end/85874
485         * tree-data-ref.c (create_runtime_alias_checks): Defer
486         and ignore overflow warnings.
488 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
490         PR tree-optimization/85822
491         * tree-vrp.c (is_masked_range_test): Fix handling of negative
492         constants.
494 2018-05-23  Richard Biener  <rguenther@suse.de>
496         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
497         memset constants via native_interpret_expr.
499 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
501         PR target/85345
502         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
503         attribute.
504         (cgraph_node::create_alias): Likewise.
505         (cgraph_node::get_availability): Check ifunc_resolver instead
506         of looking up ifunc attribute.
507         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
508         * varasm.c (do_assemble_alias): Likewise.
509         (assemble_alias): Likewise.
510         (default_binds_local_p_3): Likewise.
511         * cgraph.h (cgraph_node): Add ifunc_resolver.
512         (cgraph_node::only_called_directly_or_aliased_p): Return false
513         for IFUNC resolver.
514         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
515         attribute.
516         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
517         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
518         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
519         instead of looking up ifunc attribute.
521 2018-05-22  Luis Machado  <luis.machado@linaro.org>
523         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
525 2018-05-22  Martin Sebor  <msebor@redhat.com>
527         PR middle-end/85359
528         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
529         only when expasion succeeds.
530         (expand_builtin_strcmp): Same.
531         (expand_builtin_strncmp): Same.
533 2018-05-22  Martin Sebor  <msebor@redhat.com>
535         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
537 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
538             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
540         * config/aarch64/aarch64-ldpstp.md: Replace uses of
541         aarch64_mem_pair_operand with memory_operand and delete operand swapping
542         code.
543         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
544         Add check for legitimate_address.
545         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
546         (aarch64_swap_ldrstr_operands): New.
547         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
548         Define prototype.
550 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
551             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
553         * config/aarch64/aarch64.md: New patterns to generate stp
554         and ldp.
555         (store_pair_sw, store_pair_dw): New patterns to generate stp for
556         single words and double words.
557         (load_pair_sw, load_pair_dw): Likewise.
558         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
559         Delete.
560         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
561         Delete.
562         * config/aarch64/aarch64-ldpstp.md: Modify peephole
563         for different mode ldpstp and add peephole for merged zero stores.
564         Likewise for loads.
565         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
566         Add size check.
567         (aarch64_gen_store_pair): Rename calls to match new patterns.
568         (aarch64_gen_load_pair): Rename calls to match new patterns.
569         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
570         (load_pair<DREG:mode><DREG2:mode>): ... This.
571         (store_pair<mode>): Rename to...
572         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
573         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
574         New mode iterators.
575         (V_INT_EQUIV): Handle SImode.
576         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
577         New predicate.
579 2018-05-22  Martin Sebor  <msebor@redhat.com>
581         PR c/85623
582         * calls.c (maybe_warn_nonstring_arg): Use string length to set
583         or ajust the presumed bound on an operation to avoid unnecessary
584         warnings.
586 2018-05-22  Martin Sebor  <msebor@redhat.com>
588         PR tree-optimization/85826
589         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
590         assuming that a DECL necesarily has a constant size.
592 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
594         PR middle-end/85862
595         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
597 2018-05-22  Richard Biener  <rguenther@suse.de>
599         PR tree-optimization/85834
600         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
601         non-constant and non-zero memset arguments.
603 2018-05-22  Martin Liska  <mliska@suse.cz>
605         PR ipa/85607
606         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
608 2018-05-22  Richard Biener  <rguenther@suse.de>
610         PR tree-optimization/85863
611         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
612         comparisons when vectype is specified.
613         (vectorizable_condition): Do not specify vectype for
614         vect_is_simple_cond when SLP vectorizing.
616 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
618         PR target/85657
619         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
620         define __ibm128 as long double.
621         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
622         as a distinct type when IEEE 128-bit support is enabled.
623         (init_float128_ieee): Fix up conversions between IFmode and IEEE
624         128-bit types to use the correct functions.
625         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
626         convert between 128-bit floating point types that have different
627         modes but the same representation, instead of using gen_lowpart to
628         makean alias.
629         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
630         KFmode.
631         (IFKF_reg): New attributes to give the register constraints for
632         IFmode and KFmode.
633         (extend<mode>tf2_internal): New insns to mark an explicit
634         conversion between 128-bit floating point types that have a
635         different mode but share the same representation.
637 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
639         PR tree-optimization/85814
640         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
641         a null return from get_strinfo when unsharing the next
642         strinfo in the chain.
644 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
646         PR gcc/84923
647         * varasm.c (weak_finish): Clean up weak_decls.
649 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
651         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
652         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
653         UNSPEC_UADALP values.
654         * config/aarch64/iterators.md (ABAL): New int iterator.
655         (ABDL2): Likewise.
656         (ADALP): Likewise.
657         (sur): Add mappings for the above.
658         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
659         New define_insn.
660         (aarch64_<sur>abal<mode>_4): Likewise.
661         (aarch64_<sur>adalp<mode>_3): Likewise.
662         (<sur>sadv16qi): New define_expand.
664 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
666         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
667         (*movdf_internal): Ditto.
668         (*rcpsf2_sse): Ditto.
669         (*rsqrtsf2_sse): Ditto.
670         (*sqrt<mode>2_sse): Ditto.
672 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
674         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
675         eor3q<mode>4.
676         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
677         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
678         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
679         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
680         vbcaxq_s64): New.
681         * config/aarch64/arm_neon.h: Likewise.
682         * config/aarch64/iterators.md (VQ_I): New.
684 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
686         * config.gcc: Add arc/t-multilib-linux to tmake_file for
687         arc*-*-linux*.
688         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
689         MULTILIB_DIRNAMES
691 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
693         * config/nds32/constraints.md (S): New constraint.
694         * config/nds32/nds32.md (call_internal): Use constraint S.
695         (call_value_internal): Likewise.
696         (sibcall_internal): Likewise.
697         (sibcall_value_internal): Likewise.
699 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
700             Chung-Ju Wu  <jasonwucj@gmail.com>
702         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
703         into consideration.
705 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
706             Chung-Ju Wu  <jasonwucj@gmail.com>
708         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
709         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
710         (nds32_rtx_costs_impl): Simplify.
711         (nds32_address_cost_impl): Simplify.
712         (nds32_init_rtx_costs): New function.
713         (nds32_rtx_costs_speed_prefer): Likewise.
714         (nds32_rtx_costs_size_prefer): Likewise.
715         (nds32_address_cost_speed_prefer): Likewise.
716         (nds32_address_cost_speed_fwprop): Likewise.
717         (nds32_address_cost_size_prefer): Likewise.
718         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
719         * config/nds32/nds32.c (nds32_option_override): Use
720         nds32_init_rtx_costs function.
722 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
724         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
725         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
726         (TARGET_PIPELINE_N8): Likewise.
727         (TARGET_PIPELINE_N10): Likewise.
728         (TARGET_PIPELINE_N13): Likewise.
729         (TARGET_PIPELINE_GRAYWOLF): Likewise.
731 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
733         * config/nds32/nds32-fpu.md: Update copyright year.
735 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
737         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
739 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
741         * config/nds32/nds32.c
742         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
743         * config/nds32/nds32.opt (minline-asm-r15): New option.
745 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
747         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
748         MASK_HW_ABS.
749         * config/nds32/nds32.md (abssi2): New pattern.
751 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
753         * config/i386/i386.md (rex64namesuffix): New mode attribute.
754         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
755         Merge insn pattern from sse_cvtsi2ss<round_name> and
756         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
757         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
758         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
759         using SWI48 mode iterator.
760         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
761         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
762         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
763         pattern from sse_cvttss2si<round_saeonly_name>
764         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
765         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
766         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
767         using SWI48 mode iterator.
768         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
769         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
770         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
771         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
772         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
773         using SWI48 mode iterator.
774         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
775         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
776         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
777         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
778         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
779         SWI48 mode iterator.
780         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
781         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
782         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
783         pattern from sse_cvttsd2si<round_saeonly_name>
784         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
786 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
788         * config/nds32/nds32-md-auxiliary.c
789         (nds32_valid_smw_lwm_base_p): Refine.
790         (nds32_output_smw_single_word): Refine.
791         (nds32_output_smw_double_word): New.
792         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
794 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
796         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
797         (nds32_output_stack_pop): Refine.
798         (nds32_expand_unaligned_load): Refine.
799         (nds32_expand_unaligned_store): Refine.
801 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
802             Chung-Ju Wu  <jasonwucj@gmail.com>
804         * config/nds32/constants.md: Add TP_REGNUM constant.
805         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
806         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
807         UNSPEC_ADD32.
808         * config/nds32/nds32-doubleword.md: Consider flag_pic.
809         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
810         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
811         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
812         and PIC code generation.
813         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
814         code generation.
815         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
816         optimization.
817         * config/nds32/nds32.md: Support TLS and PIC.
818         * config/nds32/nds32.c: Support TLS and PIC.
819         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
820         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
821         predicate.
823 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
825         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
826         mode with E_ prefix.
828 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
829             Chung-Ju Wu  <jasonwucj@gmail.com>
831         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
832         * config/nds32/nds32-md-auxiliary.c
833         (symbolic_reference_mentioned_p): New.
834         (nds32_legitimize_ict_address): New.
835         (nds32_expand_ict_move): New.
836         (nds32_indirect_call_referenced_p): New.
837         (nds32_symbol_binds_local_p): Delete.
838         (nds32_long_call_p): Modify.
839         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
840         * config/nds32/nds32-protos.h
841         (symbolic_reference_mentioned_p): Declare.
842         (nds32_legitimize_ict_address): Declare.
843         (nds32_expand_ict_move): Declare.
844         (nds32_indirect_call_referenced_p): Declare.
845         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
846         (nds32_relax_group): Use nds32_ict_const_p as condition.
847         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
848         (nds32_asm_file_start): Output ict_model directive in asm code.
849         (nds32_legitimate_address_p): Consider indirect call.
850         (nds32_print_operand): Consider indirect call.
851         (nds32_print_operand_address): Consider indirect call.
852         (nds32_insert_attributes): Handle "indirect_call" attribute.
853         (TARGET_LEGITIMATE_ADDRESS_P): Define.
854         (TARGET_LEGITIMATE_CONSTANT_P): Define.
855         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
856         (TARGET_DELEGITIMIZE_ADDRESS): Define.
857         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
858         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
859         (TARGET_ICT_MODEL_SMALL): Define.
860         (TARGET_ICT_MODEL_LARGE): Define.
861         * config/nds32/nds32.md (movsi): Consider ict model.
862         (call, call_value): Consider ict model.
863         (sibcall, sibcall_value): Consider ict model.
864         * config/nds32/nds32.opt (mict-model): New option.
865         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
866         model.
868 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
869             Monk Chiang  <sh.chiang04@gmail.com>
870             Jim Wilson <jimw@sifive.com>
872         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
873         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
874         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
875         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
876         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
877         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
878         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
879         compute save_libcall_adjustment properly.
880         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
881         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
882         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
883         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
884         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
885         (ABI_SPEC): Handle mabi=ilp32e.
886         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
887         (RVE): Add RVE mask.
888         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
889         <-march>: Add rv32e as an example.
891 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
893         PR c++/82899
894         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
895         (intra_create_variable_infos): Handle C++ constructors.
897 2018-05-18  Martin Liska  <mliska@suse.cz>
899         * passes.def: Remove a redundant pass.
901 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
903         PR bootstrap/85838
904         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
906 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
908         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
909         (ARMv4): Update.
910         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
911         (ARMv6m): Update.
912         (armv2, armv2a, armv3, armv3m): Delete architectures.
913         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
914         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
915         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
916         Delete cpus.
917         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
918         (*mulsidi3adddi): Likewise.
919         (mulsidi3): Likewise.
920         (*mulsidi3_nov6): Likewise.
921         (umulsidi3): Likewise.
922         (umulsidi3_nov6): Likewise.
923         (umaddsidi4): Likewise.
924         (*umulsidi3adddi): Likewise.
925         (smulsi3_highpart): Likewise.
926         (*smulsi3_highpart_nov6): Likewise.
927         (umulsi3_highpart): Likewise.
928         (*umulsi3_highpart_nov6): Likewise.
929         * config/arm/arm.h (arm_arch3m): Delete.
930         * config/arm/arm.c (arm_arch3m): Delete.
931         (arm_option_override_internal): Update armv3-related comment.
932         (arm_configure_build_target): Delete use of isa_bit_mode32.
933         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
934         (arm_rtx_costs_internal): Delete check of arm_arch3m.
935         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
936         (mulsa3): Likewise.
937         (mulusa3): Likewise.
938         * config/arm/arm-protos.h (arm_arch3m): Delete.
939         * config/arm/arm-tables.opt: Regenerate.
940         * config/arm/arm-tune.md: Likewise.
941         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
942         deleted architectures.
944 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
946         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
947         (armv5t, armv5te): New features.
948         (ARMv5, ARMv5e): Delete fgroups.
949         (ARMv5t, ARMv5te): Adjust for above changes.
950         (ARMv6m): Likewise.
951         (armv5, armv5e): Delete arches.
952         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
953         arm_arch5.
954         (*call_reg_arm): Likewise.
955         (*call_value_reg_armv5): Likewise.
956         (*call_value_reg_arm): Likewise.
957         (*call_symbol): Likewise.
958         (*call_value_symbol): Likewise.
959         (*sibcall_insn): Likewise.
960         (*sibcall_value_insn): Likewise.
961         (clzsi2): Likewise.
962         (prefetch): Likewise.
963         (define_split and define_peephole2 dependent on arm_arch5):
964         Likewise.
965         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
966         arm_arch5e.
967         (TARGET_ARM_QBIT): Likewise.
968         (TARGET_DSP_MULTIPLY): Likewise.
969         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
970         (arm_arch5, arm_arch5e): Delete.
971         (arm_arch5t, arm_arch5te): Declare.
972         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
973         (arm_arch5t): Declare.
974         (arm_option_reconfigure_globals): Update for the above.
975         (arm_options_perform_arch_sanity_checks): Update comment, replace
976         use of arm_arch5 with arm_arch5t.
977         (use_return_insn): Likewise.
978         (arm_emit_call_insn): Likewise.
979         (output_return_instruction): Likewise.
980         (arm_final_prescan_insn): Likewise.
981         (arm_coproc_builtin_available): Likewise.
982         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
983         arm_arch5e with arm_arch5t and arm_arch5te.
984         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
985         (arm_arch5t, arm_arch5te): Declare.
986         * config/arm/arm-tables.opt: Regenerate.
987         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
988         * config/arm/t-multilib: Likewise.
989         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
990         instead of arm_arch5.
991         (*call_reg_thumb1): Likewise.
992         (*call_value_reg_thumb1_v5): Likewise.
993         (*call_value_reg_thumb1): Likewise.
994         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
995         unreachable path.
996         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
998 2018-05-18  Martin Liska  <mliska@suse.cz>
1000         PR gcov-profile/84846
1001         * doc/gcov.texi: Document -t option of gcov tool.
1003 2018-05-18  Martin Liska  <mliska@suse.cz>
1005         PR gcov-profile/84846
1006         * gcov.c (print_usage): Add new -t option.
1007         (process_args): Handle the option.
1008         (generate_results): Use stdout as output when requested by
1009         the option.
1011 2018-05-18  Martin Liska  <mliska@suse.cz>
1013         PR gcov-profile/84846
1014         * coverage.c (coverage_init): Write PWD to .gcno file.
1015         * doc/gcov.texi: Document how working directory is printed.
1016         * gcov-dump.c (dump_gcov_file): Print PWD.
1017         * gcov.c (output_intermediate_file): Likewise.
1018         (read_graph_file): Read PWD string.
1019         (output_lines): Print PWD.
1021 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1023         PR middle-end/85817
1024         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1025         for retval and return false if all args to phi are zero.        
1027 2018-05-18  Richard Biener  <rguenther@suse.de>
1029         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1030         method.
1031         (evrp_dom_walker::before_dom_children): Call it.
1033 2018-05-18  Richard Biener  <rguenther@suse.de>
1035         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1036         results when processing array refs with variable index.
1038 2018-05-18  Toon Moene  <toon@moene.org>
1040         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1041         directly after that of -floop-interchange. Indicate that both
1042         options are enabled by default when specifying -O3. 
1044 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1046         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1047         iterator.  Delete separate integer-mode vec_set<mode> expander.
1048         (aarch64_simd_vec_setv2di): Delete.
1049         (vec_setv2di): Delete.
1050         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1051         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1052         the "w, r" alternative.
1054 2018-05-18  Martin Liska  <mliska@suse.cz>
1056         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1057         * tree-pass.h (make_pass_lower_switch_O0): New function.
1058         * tree-switch-conversion.c (node_has_low_bound): Remove.
1059         (node_has_high_bound): Likewise.
1060         (node_is_bounded): Likewise.
1061         (class pass_lower_switch): Make it a template type and create
1062         two instances.
1063         (pass_lower_switch::execute): Add template argument.
1064         (make_pass_lower_switch): New function.
1065         (make_pass_lower_switch_O0): New function.
1066         (do_jump_if_equal): Remove.
1067         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1068         all the hard work to tree optimization passes.
1070 2018-05-18  Martin Liska  <mliska@suse.cz>
1072         * dbgcnt.c (limit_low): Renamed from limit.
1073         (limit_high): New variable.
1074         (dbg_cnt_is_enabled): Check for upper limit.
1075         (dbg_cnt): Adjust dumping.
1076         (dbg_cnt_set_limit_by_index): Add new argument for high
1077         value.
1078         (dbg_cnt_set_limit_by_name): Likewise.
1079         (dbg_cnt_process_single_pair): Parse new format.
1080         (dbg_cnt_process_opt): Use strtok.
1081         (dbg_cnt_list_all_counters): Remove 'value' and add
1082         'limit_high'.
1083         * doc/invoke.texi: Document changes.
1085 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1087         * doc/sourcebuild.texi (scalar_all_fma): Document.
1088         * tree.def (FMA_EXPR): Delete.
1089         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1090         * internal-fn.c (ternary_direct): New macro.
1091         (expand_ternary_optab_fn): Likewise.
1092         (direct_ternary_optab_supported_p): Likewise.
1093         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1094         * builtins.c (fold_builtin_fma): Delete.
1095         (fold_builtin_3): Don't call it.
1096         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1097         * expr.c (expand_expr_real_2): Likewise.
1098         * fold-const.c (operand_equal_p): Likewise.
1099         (fold_ternary_loc): Likewise.
1100         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1101         * gimple.c (DEFTREECODE): Likewise.
1102         * gimplify.c (gimplify_expr): Likewise.
1103         * optabs-tree.c (optab_for_tree_code): Likewise.
1104         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1105         * tree-eh.c (operation_could_trap_p): Likewise.
1106         (stmt_could_throw_1_p): Likewise.
1107         * tree-inline.c (estimate_operator_cost): Likewise.
1108         * tree-pretty-print.c (dump_generic_node): Likewise.
1109         (op_code_prio): Likewise.
1110         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1111         * tree-ssa-operands.c (get_expr_operands): Likewise.
1112         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1113         * fold-const-call.h (fold_fma): Delete.
1114         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1115         CFN_FNMA and CFN_FNMS.
1116         (fold_fma): Delete.
1117         * genmatch.c (combined_fn): New enum.
1118         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1119         (commutative_op): New function.
1120         (commutate): Use it.  Handle more than 2 operands.
1121         (dt_operand::gen_gimple_expr): Use commutative_op.
1122         (parser::parse_expr): Allow :c to be used with non-binary
1123         operators if the commutative operand is known.
1124         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1125         CFN_FMS, CFN_FNMA and CFN_FNMS.
1126         (backprop::process_assign_use): Remove FMA_EXPR handling.
1127         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1128         (gen_hsa_fma): New function.
1129         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1130         IFN_FNMA and IFN_FNMS.
1131         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1132         * gimple-fold.h (follow_all_ssa_edges): Declare.
1133         * gimple-fold.c (follow_all_ssa_edges): New function.
1134         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1135         gimple_build interface and use follow_all_ssa_edges to fold the result.
1136         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1137         instead of checking for optabs directly.
1138         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1139         rather than FMA_EXPRs.
1140         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1141         call to IFN_FMA instead of an FMA_EXPR.
1143 2018-05-17  Jim Wilson  <jimw@sifive.com>
1145         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1146         sign extended promoted subreg, and the range does not have the sign bit
1147         set, then do a sign extend.
1149         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1150         test, check for sign extended subreg and/or constant operands, and
1151         do a sign extend in that case.
1153 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1155         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1156         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1157         Add untyped.
1158         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1159         Change logics_shift_reg to logics_shift_imm.
1160         (thunderx2t99_fp_loadpair_basic): Delete.
1161         (thunderx2t99_fp_storepair_basic): Delete.
1162         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1163         (thunderx2t99_asimd_polynomial): Delete.
1164         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1165         and neon_fp_mul_d_scalar_q.
1166         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1167         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1168         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1169         (thunderx2t99_asimd_lut): Add missing tbl types.
1170         (thunderx2t99_asimd_ext): Delete.
1171         (thunderx2t99_asimd_load1_1_mult): Delete.
1172         (thunderx2t99_asimd_load1_2_mult): Delete.
1173         (thunderx2t99_asimd_load1_ldp): New.
1174         (thunderx2t99_asimd_load1): New.
1175         (thunderx2t99_asimd_load2): Add missing *load2* types.
1176         (thunderx2t99_asimd_load3): New.
1177         (thunderx2t99_asimd_load4): New.
1178         (thunderx2t99_asimd_store1_1_mult): Delete.
1179         (thunderx2t99_asimd_store1_2_mult): Delete.
1180         (thunderx2t99_asimd_store2_mult): Delete.
1181         (thunderx2t99_asimd_store2_onelane): Delete.
1182         (thunderx2t99_asimd_store_stp): New.
1183         (thunderx2t99_asimd_store1): New.
1184         (thunderx2t99_asimd_store2): New.
1185         (thunderx2t99_asimd_store3): New.
1186         (thunderx2t99_asimd_store4): New.
1188 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1190         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1191         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1193 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1194             Segher Boessenkool  <segher@kernel.crashing.org>
1196         PR target/85698
1197         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1198         operand.
1200 2018-05-17  Richard Biener  <rguenther@suse.de>
1202         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1203         for pruning loop and prune defs feeding only already visited PHIs.
1205 2018-05-17  Richard Biener  <rguenther@suse.de>
1207         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1209 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1210             Richard Biener  <rguenther@suse.de>
1212         PR tree-optimization/85793
1213         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1214         for VMAT_ELEMENTWISE.
1216 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1218         * internal-fn.h (lookup_internal_fn): Declare
1219         * internal-fn.c (lookup_internal_fn): New function.
1220         * gimple.c (gimple_build_call_from_tree): Handle calls to
1221         internal functions.
1222         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1223         internal function names.
1224         * tree-pretty-print.c (dump_generic_node): Likewise.
1225         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1227 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1229         * gimple-fold.h (gimple_build): Make the function forms take
1230         combined_fn rather than built_in_function.
1231         (gimple_simplify): Likewise.
1232         * gimple-match-head.c (gimple_simplify): Likewise.
1233         * gimple-fold.c (gimple_build): Likewise.
1234         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1235         rather than gimple_build_call_internal.
1236         (get_initial_defs_for_reduction): Likewise.
1237         (vect_create_epilog_for_reduction): Likewise.
1238         (vectorizable_live_operation): Likewise.
1240 2018-05-17  Martin Liska  <mliska@suse.cz>
1242         * gimple-ssa-sprintf.c (format_directive): Do not use
1243         space in between 'G_' and '('.
1245 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1247         PR target/85323
1248         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1249         even if the mask is not all ones.
1251         PR target/85323
1252         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1253         vector.
1254         (ix86_gimple_fold_builtin): Likewise.
1256         PR target/85323
1257         * config/i386/i386.c: Include tree-vector-builder.h.
1258         (ix86_vector_shift_count): New function.
1259         (ix86_fold_builtin): Fold shift builtins by scalar count.
1260         (ix86_gimple_fold_builtin): Likewise.
1262         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1263         _mm512_setzero): New intrinsics.
1265 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1266             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1268         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1269         code generation for cases where splatting a value is not useful.
1270         * simplify-rtx.c (simplify_ternary_operation): Simplify
1271         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1272         mode to a vec_concat.
1274 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1276         * config.gcc: Support "goldmont-plus".
1277         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1278         "goldmont-plus".
1279         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1280         PROCESSOR_GOLDMONT_PLUS.
1281         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1282         (processor_target_table): Add "goldmont-plus".
1283         (PTA_GOLDMONT_PLUS): Define.
1284         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1285         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1286         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1287         (fold_builtin_cpu): Add "goldmont-plus".
1288         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1289         (ix86_option_override_internal): Add "goldmont-plus".
1290         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1291         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1292         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1293         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1295 2018-05-17  Richard Biener  <rguenther@suse.de>
1297         PR tree-optimization/85757
1298         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1299         remove defs that only feed that PHI from further processing.
1301 2018-05-16  Jim Wilson  <jimw@sifive.com>
1303         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1304         asterisk to name.
1305         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1307 2018-05-16  Mark Wielaard  <mark@klomp.org>
1309         * dwarf2out.c (count_index_strings): New function.
1310         (output_indirect_strings): Call count_index_strings and generate
1311         header for dwarf_version >= 5.
1313 2018-05-16  Mark Wielaard  <mark@klomp.org>
1315         * dwarf2out.c (dwarf_FORM): New function.
1316         (set_indirect_string): Use dwarf_FORM.
1317         (reset_indirect_string): Likewise.
1318         (size_of_die): Likewise.
1319         (value_format): Likewise.
1320         (output_die): Likewise.
1321         (add_skeleton_AT_string): Likewise.
1322         (output_macinfo_op): Likewise.
1323         (index_string): Likewise.
1324         (output_index_string_offset): Likewise.
1325         (output_index_string): Likewise.
1326         (count_index_strings): Likewise.
1328 2018-05-16  Carl Love  <cel@us.ibm.com>
1330         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1331         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1333 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1335         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1336         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1338 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1340         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1341         (fnma<mode>4): Likewise.
1342         (fms<mode>4): Likewise.
1343         (fnms<mode>4): Likewise.
1344         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1345         (aarch64_fnma<mode>4): Likewise.
1346         (aarch64_fms<mode>4): Likewise.
1347         (aarch64_fnms<mode>4): Likewise.
1348         (aarch64_fnmadd<mode>4): Likewise.
1350 2018-05-16  Jason Merrill  <jason@redhat.com>
1352         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1354 2018-05-16  Richard Biener  <rguenther@suse.de>
1356         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1357         (dump_stmt_cost): Declare.
1358         (add_stmt_cost): Dump cost we add.
1359         (add_stmt_costs): New function.
1360         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1361         No longer exported.
1362         (vect_analyze_stmt): Adjust prototype.
1363         (vectorizable_condition): Likewise.
1364         (vectorizable_live_operation): Likewise.
1365         (vectorizable_reduction): Likewise.
1366         (vectorizable_induction): Likewise.
1367         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1368         cost vector to pass to vectorizable_ and record afterwards.
1369         (vect_model_reduction_cost): Take cost vector argument and adjust.
1370         (vect_model_induction_cost): Likewise.
1371         (vectorizable_reduction): Likewise.
1372         (vectorizable_induction): Likewise.
1373         (vectorizable_live_operation): Likewise.
1374         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1375         SLP_TREE_NUMBER_OF_VEC_STMTS.
1376         (vect_analyze_slp_cost_1): Remove.
1377         (vect_analyze_slp_cost): Likewise.
1378         (vect_slp_analyze_node_operations): Take visited args and
1379         a target cost vector.  Avoid processing already visited stmt sets.
1380         (vect_slp_analyze_operations): Use a local cost vector to gather
1381         costs and register those of non-discarded instances.
1382         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1383         (vect_schedule_slp_instance): Remove copying of
1384         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1385         zero.
1386         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1387         adding cost.  Record cost entry location.
1388         (vect_prologue_cost_for_slp_op): Function to compute cost of
1389         a constant or invariant generated for SLP vect in the prologue,
1390         split out from vect_analyze_slp_cost_1.
1391         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1392         (vect_model_promotion_demotion_cost): Likewise.
1393         (vect_model_store_cost): Likewise, make static.
1394         (vect_model_load_cost): Likewise.
1395         (vectorizable_bswap): Add cost vector arg and adjust.
1396         (vectorizable_call): Likewise.
1397         (vectorizable_simd_clone_call): Likewise.
1398         (vectorizable_conversion): Likewise.
1399         (vectorizable_assignment): Likewise.
1400         (vectorizable_shift): Likewise.
1401         (vectorizable_operation): Likewise.
1402         (vectorizable_store): Likewise.
1403         (vectorizable_load): Likewise.
1404         (vectorizable_condition): Likewise.
1405         (vectorizable_comparison): Likewise.
1406         (can_vectorize_live_stmts): Likewise.
1407         (vect_analyze_stmt): Likewise.
1408         (vect_transform_stmt): Adjust calls to vectorizable_*.
1409         * tree-vectorizer.c: Include gimple-pretty-print.h.
1410         (dump_stmt_cost): New function.
1412 2018-05-16  Richard Biener  <rguenther@suse.de>
1414         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1415         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1416         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1417         (check_name): New callback.
1418         (dse_classify_store): Track cycles via a visited bitmap of PHI
1419         defs and simplify handling of in-loop and across loop dead stores
1420         and properly fail for loop-variant refs.  Handle byte-tracking with
1421         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1422         limiting the walk.
1424 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1426         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1427         (vect_get_mask_type_for_stmt): Likewise.
1428         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1429         split out from...
1430         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1431         to determine the statement's vector type and the vector type that
1432         should be used for calculating nunits.  Deal with cases in which
1433         the type has to be deferred.
1434         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1435         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1436         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1437         (vect_determine_vf_for_stmt): New functions, split out from...
1438         (vect_determine_vectorization_factor): ...here.
1439         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1440         (vect_get_mask_type_for_stmt): New functions, split out from
1441         vect_determine_vectorization_factor.
1443 2018-05-16  Richard Biener  <rguenther@suse.de>
1445         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1446         verify the [VEC_]COND_EXPR embedded comparison.
1448 2018-05-15  Martin Sebor  <msebor@redhat.com>
1450         PR tree-optimization/85753
1451         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1452         RECORD_TYPE in addition to ARRAY_TYPE.
1454 2018-05-15  Martin Sebor  <msebor@redhat.com>
1456         PR middle-end/85643
1457         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1459 2018-05-15  Richard Biener  <rguenther@suse.de>
1461         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1462         add by_clobber_p one.  Change algorithm to collect all defs
1463         representing uses we need to walk and try reducing them to
1464         a single one before failing.
1465         (dse_dom_walker::dse_optimize_stmt): Adjust.
1467 2018-05-13  Mark Wielaard  <mark@klomp.org>
1469         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1470         (size_of_loc_descr): Likewise.
1471         (output_loc_operands): Likewise.
1472         (output_loc_operands_raw): Likewise.
1473         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1474         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1475         (hash_loc_operands): Likewise.
1476         (compare_loc_operands): Likewise.
1478 2018-05-14  Mark Wielaard  <mark@klomp.org>
1480         * dwarf2out.c (count_index_addrs): New function.
1481         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1483 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1485         PR tree-optimization/83648
1486         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1487         return value as malloc candidate.
1489 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1491         PR ipa/85734
1492         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1493         as true in call to suggest_attribute.
1495 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1497         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1498         -mreadonly-in-sdata.
1500 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1502         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1503         New pattern.
1504         (aarch64_crypto_aesd_fused): Likewise.
1506 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1508         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1509         (movsi_aarch64): Likewise.
1510         (load_pairsi): Likewise.
1511         (load_pairdi): Likewise.
1512         (store_pairsi): Likewise.
1513         (store_pairdi): Likewise.
1514         (load_pairsf): Likewise.
1515         (load_pairdf): Likewise.
1516         (store_pairsf): Likewise.
1517         (store_pairdf): Likewise.
1518         (zero_extend): Likewise.
1519         (trunc): Swap alternatives.
1520         (fcvt_target): Add '?' to prefer w over r.
1522 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1524         PR target/85756
1525         * config/i386/i386.md: Disallow non-commutative arithmetics in
1526         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1527         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1528         in the peephole2 before it.
1530 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1532         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1533         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1534         (ix86_handle_option): Handle -mcldemote.
1535         * config.gcc: New header.
1536         * config/i386/cldemoteintrin.h: New file.
1537         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1538         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1539         -mcldemote.
1540         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1541         OPTION_MASK_ISA_CLDEMOTE.
1542         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1543         (ix86_valid_target_attribute_inner_p): Ditto.
1544         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1545         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1546         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1547         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1548         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1549         (cldemote): New.
1550         * config/i386/i386.opt: Add -mcldemote.
1551         * config/i386/x86intrin.h: New header.
1552         * doc/invoke.texi: Add -mcldemote.
1554 2018-05-14  Richard Biener  <rguenther@suse.de>
1556         * doc/match-and-simplify.texi: Adjust :s documentation.
1558 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1560         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1561         intended memcpy size.
1562         (REORDER_45): Likewise.
1564 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1566         * sort.cc: New file.
1567         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1568         * vec.c (qsort_chk): Use gcc_qsort.
1569         * Makefile.in (OBJS-libcommon): Add sort.o.
1570         (build/sort.o): New target.  Use it...
1571         (BUILD_RTL): ... here, and...
1572         (build/gencfn-macros): ... here, and...
1573         (build/genmatch): ... here.
1575 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1576             Chung-Ju Wu  <jasonwucj@gmail.com>
1578         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1579         * config/nds32/nds32-graywolf.md: New file.
1580         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1581         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1582         pipeline.
1583         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1584         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1585         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1586         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1587         * config/nds32/pipelines.md: Include n15 settings.
1589 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1590             Chung-Ju Wu  <jasonwucj@gmail.com>
1592         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1593         * config/nds32/nds32-n13.md: New file.
1594         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1595         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1596         pipeline.
1597         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1598         * config/nds32/nds32.md (pipeline_model): Add n13.
1599         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1600         * config/nds32/pipelines.md: Include n13 settings.
1602 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1603             Chung-Ju Wu  <jasonwucj@gmail.com>
1605         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1606         * config/nds32/nds32-n10.md: New file.
1607         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1608         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1609         pipeline.
1610         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1611         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1612         * config/nds32/nds32.md (pipeline_model): Add n10.
1613         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1614         * config/nds32/pipelines.md: Include n10 settings.
1616 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1617             Kito Cheng  <kito.cheng@gmail.com>
1618             Chung-Ju Wu  <jasonwucj@gmail.com>
1620         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1621         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1622         Add enum values for DSP extension instructions.
1623         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1624         New constraints.
1625         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1626         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1627         New code iterators.
1628         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1629         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1630         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1631         * config/nds32/nds32-intrinsic.md: Likewise.
1632         * config/nds32/nds32_intrinsic.h: Likewise.
1633         * config/nds32/nds32-md-auxiliary.c: Likewise.
1634         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1635         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1636         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1637         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1638         * config/nds32/nds32-protos.h: New declarations for DSP extension.
1639         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1640         TYPE_DMAC in switch statement.
1641         * config/nds32/nds32.c: New checking and implementation for DSP
1642         extension instructions.
1643         * config/nds32/nds32.h: Likewise.
1644         * config/nds32/nds32.md: Likewise.
1645         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
1646         * config/nds32/predicates.md: Implement new predicates for DSP
1647         extension.
1649 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1651         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
1652         Reformat alternatives and attributes so it is easier to identify
1653         which constraints/attributes go with which instruction.
1654         (mov<mode>_hardfloat32, FMOVE64): Likewise.
1655         (mov<mode>_softfloat32, FMOVE64): Likewise.
1656         (mov<mode>_hardfloat64, FMOVE64): Likewise.
1657         (mov<mode>_softfloat64, FMOVE64): Likewise.
1659 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1661         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1662         subsection.
1663         (Basic PowerPC Built-in Functions): The new name of the
1664         subsection previously known as "PowerPC Built-in Functions".
1665         (Basic PowerPC Built-in Functions Available on all Configurations):
1666         New subsubsection.
1667         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
1668         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
1669         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
1670         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
1672 2018-05-11  Martin Jambor  <mjambor@suse.cz>
1674         PR ipa/85655
1675         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
1676         single const.
1678 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1680         PR target/85733
1681         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
1683 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
1685         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
1686         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
1687         (ix86_handle_option): Handle -mwaitpkg.
1688         * config.gcc: New header.
1689         * config/i386/cpuid.h (bit_WAITPKG): New bit.
1690         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1691         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1692         function type.
1693         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1694         OPTION_MASK_ISA_WAITPKG.
1695         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1696         (ix86_option_override_internal): Add PTA_WAITPKG.
1697         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1698         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1699         IX86_BUILTIN_TPAUSE.
1700         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1701         __builtin_ia32_umwait and __builtin_ia32_tpause.
1702         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1703         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1704         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1705         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1706         UNSPECV_TPAUSE): New.
1707         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1708         * config/i386/i386.opt: Add -mwaitpkg.
1709         * config/i386/waitpkgintrin.h: New file.
1710         * config/i386/x86intrin.h: New header.
1711         * doc/invoke.texi: Add -mwaitpkg.
1713 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1715         PR target/85606
1716         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1717         equivalent.
1718         (cortex-m0): Use armv6s-m isa.
1719         (cortex-m0plus): Likewise.
1720         (cortex-m1): Likewise.
1721         (cortex-m0.small-multiply): Likewise.
1722         (cortex-m0plus.small-multiply): Likewise.
1723         (cortex-m1.small-multiply): Likewise.
1725 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1726             Jakub Jelinek  <jakub@redhat.com>
1728         PR tree-optimization/85692
1729         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1730         source permute as well.
1732 2018-05-11  Martin Liska  <mliska@suse.cz>
1734         PR sanitizer/85556
1735         * doc/extend.texi: Document LLVM style format for no_sanitize
1736         attribute.
1738 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1740         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1741         mode_supports_vsx_dform_quad to mode_supports_dq_form.
1742         (mode_supports_vsx_dform_quad): Likewise.
1743         (mode_supports_vmx_dform): Move these functions to be next to the
1744         other mode_supports functions.
1745         (mode_supports_dq_form): Likewise.
1746         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1747         mode_supports_dq_form.
1748         (reg_offset_addressing_ok_p): Likewise.
1749         (offsettable_ok_by_alignment): Likewise.
1750         (rs6000_legitimate_offset_address_p): Likewise.
1751         (legitimate_lo_sum_address_p): Likewise.
1752         (rs6000_legitimize_address): Likewise.
1753         (rs6000_legitimize_reload_address): Likewise.
1754         (rs6000_secondary_reload_inner): Likewise.
1755         (rs6000_preferred_reload_class): Likewise.
1756         (rs6000_output_move_128bit): Likewise.
1758 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1760         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1761         Generate SImode target register for null target.
1762         <case IX86_BUILTIN_XGETBV>: Ditto.
1763         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1764         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1766 2018-05-10  Carl Love  <cel@us.ibm.com>
1768         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1769         dcbtt and dcbtstt if operands[2] is 0.
1771 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1773         PR target/85693
1774         * config/i386/sse.md (usadv64qi): New expander.
1776 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
1778         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1779         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1780         -maltivec=be support.
1781         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1782         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1783         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1784         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1785         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1786         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1787         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1788         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1789         altivec_vsumsws): Adjust.
1790         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1791         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1792         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1793         support.
1794         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1795         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1796         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1797         (altivec_lve<VI_char>x): Delete expand.
1798         (*altivec_lve<VI_char>x_internal): Rename to...
1799         (altivec_lve<VI_char>x): ... this.
1800         (altivec_lvxl_<mode>): Delete expand.
1801         (*altivec_lvxl_<mode>_internal): Rename to ...
1802         (altivec_lvxl_<mode>): ... this.
1803         (altivec_stvxl_<mode>): Delete expand.
1804         (*altivec_stvxl_<mode>_internal): Rename to ...
1805         (altivec_stvxl_<mode>): ... this.
1806         (altivec_stve<VI_char>x): Delete expand.
1807         (*altivec_stve<VI_char>x_internal): Rename to ...
1808         (altivec_stve<VI_char>x): ... this.
1809         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1810         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1811         reduc_plus_scal_<mode>): Adjust.
1812         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1813         comment.
1814         (rs6000_cpu_cpp_builtins): Adjust.
1815         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1816         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1817         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1818         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1819         -maltivec=be support.
1820         (rs6000_split_vec_extract_var): Adjust.
1821         (rs6000_split_v4si_init): Adjust.
1822         (swap_selector_for_mode): Delete.
1823         (altivec_expand_lvx_be, altivec_expand_stvx_be,
1824         altivec_expand_stvex_be): Delete.
1825         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1826         -maltivec=be support.
1827         (rs6000_gimple_fold_builtin): Ditto.
1828         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1829         Adjust.
1830         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1831         (TARGET_DIRECT_MOVE_64BIT): Adjust.
1832         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1833         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1834         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1835         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1836         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1837         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1838         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1839         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1840         anonymous split): Adjust.
1841         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1842         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1844 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
1846         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1847         when --with-gxx-include-dir is also specified.
1848         * configure: Regenerate.
1850 2018-05-09  Jim Wilson  <jimw@sifive.com>
1852         PR target/84797
1853         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1854         * config/riscv/t-withmultilib: New.
1855         * config/riscv/withmultilib.h: New.
1856         * doc/install.texi: Document RISC-V --with-multilib-list support.
1858 2018-05-09  Richard Biener  <rguenther@suse.de>
1860         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1861         vector.
1862         (vect_bb_vectorization_profitable_p): Adjust.  Compute
1863         actual scalar cost using the cost vector and the add_stmt_cost
1864         machinery.
1866 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1868         PR rtl-optimization/85645
1869         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1870         in the REG_CFA_REGISTER note for LR, don't leave it empty.
1872 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1874         PR rtl-optimization/85645
1875         * shrink-wrap.c (spread_components): Return a boolean saying if
1876         anything was changed.
1877         (try_shrink_wrapping_separate): Iterate spread_components until
1878         nothing changes anymore.
1880 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1882         PR rtl-optimization/85645
1883         * regrename.c (build_def_use): Also kill the chains that include the
1884         destination of a REG_CFA_REGISTER note.
1886 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1888         PR rtl-optimization/85645
1889         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
1890         insn that has a REG_CFA_REGISTER note.
1892 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
1894         * cfgexpand.c (expand_clobber): New function.
1895         (expand_gimple_stmt_1): Use it.
1896         * tree-vect-stmts.c (vect_clobber_variable): New function,
1897         split out from...
1898         (vectorizable_simd_clone_call): ...here.
1899         (vectorizable_store): Emit a clobber either side of an
1900         IFN_STORE_LANES sequence.
1901         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
1903 2018-05-09  Tom de Vries  <tom@codesourcery.com>
1905         PR target/85626
1906         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
1907         (define_insn "trap_if_false"): Add exit after trap.
1909 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
1911         PR rtl-optimization/85638
1912         * bb-reorder.c: Include common/common-target.h.
1913         (create_forwarder_block): New function extracted from...
1914         (fix_up_crossing_landing_pad): ...here.  Rename into...
1915         (dw2_fix_up_crossing_landing_pad): ...this.
1916         (sjlj_fix_up_crossing_landing_pad): New function.
1917         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
1918         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
1919         from both partitions and exit the loop after one iteration.
1921 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1923         Revert:
1924         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1925         subsection.
1926         (Basic PowerPC Built-in Functions): The new name of the
1927         subsection previously known as "PowerPC Built-in Functions".
1928         (Basic PowerPC Built-in Functions Available on all Configurations):
1929         New subsubsection.
1930         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1931         subsubsection.
1932         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1933         subsubsection.
1934         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1935         subsubsection.
1936         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1937         subsubsection.
1939 2018-05-08  Jim Wilson  <jimw@sifive.com>
1941         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
1942         (LD_EMUL_SUFFIX): New.
1943         (LINK_SPEC): Use it.
1945 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1947         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1948         subsection.
1949         (Basic PowerPC Built-in Functions): The new name of the
1950         subsection previously known as "PowerPC Built-in Functions".
1951         (Basic PowerPC Built-in Functions Available on all Configurations):
1952         New subsubsection.
1953         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1954         subsubsection.
1955         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1956         subsubsection.
1957         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1958         subsubsection.
1959         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1960         subsubsection.
1962 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
1964         PR target/85683
1965         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
1966         after cmpelim optimization.
1968 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
1970         * config.gcc: Support "goldmont".
1971         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
1972         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1973         PROCESSOR_GOLDMONT.
1974         * config/i386/i386.c (m_GOLDMONT): Define.
1975         (processor_target_table): Add "goldmont".
1976         (PTA_GOLDMONT): Define.
1977         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
1978         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
1979         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
1980         (fold_builtin_cpu): Add "goldmont".
1981         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
1982         (ix86_option_override_internal): Add "goldmont".
1983         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
1984         (processor_type): Add PROCESSOR_GOLDMONT.
1985         * config/i386/i386.md: Add CPU "glm".
1986         * config/i386/glm.md: New file.
1987         * config/i386/x86-tune.def: Add m_GOLDMONT.
1988         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
1990 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
1992         PR target/85572
1993         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
1994         E_V4DImode.
1995         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
1996         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
1997         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
1999         PR target/85317
2000         * config/i386/i386.c (ix86_fold_builtin): Handle
2001         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2003         PR target/85480
2004         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2005         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2007 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2009         PR target/85658
2010         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2011         (check_arch): Likewise.
2012         (check_fpu): Return the result rather than printing it.
2013         (end arch): Fix operator precedence.
2014         (end cpu): Likewise.
2015         (END): Print the result from check_fpu.
2017 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2018             Alan Hayward  <alan.hayward@arm.com>
2019             David Sherwood  <david.sherwood@arm.com>
2021         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2022         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2023         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2024         (*fcmuo<mode>_and): New patterns.
2026 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2028         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2029         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2030         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2031         (cmp_op, sve_imm_con): New code attributes.
2032         (SVE_COND_INT_CMP, imm_con): Delete.
2033         (cmp_op): Remove above unspecs from int attribute.
2034         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2035         to...
2036         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2037         comparison-specific unspecs.
2038         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2039         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2040         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2041         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2042         (*vec_fcm<cmp_op><mode>): Rename to...
2043         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2044         (*vec_fcmuo<mode>): Rename to...
2045         (*fcmuo<mode>): ...this and adjust likewise.
2046         (*pred_fcm<cmp_op><mode>): New pattern.
2047         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2048         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2049         functions.
2050         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2051         and UNORDERED.
2052         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2053         (aarch64_emit_sve_predicated_cond): New function.
2054         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2055         (aarch64_emit_unspec_cond_or): Replace with...
2056         (aarch64_emit_sve_or_conds): ...this new function.  Use
2057         aarch64_emit_sve_ptrue_op for the individual comparisons and
2058         aarch64_emit_binop to OR them together.
2059         (aarch64_emit_inverted_unspec_cond): Replace with...
2060         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2061         aarch64_emit_sve_ptrue_op for the comparison and
2062         aarch64_emit_unop to invert the result.
2063         (aarch64_expand_sve_vec_cmp_float): Update after the above
2064         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2066 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2068         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2069         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2070         (Backwards Compatibility): Likewise.
2072 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2074         PR bootstrap/85681
2075         Revert:
2076         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2078         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2079         <prefetch_dynamic_strides>: New const bool field.
2080         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2081         prefetch_dynamic_strides.
2082         (exynosm1_prefetch_tune): Likewise.
2083         (thunderxt88_prefetch_tune): Likewise.
2084         (thunderx_prefetch_tune): Likewise.
2085         (thunderx2t99_prefetch_tune): Likewise.
2086         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2087         (aarch64_override_options_internal): Update to set
2088         PARAM_PREFETCH_DYNAMIC_STRIDES.
2089         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2090         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2091         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2092         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2093         prefetch-dynamic-strides setting.
2095         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2097         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2098         <minimum_stride>: New const int field.
2099         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2100         minimum_stride field.
2101         (exynosm1_prefetch_tune): Likewise.
2102         (thunderxt88_prefetch_tune): Likewise.
2103         (thunderx_prefetch_tune): Likewise.
2104         (thunderx2t99_prefetch_tune): Likewise.
2105         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2106         (aarch64_override_options_internal): Update to set
2107         PARAM_PREFETCH_MINIMUM_STRIDE.
2108         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2109         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2110         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2111         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2112         stride is constant and is below the minimum stride threshold.
2114 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2116         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2117         to 512.
2119 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2121         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2122         <prefetch_dynamic_strides>: New const bool field.
2123         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2124         prefetch_dynamic_strides.
2125         (exynosm1_prefetch_tune): Likewise.
2126         (thunderxt88_prefetch_tune): Likewise.
2127         (thunderx_prefetch_tune): Likewise.
2128         (thunderx2t99_prefetch_tune): Likewise.
2129         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2130         (aarch64_override_options_internal): Update to set
2131         PARAM_PREFETCH_DYNAMIC_STRIDES.
2132         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2133         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2134         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2135         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2136         prefetch-dynamic-strides setting.
2138 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2140         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2141         <minimum_stride>: New const int field.
2142         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2143         minimum_stride field.
2144         (exynosm1_prefetch_tune): Likewise.
2145         (thunderxt88_prefetch_tune): Likewise.
2146         (thunderx_prefetch_tune): Likewise.
2147         (thunderx2t99_prefetch_tune): Likewise.
2148         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2149         (aarch64_override_options_internal): Update to set
2150         PARAM_PREFETCH_MINIMUM_STRIDE.
2151         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2152         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2153         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2154         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2155         stride is constant and is below the minimum stride threshold.
2157 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2159         PR c++/85659
2160         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2161         the type is addressable.  Don't force op into register if it has
2162         BLKmode.
2164 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2166         PR other/77609
2167         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2168         any section for which we don't know a specific type it should have,
2169         regardless of name.  Previously this was done only for the exact
2170         names ".init_array", ".fini_array", and ".preinit_array".
2171         (default_elf_asm_named_section): Add comment about
2172         relationship with default_section_type_flags and SECTION_NOTYPE.
2173         (get_section): Don't consider it a type conflict if one side has
2174         SECTION_NOTYPE and the other doesn't, as long as neither has the
2175         SECTION_BSS et al used in the default_section_type_flags logic.
2177 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2179         PR target/85653
2180         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2181         (workaround_barsyncs): New function.
2182         (nvptx_reorg): Use workaround_barsyncs.
2183         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2184         (define_expand "nvptx_membar_cta"): New define_expand.
2185         (define_insn "*nvptx_membar_cta"): New insn.
2187 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2189         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2190         To improve optimization opportunities.
2191         * builtin-types.def: The new needed builtin types for the above.
2193 2018-05-04  Richard Biener  <rguenther@suse.de>
2195         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2196         * gimple-ssa-store-merging.c
2197         (imm_store_chain_info::output_merged_store): Remove redundant create,
2198         release split_store vector contents on failure.
2199         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2200         scalar stmt vector on cache hit.
2202 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2204         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2205         Xilinx FP support.
2206         * config.gcc (powerpc-xilinx-eabi*): Remove.
2207         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2208         support.
2209         (fusion_addis_mem_combo_load): Ditto.
2210         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2211         FP support.
2212         (rs6000_cpu_cpp_builtins): Ditto.
2213         * config/rs6000/rs6000-linux.c
2214         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2215         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2216         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2217         support.
2218         (rs6000_setup_reg_addr_masks): Ditto.
2219         (rs6000_init_hard_regno_mode_ok): Ditto.
2220         (rs6000_option_override_internal): Ditto.
2221         (legitimate_lo_sum_address_p): Ditto.
2222         (rs6000_legitimize_address): Ditto.
2223         (rs6000_legitimize_reload_address): Ditto.
2224         (rs6000_legitimate_address_p): Ditto.
2225         (abi_v4_pass_in_fpr): Ditto.
2226         (setup_incoming_varargs): Ditto.
2227         (rs6000_gimplify_va_arg): Ditto.
2228         (rs6000_split_multireg_move): Ditto.
2229         (rs6000_savres_strategy): Ditto.
2230         (rs6000_emit_prologue_components): Ditto.
2231         (rs6000_emit_epilogue_components): Ditto.
2232         (rs6000_emit_prologue): Ditto.
2233         (rs6000_emit_epilogue): Ditto.
2234         (rs6000_elf_file_end): Ditto.
2235         (rs6000_function_value): Ditto.
2236         (rs6000_libcall_value): Ditto.
2237         * config/rs6000/rs6000.h: Ditto.
2238         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2239         (TARGET_MINMAX): ... this.  New.
2240         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2241         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2242         (*movsi_internal1_single): Delete.
2243         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2244         mfpu=, mxilinx-fpu): Delete.
2245         * config/rs6000/singlefp.h: Delete.
2246         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2247         * config/rs6000/t-rs6000: Ditto.
2248         * config/rs6000/t-xilinx: Delete.
2249         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2250         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2251         (VStype_simple): Delete.
2252         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2253         * config/rs6000/xfpu.h: Delete.
2254         * config/rs6000/xfpu.md: Delete.
2255         * config/rs6000/xilinx.h: Delete.
2256         * config/rs6000/xilinx.opt: Delete.
2257         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2258         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2260 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2262         PR libgomp/85639
2263         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2264         if ignore == 0.
2266 2018-05-04  Richard Biener  <rguenther@suse.de>
2268         PR middle-end/85627
2269         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2270         (expand_complex_div_wide): Likewise.
2271         (expand_complex_operations_1): Likewise.
2272         (expand_complex_libcall): Preserve EH info of the original stmt.
2273         (tree_lower_complex): Handle removed blocks.
2274         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2275         on complex multiplication and division libcall builtins.
2277 2018-05-04  Richard Biener  <rguenther@suse.de>
2279         PR middle-end/85574
2280         * fold-const.c (negate_expr_p): Restrict negation of operand
2281         zero of a division to when we know that can happen without
2282         overflow.
2283         (fold_negate_expr_1): Likewise.
2285 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2287         PR libstdc++/85466
2288         * real.h (real_nextafter): Declare.
2289         * real.c (real_nextafter): New function.
2290         * fold-const-call.c (fold_const_nextafter): New function.
2291         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2292         CASE_CFN_NEXTTOWARD.
2293         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2294         even when arg1_mode is different from arg0_mode.
2296 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2298         * doc/extend.texi (Deprecated Features): Remove
2299         -ffriend-injection.
2300         (Backwards Compatibility): Likewise.
2301         * doc/invoke.texi (C++ Language Options): Likewise.
2302         (C++ Dialect Options): Likewise.
2304 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2306         PR target/85530
2307         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2308         _mm512_mask_mullox_epi64): New intrinsics.
2310 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2312         PR testsuite/85106
2313         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2314         dump files): Add offload-tree.
2316 2018-05-03  Richard Biener  <rguenther@suse.de>
2318         PR tree-optimization/85615
2319         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2320         to loops not nested in BBs loop father to avoid creating multi-entry
2321         loops.
2323 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2325         PR tree-optimization/70291
2326         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2327         arguments.  Change return type to tree.  Emit libcall as a new
2328         statement rather than replacing existing one when inplace_p is true.
2329         (expand_complex_multiplication_components): New function.
2330         (expand_complex_multiplication): Expand floating-point complex
2331         multiplication using the above.
2332         (expand_complex_division): Rename inner_type parameter to type.
2333         Update expand_complex_libcall call-site.
2334         (expand_complex_operations_1): Update expand_complex_multiplication
2335         and expand_complex_division call-sites.
2337 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2339         PR target/85582
2340         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2341         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2342         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2343         the highest significant bit of the shift count mask is clear.  In
2344         check whether and[sq]i3 is needed verify that all significant bits
2345         of the shift count other than the highest are set.
2347 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2349         PR libgomp/82428
2350         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2351         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2352         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2353         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2354         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2355         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2356         __builtin_goacc_parlevel_size.
2358 2018-05-02  Richard Biener  <rguenther@suse.de>
2360         PR tree-optimization/85597
2361         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2362         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2363         directly.
2365 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2367         PR testsuite/85106
2368         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2369         dump files): Add ltrans-tree.
2371 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2373         PR testsuite/85106
2374         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2375         dump files): Add wpa-ipa.
2377 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2379         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2380         powerpc*-*-linux*paired* target.
2381         * config/rs6000/750cl.h: Delete.
2382         * config/rs6000/paired.h: Delete.
2383         * config/rs6000/paired.md: Delete.
2384         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2385         float support.
2386         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2387         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2388         comment.  Remove paired float support.
2389         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2390         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2391         VECTOR_PAIRED.
2392         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2393         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2394         declarations.
2395         * config/rs6000/rs6000.c: Remove paired float support.
2396         (paired_expand_vector_init, paired_expand_vector_move,
2397         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2398         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2399         paired_expand_builtin, paired_expand_predicate_builtin,
2400         paired_init_builtins): Delete.
2401         * config/rs6000/rs6000.h: Remove paired float support.
2402         * config/rs6000/rs6000.md: Remove paired float support.
2403         (move_from_CR_ov_bit): Delete.
2404         * config/rs6000/rs6000.opt (mpaired): Delete.
2405         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2406         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2408 2018-05-02  Richard Biener  <rguenther@suse.de>
2410         PR middle-end/85567
2411         * gimplify.c (gimplify_save_expr): When in SSA form allow
2412         SAVE_EXPRs to compute to SSA vars.
2414 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2416         PR target/85582
2417         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2418         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2419         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2420         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2422 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2424         PR tree-optimization/85586
2425         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2426         exit early for statements in the same group if the accesses are
2427         not strided.
2429 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2431         PR lto/85451
2432         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2433         error message.
2435 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2437         PR tree-optimization/85143
2438         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2440 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2442         PR lto/85451
2443         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2444         not found" error message.
2446 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2448         PR other/83786
2449         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2450         * vec.c (test_ordered_remove_if): New function.
2451         (vec_c_tests): Call test_ordered_remove_if.
2452         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2453         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2454         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2455         VEC_ORDERED_REMOVE_IF.
2457 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2459         PR tree-optimization/82665
2460         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2461         pointer subtraction where arguments come from a memchr call.
2463 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2465         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2466         --push-state --as-needed and --pop-state instead of --as-needed and
2467         --no-as-needed if ld supports it.
2468         * configure: Regenerated.
2470         PR web/85578
2471         * doc/install.texi2html: Replace _002d with - and _002a with * in
2472         generated html files using sed.
2474 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2476         PR c++/85523
2477         * gcc-rich-location.c (blank_line_before_p): New function.
2478         (use_new_line): New function.
2479         (gcc_rich_location::add_fixit_insert_formatted): New function.
2480         * gcc-rich-location.h
2481         (gcc_rich_location::add_fixit_insert_formatted): New function.
2483 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2485         * selftest.c (assert_streq): Rename "expected" and "actual" to
2486         "val1" and "val2".  Extend NULL-handling to cover both inputs
2487         symmetrically, while still requiring both to be non-NULL for a pass.
2488         * selftest.h (assert_streq): Rename "expected" and "actual" to
2489         "val1" and "val2".
2490         (ASSERT_EQ): Likewise.
2491         (ASSERT_EQ_AT): Likewise.
2492         (ASSERT_KNOWN_EQ): Likewise.
2493         (ASSERT_KNOWN_EQ_AT): Likewise.
2494         (ASSERT_NE): Likewise.
2495         (ASSERT_MAYBE_NE): Likewise.
2496         (ASSERT_MAYBE_NE_AT): Likewise.
2497         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2498         the assertion to pass.
2499         (ASSERT_STREQ_AT): Likewise.
2501 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2503         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2504         interaction with -pie.
2506 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2508         * selftest.h: Fix alphabetization of per-source-file selftest
2509         declarations.
2511 2018-04-30  Jason Merrill  <jason@redhat.com>
2513         PR c++/61982 - dead stores to destroyed objects.
2514         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2515         of clobber.
2517 2018-04-30  Jason Merrill  <jason@redhat.com>
2519         * tree.c (build_clobber): New.
2520         * tree.h: Declare it.
2521         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2523 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2525         * diagnostic-show-locus.c (layout::layout): Update for
2526         location_get_source_line returning a char_span.
2527         (struct char_span): Move to input.h.
2528         (struct correction): Update for fields in char_span becoming
2529         private.
2530         (struct source_line): Update for location_get_source_line
2531         returning a char_span.
2532         (layout::print_line): Likewise.
2533         * edit-context.c (edited_file::print_content): Likewise.
2534         (edited_file::print_diff_hunk): Likewise.
2535         (edited_file::print_run_of_changed_lines): Likewise.
2536         (edited_file::get_num_lines): Likewise.
2537         (edited_line::edited_line): Likewise.
2538         * final.c (asm_show_source): Likewise.
2539         * input.c (location_get_source_line): Convert return type
2540         from const char * to char_span, losing the final "line_len"
2541         param.
2542         (dump_location_info): Update for the above.
2543         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2544         when handling the literal within the line.
2545         (test_reading_source_line): Update for location_get_source_line
2546         returning a char_span.
2547         * input.h (class char_span): Move here from
2548         diagnostic-show-locus.c, converting from a struct to a class.
2549         Make data members private.
2550         (char_span::operator bool): New.
2551         (char_span::length): New.
2552         (char_span::get_buffer): New.
2553         (char_span::operator[]): New.
2554         (char_span::subspan): Make const.
2555         (char_span::xstrdup): New.
2556         (location_get_source_line): Convert return type from const char *
2557         to char_span, losing the final "line_size" param.
2559 2018-04-30  Jan Hubicka  <jh@suse.cz>
2561         * lto-wrapper.c (ltrans_priorities): New static var.
2562         (cmp_priority): New.
2563         (run_gcc): Read priorities and if doing parallel build order
2564         the Makefile by them.
2566 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2568         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2570 2018-04-30  Richard Biener  <rguenther@suse.de>
2572         * tree-cfg.c (verify_address): Remove base argument, add
2573         flag whether to check TREE_ADDRESSABLE and do that.
2574         (verify_expr): Remove.
2575         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2576         (verify_gimple_assign_single): Likewise.
2577         (verify_gimple_switch): Likewise.
2578         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2579         piece from verify_expr.
2580         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2582 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2584         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2586 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2588         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2589         (small_data_pattern): Likewise.
2590         (arc_rewrite_small_data): Likewise.
2591         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2592         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2593         (get_symbol_alignment): New function.
2594         (legitimate_small_data_address_p): Likewise.
2595         (legitimate_scaled_address): Update, call
2596         legitimate_small_data_address_p.
2597         (output_sdata): New static variable.
2598         (arc_print_operand): Update how we handle small data operands.
2599         (arc_print_operand_address): Likewise.
2600         (arc_legitimate_address_p): Update, use
2601         legitimate_small_data_address_p.
2602         (arc_rewrite_small_data_p): Remove.
2603         (arc_rewrite_small_data_1): Likewise.
2604         (arc_rewrite_small_data): Likewise.
2605         (small_data_pattern): Likewise.
2606         (compact_sda_memory_operand): Update to use
2607         legitimate_small_data_address_p and get_symbol_alignment.
2608         (prepare_move_operands): Don't rewite sdata pattern.
2609         (prepare_extend_operands): Remove.
2610         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2611         pattern.
2612         (zero_extendqisi2): Likewise.
2613         (zero_extendhisi2): Likewise.
2614         (extendqihi2): Likewise.
2615         (extendqisi2): Likewise.
2616         (extendhisi2): Likewise.
2617         (addsi3): Likewise.
2618         (subsi3): Likewise.
2619         (andsi3): Likewise.
2620         * config/arc/constraints.md (Usd): Change it to memory constraint.
2622 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2624         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2625         as source of std instructions.
2626         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2627         allow 6-bit constants as source for store instructions.
2628         (movdi_insn): Update instruction pattern to allow 6-bit constants
2629         as source for store instructions.
2631 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2633         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2635 2018-04-30  Nathan Sidwell  <nathan@acm.org>
2636             Sandra Loosemore <sandra@codesourcery.com>
2638         * dumpfile.c (dump_open): Allow '-' for stdout.
2639         * doc/invoke.texi (Developer Options): Document dump filename
2640         determination early.  Document stdin/stdout selection.
2642 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
2644         Microblaze Target: PIC data text relative
2646         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
2647         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
2648         Add declaration.
2649         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
2650         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
2651         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
2652         New addressing mode for data-text relative position indepenedent code.
2653         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
2654         'ADDRESS_SYMBOLIC_TXT_REL'.
2655         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
2656         (microblaze_legitimate_pic_operand): Exclude function calls from
2657         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
2658         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
2659         addresses cases.
2660         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2661         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2662         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
2663         for 'address + offset'.
2664         (microblaze_expand_prologue): Add new function prologue call for
2665         'r20' assignation.
2666         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
2667         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
2668         table in case of TARGET_PIC_DATA_TEXT_REL.
2669         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
2670         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
2671         Add new macros 'UNSPEC_TEXT',
2672         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
2673         + exclude function calls from 'UNSPEC_PLT' in case of data text
2674         relative mode.
2675         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2676         new target hook for generating address diff vector tables in case of
2677         flag_pic.
2678         * doc/tm.texi : Regenerate.
2679         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
2680         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
2681         of addr diff vector generation.
2682         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2683         target hook definition.
2684         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
2685         Add default function for generate_pic_addr_diff_vec -> flag_pic.
2686         * doc/invoke.texi (Add new pic option): Add new microblaze pic
2687         option for data text relative.
2689 2018-04-30  Richard Biener  <rguenther@suse.de>
2691         * tree-chrec.h (evolution_function_is_constant_p): Remove
2692         redundant check.
2693         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2695 2018-04-30  Richard Biener  <rguenther@suse.de>
2697         PR bootstrap/85571
2698         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2700 2018-04-30  Richard Biener  <rguenther@suse.de>
2702         PR tree-optimization/28364
2703         PR tree-optimization/85275
2704         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2705         copying first exit test.
2707 2018-04-28  Mark Wielaard  <mark@klomp.org>
2709         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2710         dwarf_version >= 5.
2711         (dwarf_AT): Handle DW_AT_addr_base.
2712         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2714 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
2716         PR target/84431
2717         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2718         (*ashl<dwi>3_doubleword_mask_1): Ditto.
2719         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2720         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2722 2018-04-28  Richard Biener  <rguenther@suse.de>
2724         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2725         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2726         to reflect use.  Only add interesting stmts.
2728 2018-04-27  Martin Jambor  <mjambor@suse.cz>
2730         PR ipa/85549
2731         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2732         the jump function allows for passing through aggregate values.
2734 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
2736         * input.h (in_system_header_at): Convert from macro to inline
2737         function.
2738         (from_macro_expansion_at): Likewise.
2739         (from_macro_definition_at): Likewise.
2741 2018-04-27  Jeff Law  <law@redhat.com>
2743         * config.gcc: Mark tile* targets as deprecated/obsolete.
2745 2018-04-27  Richard Biener  <rguenther@suse.de>
2747         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2748         fix for ILP32.
2750 2018-04-27  Richard Biener  <rguenther@suse.de>
2752         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2754 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
2756         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2757         with Yd constraint. Set "preferred_for_speed" attribute from
2758         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2759         with Yd constraint.
2760         (*movdi_internal): Ditto.
2761         (movti_interunit splitters): Remove
2762         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2763         (movdi_interunit splitters): Ditto.
2764         * config/i386/constraints.md (Ye): Remove.
2765         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2767 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2769         PR target/85512
2770         * config/aarch64/constraints.md (Usg): Limit to 31.
2771         (Usj): Limit to 63.
2773 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
2775         PR tree-optimization/85529
2776         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2777         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2778         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2779         zero extension or masking of the MSB bit.
2780         (optimize_range_tests): Add FIRST_BB argument, pass it through
2781         to optimize_range_tests_var_bound.
2782         (maybe_optimize_range_tests, reassociate_bb): Adjust
2783         optimize_range_tests callers.
2785 2018-04-26  Richard Biener  <rguenther@suse.de>
2786             Jakub Jelinek  <jakub@redhat.com>
2788         * cgraph.h (symbol_table): Just declare debug method here.
2789         * symtab.c (symbol_table::debug): Define.
2791 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
2793         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2795 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
2797         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2798         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2799         (*movdi_internal): Substitute Yi and Yj constraint with x
2800         and Ym and Yn constraint with y constraint.  Update "isa"
2801         attribute and set "preferred_for_speed" attribute from
2802         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2803         (*movsi_internal): Ditto.
2804         (*movdf_internal): Ditto.
2805         (*movsf_internal): Ditto.
2806         (*zero_extendsidi2): Ditto.
2807         * config/i386/sse.md (vec_set<mode>_0): Ditto.
2808         (sse2_loadld): Ditto.
2809         (*vec_extract<ssevecmodelower>_0): Ditto.
2810         (*vec_extractv4si_0_zext_sse4): Ditto.
2811         (vec_concatv2di): Ditto.
2812         (*vec_dup<mode>): Ditto.
2813         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2814         * config/i386/constraints.md (Yi): Remove.
2815         (Yj): Remove.
2816         (Ym): Remove.
2817         (Yn): Remove.
2819 2018-04-26  Nathan Sidwell  <nathan@acm.org>
2821         * dumpfile.c (dump_open): New.
2822         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2823         (dump_finish): Detect stdio/stderr by value not name.
2825 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
2827         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2829 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2831         PR target/84952
2832         * config/nvptx/nvptx.c (verify_neutering_jumps)
2833         (verify_neutering_labels): New function
2834         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2836 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2838         PR target/84025
2839         * config/nvptx/nvptx.c (needs_neutering_p): New function.
2840         (nvptx_single): Use needs_neutering_p to skip over insns that do not
2841         need neutering.
2843 2018-04-26  Richard Biener <rguenther@suse.de>
2844             Tom de Vries  <tom@codesourcery.com>
2846         PR lto/85422
2847         * lto-streamer-out.c (output_function): Fixup loops if required to match
2848         discovery done in the reader.
2850 2018-04-26  Richard Biener  <rguenther@suse.de>
2852         PR tree-optimization/85116
2853         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2854         have a loop exit from the single latch predecessor.  Remove
2855         case of header with just condition.
2856         (ch_base::copy_headers): Exclude infinite loops from any
2857         processing.
2858         (pass_ch::execute): Record exits.
2860 2018-04-26  Richard Biener  <rguenther@suse.de>
2862         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2863         prologue cost vector and pass it to vect_get_load_cost.
2864         (vect_get_peeling_costs_all_drs): Likewise.
2865         (vect_peeling_hash_get_lowest_cost): Likewise.
2866         (vect_enhance_data_refs_alignment): Likewise.
2868 2018-04-26  Richard Biener  <rguenther@suse.de>
2870         PR middle-end/85450
2871         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2872         checking of integer<->pointer conversions.
2873         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2874         sign-/zero-extending pointer types.
2875         (expand_omp_for_static_chunk): Likewise.
2877 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
2878             Jean Lee  <xiaoyur347@gmail.com>
2880         * config/mips/mips.c (mips_asan_shadow_offset): New function.
2881         (TARGET_ASAN_SHADOW_OFFSET): Define.
2882         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
2883         true for -fsanitize=address.
2885 2018-04-25  Mark Wielaard  <mark@klomp.org>
2887         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
2888         shorter ones.
2890 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2892         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
2893         than "alu", remove explicit "memory" and "imm_disp" attributes.
2894         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
2896         PR middle-end/85414
2897         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
2898         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
2899         gen_lowpart_no_emit.
2901 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
2903         PR target/85473
2904         * config/i386/i386.c (ix86_expand_builtin): Change memory
2905         operand to XI, extend p0 to Pmode.
2906         * config/i386/i386.md: Change unspec volatile and operand
2907         1 mode to XI, change operand 0 mode to P.
2909 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2911         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
2912         GET_MODE_MASK before any checking.
2913         (nds32_can_use_bset_p): Likewise.
2914         (nds32_can_use_btgl_p): Likewise.
2916 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2918         * config/nds32/nds32-doubleword.md: New define_split pattern for
2919         illegal register number.
2921 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2923         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
2925 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2927         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
2929 2018-04-25  Richard Biener  <rguenther@suse.de>
2931         * lto-streamer.h (LTO_major_version): Bump to 8.
2933 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2935         * BASE-VER: Set to 9.0.0.
2937 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
2939         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
2940         in __abskf2 and __powikf2.
2942 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2944         PR target/85512
2945         * config/aarch64/constraints.md (Usg, Usj): New constraints.
2946         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
2947         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
2948         Use the above on operand 2.  Reindent.
2949         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
2951 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
2953         PR target/85485
2954         * common/config/i386/i386-common.c (ix86_handle_option): Don't
2955         handle OPT_mcet.
2956         * config/i386/i386.opt (mcet): Removed.
2957         * doc/install.texi: Remove -mcet documentation.
2958         * doc/invoke.texi: Likewise.
2960 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
2962         PR target/85485
2963         * doc/install.texi: Remove -mcet from bootstrap-cet.
2965 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2967         PR target/85511
2968         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
2969         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
2970         if TARGET_64BIT.
2972         PR target/85503
2973         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
2974         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
2975         containing a CONST_VECTOR.
2977 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
2979         * doc/install.texi: Update newlib dependency for nvptx.
2981 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2983         PR target/85508
2984         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
2985         instead of INTVAL when shifting x left.
2987 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
2989         PR tree-optimization/85478
2990         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
2991         vect_grouped_store_supported for single element vectors.
2993 2018-04-24  Richard Biener  <rguenther@suse.de>
2995         PR target/85491
2996         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
2997         load cost increase to the case of non-constant step.
2999 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3001         PR target/84828
3002         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3003         destination if any_malformed_asm.
3005 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3007         PR middle-end/85496
3008         * expr.c (store_field): In the bitfield case, if the value comes from
3009         a function call and is returned in registers by means of a PARALLEL,
3010         do not change the mode of the temporary unless BLKmode and VOIDmode.
3012 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3014         PR rtl-optimization/85423
3015         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3016         dependencies to debug insns when the previous insn is non-debug.
3018 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3020         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3021         enums into a single definition.
3022         (fls): Fix predicates and printing.
3023         (seti): Likewise.
3025 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3027         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3028         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3029         and short u6 immediate.
3030         (check_if_valid_sleep_operand): Remove.
3031         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3033 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3035         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3036         flag_always_save_lp condition.
3037         * config/nds32/nds32.opt (malways-save-lp): New option.
3039 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3041         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3042         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3043         * config/nds32/nds32.h
3044         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3045         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3047 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3049         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3050         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3052 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3053             Chung-Ju Wu  <jasonwucj@gmail.com>
3055         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3056         Declare.
3057         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3058         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3060 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3062         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3064 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3066         * config/nds32/nds32-protos.h (nds32_data_alignment,
3067         nds32_local_alignment): Declare.
3068         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3069         nds32_local_alignment): New functions.
3070         (TARGET_CONSTANT_ALIGNMENT): Define.
3071         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3073 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3075         * config/nds32/nds32.c
3076         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3077         (TARGET_MODES_TIEABLE_P): Likewise.
3079 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3081         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3082         level Ofast and Og.
3084 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3085             Chung-Ju Wu  <jasonwucj@gmail.com>
3087         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3088         for unaligned access.
3089         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3090         unaligned access.
3091         * config/nds32/nds32-intrinsic.md: Likewise.
3092         * config/nds32/nds32_intrinsic.h: Likewise.
3093         * config/nds32/nds32.h (nds32_builtins): Likewise.
3094         * config/nds32/nds32.opt (munaligned-access): New option.
3095         * config/nds32/nds32.c (nds32_asm_file_start): Display
3096         flag_unaligned_access status.
3098 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3100         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3101         -mno-relax is present.
3102         * config/riscv/linux.h (LINK_SPEC): Ditto.
3104 2018-04-20  Martin Sebor  <msebor@redhat.com>
3106         PR c/85365
3107         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3108         for null pointers.
3109         (gimple_fold_builtin_stxcpy_chk): Same.
3110         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3112 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3114         PR target/85456
3115         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3116         __powikf2 when long double is IEEE 128-bit.
3118 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3120         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3121         step to make sure stack always aligned.
3123 2018-04-20  Carl Love  <cel@us.ibm.com>
3125         PR target/83402
3126         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3127         size check for arg0.
3129 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3130             Tom de Vries  <tom@codesourcery.com>
3132         PR target/85445
3133         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3134         Emit insns for calls too.
3135         (nvptx_find_par): Always look for worker-level predecessor insn.
3136         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3137         calls.
3138         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3139         (nvptx_process_pars): Propagate frames for calls.
3141 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3143         PR target/85469
3144         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3145         Removed.
3146         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3147         (ix86_handle_option): Don't handle OPT_mibt.
3148         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3149         __SHSTK__.
3150         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3151         has_ibt and ibt.
3152         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3153         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3154         (ix86_target_macros): Define __CET__ with flag_cf_protection
3155         for -fcf-protection.
3156         * config/i386/i386.c (isa2_opts): Remove -mibt.
3157         * config/i386/i386.h (TARGET_IBT): Removed.
3158         (TARGET_IBT_P): Likewise.
3159         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3160         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3161         * config/i386/i386.opt (mcet): Update help message.
3162         (mshstk): Likewise.
3163         (mibt): Removed.
3164         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3165         -mcet as an alias for -mshstk.
3167 2018-04-20  Richard Biener <rguenther@suse.de>
3169         PR middle-end/85475
3170         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3171         complexity by forcing a single use of the multiply operand.
3173 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3175         ipa/85449
3176         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3177         recursion dependency to only apply to non-clones.
3179 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3181         ipa/85447
3182         * ipa-cp.c (create_specialized_node): Check that clones of
3183         self-recursive edges exist during IPA-CP.
3185 2018-04-19  Toon Moene  <toon@moene.org>
3187         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3188         by -O3. 
3190 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3192         PR tree-optimization/85467
3193         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3194         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3195         VECTOR_CST element to type.
3197 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3199         PR target/85397
3200         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3201         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3202         (builtin_longjmp): Likewise.
3203         (save_stack_nonlocal): New pattern.
3204         (restore_stack_nonlocal): Likewise.
3206 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3208         PR target/85404
3209         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3210         Replace ASM_OUTPUT_LABEL with fprintf.
3212 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3214         PR target/85417
3215         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3216         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3217         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3218         define __IBT__ and __SHSTK__ for -fcf-protection.
3219         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3220         TARGET_IBT.
3221         (ix86_trampoline_init): Likewise.
3222         (x86_output_mi_thunk): Likewise.
3223         (ix86_notrack_prefixed_insn_p): Likewise.
3224         (ix86_option_override_internal): Don't disallow -fcf-protection.
3225         * config/i386/i386.md (rdssp<mode>): Also enable for
3226         -fcf-protection.
3227         (incssp<mode>): Likewise.
3228         (nop_endbr): Likewise.
3229         * config/i386/i386.opt (mcet): Change help message to built-in
3230         functions only.
3231         (mibt): Likewise.
3232         (mshstk): Likewise.
3233         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3234         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3235         enable CET built-in functions.
3237 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3239         * common/config/i386/i386-common.c 
3240         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3241         OPTION_MASK_ISA_MOVDIRI_UNSET,
3242         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3243         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3244         * config.gcc (movdirintrin.h): New header.
3245         * config/i386/cpuid.h (bit_MOVDIRI,
3246         bit_MOVDIR64B): New bits.
3247         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3248         and -mmvodir64b.
3249         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3250         (VOID, PVOID, PCVOID)): New function types.
3251         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3252         __builtin_ia32_directstoreu_u64,
3253          __builtin_ia32_movdir64b): New builtins.
3254         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3255         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3256         and -mmovdiri.
3257         (ix86_valid_target_attribute_inner_p): Ditto.
3258         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3259         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3260         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3261         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3262         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3263         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3264         (movdiri<mode>, movdir64b_<mode>): New.
3265         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3266         * config/i386/immintrin.h: Include movdirintrin.h.
3267         * config/i386/movdirintrin.h: New file.
3268         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3270 2018-04-19  Richard Biener  <rguenther@suse.de>
3272         PR middle-end/85455
3273         * cfg.c (clear_bb_flags): When loop state says we have
3274         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3276 2018-04-19  Richard Biener  <rguenther@suse.de>
3278         PR tree-optimization/84737
3279         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3280         copying restrict info.
3281         (vect_setup_realignment): Use it.
3282         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3283         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3284         the first DR to all generated stores.
3285         (vectorizable_load): Likewise for loads.
3287 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3289         PR tree-optimization/85446
3290         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3291         the integral and pointer types to have the same precision.
3293         * doc/install.texi: Document --disable-cet being the default and
3294         --enable-cet=auto.
3296 2018-04-18  Martin Liska  <mliska@suse.cz>
3298         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3299         style.
3301 2018-04-18  Martin Liska  <mliska@suse.cz>
3303         Revert
3304         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3306         PR ipa/83983
3307         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3308         arguments if they are comparable.
3310 2018-04-18  Martin Liska  <mliska@suse.cz>
3312         Revert
3313         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3315         PR lto/84805
3316         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3317         incomplete types.
3319 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3321         PR target/85388
3322         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3323         ENDBR after calling __morestack.
3325 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3327         PR jit/85384
3328         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3329         by using gcc_base_ver to generate a gcc_driver_version, and use
3330         it when generating GCC_DRIVER_NAME.
3331         * configure: Regenerate.
3333 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3335         PR target/81084
3336         * config.gcc: Obsolete powerpc*-*-*spe*.
3338 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3340         PR debug/84637
3341         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3342         (stabstr_D): Change type of unum from unsigned int to
3343         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3344         type.
3346 2018-04-17  Jim Wilson  <jimw@sifive.com>
3348         PR 84856
3349         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3350         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3351         Set arg_pointer_offset after using pretend_args_size.
3353 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3355         PR rtl-optimization/85431
3356         * dse.c (record_store): Ignore zero width stores.
3358         PR sanitizer/85230
3359         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3360         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3361         __builtin_stack_restore rather than after it.
3362         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3363         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3364         argument instead of virtual_dynamic_stack_rtx.
3366 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3368         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3369         New prototype.
3370         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3371         Add note to error message to explain internal mapping of overloaded
3372         built-in function name to non-overloaded built-in function name.
3373         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3374         function.
3376 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3378         PR target/85424
3379         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3380         where the inputs overlap with the output.
3382 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3384         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3385         (=v, v) alternative and explicit "memory" attribute.
3386         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3387         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3388         attributes.
3389         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3390         "sselog1" type instead of "sselog".
3391         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3392         "sselog".  Remove explicit "memory" attribute.
3393         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3394         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3395         attributes.
3396         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3397         "sselog1" type instead of "sselog".  Remove explicit "memory"
3398         attribute.
3399         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3400         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3401         attribute.
3402         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3403         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3404         attributes.
3405         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3406         "sselog1" type instead of "sselog".  Remove explicit "memory"
3407         attribute.
3408         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3409         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3410         attribute.
3412         PR target/85430
3413         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3415         PR middle-end/85414
3416         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3417         on a SUBREG.
3419 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3421         PR ipa/85421
3422         * ipa-cp.c (create_specialized_node): Call
3423         expand_all_artificial_thunks if necessary.
3425 2018-04-17  Martin Liska  <mliska@suse.cz>
3427         PR lto/85405
3428         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3429         in message, remote space in between '_G' and '('.
3431 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3433         PR target/85281
3434         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3435         avx512f_vmcmp<mode>3<round_saeonly_name>,
3436         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3437         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3438         avx512f_rndscale<mode><round_saeonly_name>,
3439         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3440         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3441         Use %<iptr>2 instead of %2 for -masm=intel.
3442         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3443         avx512f_vcvttss2usi<round_saeonly_name>,
3444         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3445         -masm=intel.
3446         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3447         avx512f_vcvttsd2usi<round_saeonly_name>,
3448         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3449         Use %q1 instead of %1 for -masm=intel.
3450         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3451         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3452         of %3 for -masm=intel.
3453         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3454         -masm=intel.
3455         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3456         -masm=intel.
3457         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3458         -masm=intel.
3459         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3460         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3461         %g1.
3462         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3463         -masm=intel.
3464         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3465         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3466         %g1 and one with %0 and %1.
3467         (avx512er_vmrcp28<mode><round_saeonly_name>,
3468         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3469         %1 for -masm=intel.
3470         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3471         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3472         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3473         of %0 and %{%4%} for -masm=intel.
3474         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3475         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3476         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3477         order of %0 and %{%5%}%{z%} for -masm=intel.
3479 2018-04-17  Jan Hubicka  <jh@suse.cz>
3481         PR lto/85405
3482         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3484 2018-04-17  Martin Liska  <mliska@suse.cz>
3486         PR ipa/85329
3487         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3488         for target_clone error message.  Make default implementation
3489         clone to be a local declaration.
3490         (separate_attrs): Add new argument and check for an empty
3491         string.
3492         (expand_target_clones): Handle it.
3493         (ipa_target_clone): Make redirection just for target_clones
3494         functions.
3496 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3497             Tom de Vries  <tom@codesourcery.com>
3499         PR middle-end/84955
3500         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3501         tiled basic blocks without omp continue statements.
3503 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3505         PR target/83660
3506         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3507         vec_extract expression as having side effects to make sure it gets
3508         a cleanup point.
3510 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3512         PR target/85403
3513         * config/i386/i386.c (get_builtin_code_for_version): Check
3514         error_mark_node.
3516 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3518         PR target/84331
3519         * gcc/config.gcc: Support "skylake".
3520         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3521         PROCESSOR_SKYLAKE.
3522         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3523         (processor_target_table): Add "skylake".
3524         (ix86_option_override_internal): Add "skylake".
3525         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3526         PROCESSOR_CANNONLAKE.
3527         (get_builtin_code_for_version): Fix priority for
3528         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3529         PROCESSOR_SKYLAKE-AVX512.
3530         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3531         (processor_type): Add PROCESSOR_SKYLAKE.
3533 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3534             Jason Merrill  <jason@redhat.com>
3536         PR c++/85112
3537         * convert.c (convert_to_integer_1): Use direct recursion for
3538         enumeral types and types with a precision less than the number
3539         of bits in their mode.
3541 2018-04-16  Julia Koval  <julia.koval@intel.com>
3543         PR target/84413
3544         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3545         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3547 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3549         PR target/85293
3550         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3551         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3552         and -mno-direct-move.
3554 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3556         PR target/83402
3557         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3558         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3559         Ensure negative shifts result in {0}.
3561 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3563         PR rtl-optimization/79916
3564         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3565         regs (if any) to define how to gnerate SD moves when LRA is in
3566         progress.
3568 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3570         PR rtl-optimization/85393
3571         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3572         * except.c (expand_dw2_landing_pad_for_region): Make static.
3573         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3574         a label and unconditional jump to old_bb, rather than
3575         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3576         basic block.
3578         PR rtl-optimization/85376
3579         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3580         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3581         instead of a specific value.
3583 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3584             Bin Cheng  <bin.cheng@arm.com>
3586         PR tree-optimization/82965
3587         PR tree-optimization/83991
3588         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3589         by_profile_only parameter.
3590         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3591         information if the loop was predicted to iterate too many times.
3592         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3594 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3596         PR lto/71991
3597         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3598         always inline.
3600 2018-04-13  Martin Liska  <mliska@suse.cz>
3601             Jakub Jelinek  <jakub@redhat.com>
3603         PR middle-end/81657
3604         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3605         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3606         * builtins.c (expand_builtin_memory_copy_args): Use
3607         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3608         handle dest_addr == pc_rtx.
3610 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3612         PR target/85291
3613         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3614         asked to not generate direct moves.
3615         (fix_trunc<mode>si2_stfiwx): Similar.
3616         (fix_trunc<mode>si2_internal): Similar.
3618 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3620         PR debug/83157
3621         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3622         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3623         lookup if dest in some wider mode is known to be const0_rtx and
3624         if so, record permanent equivalence for it to be ZERO_EXTEND of
3625         the narrower mode destination.
3627 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3629         * lto-streamer-out.c (output_function): Revert 259346.
3630         * omp-expand.c (expand_oacc_for): Likewise.
3632 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
3634         PR rtl-optimization/85354
3635         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3636         * sel-sched.c (sel_global_init): ... here.
3638 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
3640         PR target/85238
3641         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3642         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3643         mode for PE-COFF targets.
3644         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
3645         (i386_pe_asm_lto_end): Likewise.
3646         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
3647         (TARGET_ASM_LTO_END): Likewise.
3648         * config/i386/winnt.c (saved_debug_info_level): New static variable.
3649         (i386_pe_asm_lto_start): New function.
3650         (i386_pe_asm_lto_end): Likewise.
3652 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3653             Richard Biener  <rguenther@suse.de>
3655         PR middle-end/84955
3656         * lto-streamer-out.c (output_function): Fix CFG loop state before
3657         streaming out.
3658         * omp-expand.c (expand_oacc_for): Handle calls to internal
3659         functions like regular functions.
3661 2018-04-12  Richard Biener  <rguenther@suse.de>
3663         PR lto/85371
3664         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
3665         for the early LTO debug to properly generate references to it
3666         during DIE emission.  Do not re-use that for the skeleton for
3667         split-dwarf.
3668         (dwarf2out_early_finish): Likewise.
3670 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3672         PR target/85328
3673         * config/i386/sse.md
3674         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
3675         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
3676         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
3677         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
3678         and output is a reg, avoid creating invalid lowpart subreg, but
3679         instead split into a 512-bit move.  Don't split if not AVX512VL,
3680         input is xmm16+ reg and output is a mem.
3681         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
3682         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
3683         xmm16+ reg and output is a mem.
3685 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3687         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
3688         also for flag_dwarf2_cfi_asm.
3690 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3692         PR rtl-optimization/85342
3693         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3694         a bool scalar var inside of the loop instead.  Don't try to update
3695         recog_data.operand after failed apply_change_group.
3697 2018-04-12  Tom de Vries  <tom@codesourcery.com>
3699         PR target/85296
3700         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3701         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
3702         array with flexible array member as array without given dimension.
3703         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3704         argument for undefined param to true.
3706 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
3708         PR target/85321
3709         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3710         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3711         from PowerPC section.
3712         * config/rs6000/sysv4.opt (mcall-): Improve help text.
3713         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3714         help text that is too long.
3715         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3716         help text that is too long.
3717         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3718         help text that is too long.
3720 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
3722         * config/alpha/alpha.md (stack_probe_internal): Rename
3723         from "probe_stack".  Update all callers.
3725 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3727         PR rtl-optimization/84566
3728         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3729         sched_macro_fuse_insns.
3731 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3733         PR target/84301
3734         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3735         (compute_block_dependences): ... from here.
3737 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3739         PR tree-optimization/85331
3740         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3741         from int to HOST_WIDE_INT.
3743 2018-04-11  Martin Jambor  <mjambor@suse.cz>
3745         PR ipa/84149
3746         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3747         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3748         not the same as the source val.
3749         (cgraph_edge_brings_value_p): New parameter.
3750         (gather_edges_for_value): Pass destination value to
3751         cgraph_edge_brings_value_p.
3752         (perhaps_add_new_callers): Likewise.
3753         (get_info_about_necessary_edges): Likewise and exclude values brought
3754         only by self-recursive edges.
3755         (create_specialized_node): Redirect only clones of self-calling edges.
3756         (+self_recursive_pass_through_p): New function.
3757         (find_more_scalar_values_for_callers_subset): Use it.
3758         (find_aggregate_values_for_callers_subset): Likewise.
3759         (known_aggs_to_agg_replacement_list): Removed.
3760         (decide_whether_version_node): Re-calculate known constants for all
3761         remaining context clones.
3763 2018-04-11  Richard Biener  <rguenther@suse.de>
3765         PR lto/85339
3766         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3767         from early DWARF output.
3768         (dwarf2out_early_finish): Output line info unconditionally into
3769         early DWARF and add reference to it.
3771 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3773         PR target/85281
3774         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3775         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3776         other than V2DFmode using iptr mode attribute.
3777         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3779 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3781         PR rtl-optimization/84659
3782         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3784 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3786         PR debug/85302
3787         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3788         SIZEP is NULL.
3789         (output_loc_list): Pass address of a dummy size variable even in the
3790         locview handling loop.
3791         (index_location_lists): Add comment on why skip_loc_list_entry can't
3792         call size_of_locs.
3794 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3796         PR target/85261
3797         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3798         into register.
3800 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
3802         PR target/85321
3803         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3804         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3805         and -mstring-compare-inline-limit.
3807 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3809         PR target/85287
3810         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3811         for stack clash protection in a register whenever we need it to be in
3812         a register.
3814 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3816         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3817         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3819 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3821         PR target/85321
3822         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3823         the help text.
3824         (mlong-double-): Ditto.
3825         * config/rs6000/sysv4.opt (msdata=): Ditto.
3826         (mtls-size=): Ditto.
3828 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3830         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3831         erroneous entries for
3832         "vector int vec_ldl (int, long int *)", and
3833         "vector unsigned int vec_ldl (int, unsigned long int *)".
3834         Add comments and entries for
3835         "vector bool char vec_ldl (int, bool char *)",
3836         "vector bool short vec_ldl (int, bool short *)",
3837         "vector bool int vec_ldl (int, bool int *)",
3838         "vector bool long long vec_ldl (int, bool long long *)",
3839         "vector pixel vec_ldl (int, pixel *)",
3840         "vector long long vec_ldl (int, long long *)",
3841         "vector unsigned long long vec_ldl (int, unsigned long long *)".
3842         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3843         type tree bool_long_long_type_node and correct definition of
3844         bool_V2DI_type_node to make reference to this new type tree.
3845         (rs6000_mangle_type): Replace erroneous reference to
3846         bool_long_type_node with bool_long_long_type_node.
3847         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3848         comments to emphasize sign distinctions for char and int types and
3849         replace RS6000_BTI_bool_long constant with
3850         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
3851         use of RS6000_BTI_pixel.
3852         (bool_long_type_node): Remove this macro definition.
3853         (bool_long_long_type_node): New macro definition
3855 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3857         PR rtl-optimization/85300
3858         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3859         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3860         simplify_unary_operation fails.
3862 2018-04-10  Martin Liska  <mliska@suse.cz>
3864         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3865         cgraph_edge and ipa_ref.
3867 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3869         PR target/85177
3870         PR target/85255
3871         * config/i386/sse.md
3872         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3873         computation of the VEC_MERGE selector from mask.
3874         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3875         Fix decoding of the VEC_MERGE selector into mask.
3877 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3879         PR tree-optimization/85286
3880         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
3882 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3884         * final.c (final_1): Set insn_last_address as well as
3885         insn_current_address.
3887 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3889         PR target/85173
3890         * explow.c (emit_stack_probe): Call validize_mem on memory location
3891         before passing it to gen_probe_stack.  Create address operand and
3892         legitimize it for the probe_stack_address case.
3894 2018-04-09  Jan Hubicka  <jh@suse.cz>
3896         PR lto/85078
3897         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
3898         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
3899         * tree.c (free_lang_data_in_type): Fix handling of binfos;
3900         walk basetypes.
3901         (free_lang_data): Rebuild type inheritance graph.
3903 2018-04-09  Martin Sebor  <msebor@redhat.com>
3905         * invoke.texi (-finline-small-functions): Mention other optimization
3906         options.
3907         (-findirect-inlining, -fpartial-inlining): Same.
3908         (-finline-functions-called-once): Same.
3909         (-freorder-blocks-and-partition): Same.
3911 2018-04-09  Jan Hubicka  <jh@suse.cz>
3913         PR rtl/84058
3914         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
3915         jumps; choose last target that matches the criteria (i.e.
3916         no partition changes for non-crossing jumps).
3917         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
3918         support for redirecting crossing jumps to non-crossing.
3920 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
3922         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
3923         also for naked functions.
3925 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
3927         * config/arc/arc.md (add_shift): New pattern.
3928         (add_shift2): Likewise.
3929         (sub_shift): Likewise.
3930         (sub_shift_cmp0_noout): Likewise.
3931         (compare_si_ashiftsi): Likewise.
3932         (xbfu_cmp0_noout): New combine pattern.
3933         (xbfu_cmp0"): Likewise.
3934         (movsi_set_cc_insn): Place the predicable variant first.
3935         (commutative_binary_cmp0_noout): Remove clobber.
3936         (commutative_binary_cmp0): New pattern.
3937         (noncommutative_binary_cmp0): Likewise.
3938         (noncommutative_binary_cmp0_noout): Likewise.
3939         (noncommutative_binary_comparison_result_used): Removed.
3940         (rsub_cmp0): New pattern.
3941         (rsub_cmp0_noout): Likewise.
3942         (extzvsi): Changed, keep only meaningful variants.
3943         (SQH, SEZ): New iterators.
3944         (SQH_postfix): New mode attribute.
3945         (SEZ_prefix): New code attribute.
3946         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
3947         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
3948         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
3949         of numerical value.
3950         (noncommutative_operator): Check the availability of barrel
3951         shifter option.
3953 2018-04-09  Richard Biener  <rguenther@suse.de>
3955         PR tree-optimization/85284
3956         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
3957         Only use the niter constraining form of simple_iv when the exit
3958         is always executed.
3960 2018-04-09  Tom de Vries  <tom@codesourcery.com>
3962         PR target/84041
3963         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3964         (define_expand "*memory_barrier"): New define_expand.
3965         (define_insn "memory_barrier"): New insn.
3967 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3969         PR rtl-optimization/80463
3970         PR rtl-optimization/83972
3971         PR rtl-optimization/83480
3973         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
3974         correct producer for the insn.
3975         (tidy_control_flow): Fixup seqnos in case of debug insns.
3977 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3979         PR rtl-optimization/83913
3981         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
3982         different sched-times when merging exprs.
3984 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3986         PR rtl-optimization/83962
3988         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
3989         tidy_fallthru_edge and tidy_control_flow.
3991 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3993         PR rtl-optimization/83530
3995         * sel-sched.c (force_next_insn): New global variable.
3996         (remove_insn_for_debug): When force_next_insn is true, also leave only
3997         next insn in the ready list.
3998         (sel_sched_region): When the region wasn't scheduled, make another pass
3999         over it with force_next_insn set to 1.
4001 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4003         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4004         into tm_file.
4005         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4006         for interrupt control.
4007         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4008         functions for interrupt control.
4009         * config/nds32/nds32-intrinsic.md: Likewise.
4010         * config/nds32/nds32_intrinsic.h: Likewise.
4011         * config/nds32/nds32.h (nds32_builtins): Likewise.
4013 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4015         * config/nds32/nds32.c (nds32_init_machine_status,
4016         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4017         strict_aligned_p field.
4018         (nds32_expand_to_rtl_hook): New function.
4019         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4020         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4022 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4023             Chung-Ju Wu  <jasonwucj@gmail.com>
4025         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4026         * config/nds32/nds32-n7.md: New file.
4027         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4028         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4029         pipeline.
4030         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4031         * config/nds32/nds32.md (pipeline_model): Add n7.
4032         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4033         * config/nds32/pipelines.md: Include n7 settings.
4035 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4036             Chung-Ju Wu  <jasonwucj@gmail.com>
4038         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4039         * config/nds32/nds32-e8.md: New file.
4040         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4041         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4042         pipeline.
4043         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4044         * config/nds32/nds32.md (pipeline_model): Add e8.
4045         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4046         * config/nds32/pipelines.md: Include e8 settings.
4048 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4049             Chung-Ju Wu  <jasonwucj@gmail.com>
4051         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4052         * config/nds32/nds32-n8.md: New file.
4053         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4054         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4055         pipeline.
4056         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4057         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4058         * config/nds32/nds32.md (pipeline_model): Add n8.
4059         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4060         * config/nds32/pipelines.md: Include n8 settings.
4062 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4063             Chung-Ju Wu  <jasonwucj@gmail.com>
4065         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4066         * config/nds32/nds32-n9-2r1w.md: New file.
4067         * config/nds32/nds32-n9-3r2w.md: New file.
4068         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4069         nds32_register_ports): New or modify for cpu n9.
4070         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4071         pipeline.
4072         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4073         * config/nds32/nds32-utils.c: New file.
4074         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4075         TARGET_MUL_SLOW): Define.
4076         * config/nds32/nds32.md (pipeline_model): New attribute.
4077         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4078         New options that support cpu n9.
4079         * config/nds32/pipelines.md: Include n9 settings.
4080         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4082 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4084         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4085         information if necessary.
4086         (output_cond_branch_compare_zero): Likewise.
4087         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4088         (nds32_target_alignment): Refine for alignment.
4089         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4090         (FUNCTION_BOUNDARY): Modify.
4091         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4092         align case.
4093         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4095 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4097         * config/nds32/constants.md (unspec_volatile_element): Add values for
4098         TLB operation and data prefetch.
4099         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4100         functions for TLB operation and data prefetch.
4101         * config/nds32/nds32-intrinsic.md: Likewise.
4102         * config/nds32/nds32_intrinsic.h: Likewise.
4103         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4104         (nds32_print_operand): Likewise.
4105         * config/nds32/nds32.h (nds32_builtins): Likewise.
4107 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4108         Andrew Pinski <pinsika@gcc.gnu.org>
4110         PR middle-end/82976
4111         * match.pd: Use constant_boolean_node of correct type instead of
4112         boolean_true_node or boolean_false_node for simplifying
4113         pointer comparisons to zero.
4115 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4117         PR tree-optimization/80021
4118         * tree.c (verify_type_variant): Make error call in verify_variant_match
4119         translatable and remove final full stop.
4121 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4123         * config/nds32/constants.md (unspec_volatile_element): Add
4124         UNSPEC_VOLATILE_EH_RETURN.
4125         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4126         nds32_output_stack_pop): Support dwarf exception handling process.
4127         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4128         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4129         exception handling process.
4130         (nds32_compute_stack_frame): Likewise.
4131         (nds32_return_addr_rtx): Likewise.
4132         (nds32_initial_elimination_offset): Likewise.
4133         (nds32_expand_prologue): Likewise.
4134         (nds32_expand_epilogue): Likewise.
4135         (nds32_dynamic_chain_address): New function.
4136         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4137         exception handling.
4138         (DYNAMIC_CHAIN_ADDRESS): Define.
4139         (EH_RETURN_DATA_REGNO): Define.
4140         (EH_RETURN_STACKADJ_RTX): Define.
4141         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4142         patterns for dwarf exception handling.
4144 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4146         * config/nds32/nds32.h: Clean up obsolete macros.
4148 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4150         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4151         Add enum values for particular instructions.
4152         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4153         particular intrinsic functions.
4154         * config/nds32/nds32-intrinsic.md: Likewise.
4155         * config/nds32/nds32_intrinsic.h: Likewise.
4156         * config/nds32/nds32.h (nds32_builtins): Likewise.
4157         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4158         (btst, ave): New patterns for particular instructions.
4160 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4162         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4163         Add enum values for atomic load/store and memory sync.
4164         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4165         and memory sync.
4166         * config/nds32/nds32-intrinsic.md: Likewise.
4167         * config/nds32/nds32_intrinsic.h: Likewise.
4168         * config/nds32/nds32.h (nds32_builtins): Likewise.
4170 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4172         PR tree-optimization/85257
4173         * fold-const.c (native_encode_vector): If not all elts could fit
4174         and off is -1, return 0 rather than offset.
4175         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4176         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4177         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4178         adjust buffer in native_interpret_expr call.
4180 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4182         * config/nds32/constants.md (unspec_volatile_element): Add cache
4183         control enum values.
4184         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4185         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4186         * config/nds32/nds32.c (nds32_cctl_names): New.
4187         (nds32_print_operand): Handle cache control register names.
4188         * config/nds32/nds32.h (nds32_builtins): New enum values.
4189         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4190         macros.
4191         * config/nds32/nds32.md (type): Add mmu.
4192         * config/nds32/pipelines.md (simple_insn): Add mmu.
4194 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4196         * config/nds32/nds32.md (type): Remove call.
4197         * config/nds32/pipelines.md (simple_insn): Likewise.
4199 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4201         * config/nds32/constants.md (unspec_volatile_element): Add
4202         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4203         UNSPEC_VOLATILE_FMFCFG.
4204         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4205         description for fmfcfg and fmfcsr.
4206         (bdesc_1arg): Add fmtcsr.
4207         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4208         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4209         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4210         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4211         unspec_fmfcfg): New patterns.
4212         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4213         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4214         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4215         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4216         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4217         __nds32__fmfcfg): Define.
4219 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4221         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4222         intrinsic register names.
4223         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4224         intrinsic register enum values and macros.
4226 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4228         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4229         for load/store addressing form.
4230         (nds32_print_operand_address): Likewise.
4232 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4234         PR target/85196
4235         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4236         based on LABEL_REF.  Remove useless assertion.
4237         (pic_address_needs_scratch): Fix formatting.
4238         (sparc_legitimize_pic_address): Minor tweaks.
4239         (sparc_delegitimize_address): Adjust assertion accordingly.
4240         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4241         into symbolic_operand.
4242         (movsi_high_pic_label_ref): Likewise.
4243         (movsi_lo_sum_pic_label_ref): Likewise.
4244         (movdi_pic_label_ref): Likewise.
4245         (movdi_high_pic_label_ref): Likewise.
4246         (movdi_lo_sum_pic_label_ref): Likewise.
4248 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4250         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4251         custom LIB_SPEC setup.
4253 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4254             Kito Cheng  <kito.cheng@gmail.com>
4256         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4257         * config/riscv/freebsd.h: New.
4259 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4261         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4262         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4263         file.
4265 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4266             Kito Cheng  <kito.cheng@gmail.com>
4268         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4269         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4270         * config/nds32/nds32-protos.h (nds32_output_call,
4271         nds32_output_return): Declare.
4272         * config/nds32/nds32.md: Refine all the call and return patterns.
4274 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4276         PR debug/85252
4277         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4278         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4280         PR rtl-optimization/84872
4281         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4282         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4283         EDGE_CROSSING edge.
4285 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4287         * expr.c (copy_blkmode_to_reg): Revert 254862.
4288         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4290 2018-04-06  Richard Biener  <rguenther@suse.de>
4292         PR middle-end/85244
4293         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4294         after seeing a component reference with an adjacent field.  Treat
4295         refs to arrays at struct end of external decls similar to
4296         refs to unconstrained commons.
4298 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4300         PR sanitizer/85213
4301         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4302         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4303         recursive calls.
4304         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4305         save_p here.
4307 2018-04-06  Richard Biener  <rguenther@suse.de>
4309         PR middle-end/85180
4310         * alias.c (find_base_term): New wrapper around find_base_term
4311         unwinding CSELIB_VAL_PTR changes.
4312         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4313         recursion.
4315 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4317         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4318         instructions.
4319         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4320         constant definitions.
4321         ("nop"): lr 0,0 -> nopr r0
4322         ("nop_lr0", "nop_lr1"): New insn definitions.
4324 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4326         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4327         NDS32_V3PUSH_AVAILABLE_P macro.
4329 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4330             Chung-Ju Wu  <jasonwucj@gmail.com>
4332         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4333         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4334         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4335         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4336         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4337         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4338         * config/nds32/constraints.md: New constraints and checking for hard
4339         float configuration.
4340         * config/nds32/iterators.md: New mode iterator and attribute for hard
4341         float configuration.
4342         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4343         patterns.
4344         * config/nds32/nds32-fpu.md: New file.
4345         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4346         deal with hard float code generation.
4347         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4348         ARCH_V3S.
4349         (abi_type, float_reg_number): New enum type.
4350         * config/nds32/nds32-predicates.c: New predicates for hard float.
4351         * config/nds32/nds32-protos.h: Declare functions for hard float.
4352         * config/nds32/nds32.c: Implementation for hard float configuration.
4353         * config/nds32/nds32.h: Definitions for hard float configuration.
4354         * config/nds32/nds32.md: Include hard float machine description and
4355         modify patterns for hard float configuration.
4356         * config/nds32/nds32.opt: New options for hard float configuration.
4357         * config/nds32/predicates.md: New predicates for hard float
4358         configuration.
4360 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4362         * common/config/nds32/nds32-common.c
4363         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4365 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4367         PR middle-end/85195
4368         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4369         CONSTRUCTOR_ELT (ctor, ...)->value.
4371 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4373         PR target/85193
4374         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4376 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4378         PR target/85204
4379         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4380         cond jump.
4382 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4383             Kito Cheng  <kito.cheng@gmail.com>
4385         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4386         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4387         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4388         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4390 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4391             Kito Cheng  <kito.cheng@gmail.com>
4393         * config/nds32/constraints.md (Ufe): New memory constraint.
4394         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4395         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4396         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4397         operands.
4398         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4399         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4401 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4403         * config/nds32/nds32.md: Use optimize_size in the condition for
4404         alu-shift instructions.
4406 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4408         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4410 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4412         * config/nds32/nds32.md (negsi2): Refine pattern.
4414 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4415             Chung-Ju Wu  <jasonwucj@gmail.com>
4417         * config/nds32/iterators.md (shift_rotate): New code iterator.
4418         (shift): New code attribute.
4419         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4420         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4421         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4422         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4423         bit-wise operations.
4424         (andsi3, *andsi3): Ditto.
4425         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4426         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4427         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4428         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4429         nds32_ior_operand, nds32_xor_operand): New predicates.
4431 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4433         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4434         (addsi3, subsi3): ... this.
4436 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4438         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4440 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4442         * config/nds32/nds32.md: Adjust indention.
4444 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4446         * config/nds32/nds32.md (feature): New attribute.
4448 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4450         * config/nds32/nds32.md (subtype): New attribute.
4452 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4454         PR target/85203
4455         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4456         expansion to perform a bitwise AND of the argument followed by a
4457         boolean negation of the result.
4459 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4461         PR rtl-optimization/84878
4462         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4463         the basic block.  Assert the use reference is not artificial and that
4464         it has an associated insn.
4466 2018-04-04  Michael Matz  <matz@suse.de>
4468         * builtins.c (compute_objsize): Pass correct operand
4469         to array_at_struct_end_p.
4471 2018-04-04  Richard Biener  <rguenther@suse.de>
4473         PR lto/85176
4474         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4475         from contexts for DINFO_LEVEL_TERSE and below.
4477 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4479         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4480         resiter_operand condition.
4481         * config/nds32/nds32.md (*move<mode>): Ditto.
4483 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4484             Monk Chiang  <sh.chiang04@gmail.com>
4486         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4488 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4490         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4492 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4493             Kito Cheng  <kito.cheng@gmail.com>
4495         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4496         nds32_cond_code_str, output_cond_branch,
4497         output_cond_branch_compare_zero, nds32_expand_cbranch,
4498         nds32_expand_cstore, nds32_expand_movcc,
4499         nds32_output_cbranchsi4_equality_zero,
4500         nds32_output_cbranchsi4_equality_reg,
4501         nds32_output_cbranchsi4_equality_reg_or_const_int,
4502         nds32_output_cbranchsi4_greater_less_zero: New functions.
4503         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4504         nds32_expand_cstore, nds32_expand_movcc,
4505         nds32_output_cbranchsi4_equality_zero,
4506         nds32_output_cbranchsi4_equality_reg,
4507         nds32_output_cbranchsi4_equality_reg_or_const_int,
4508         nds32_output_cbranchsi4_greater_less_zero): Declare.
4509         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4510         nds32_rimm11s_operand): New predicates.
4511         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4512         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4513         patterns.
4515 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4517         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4518         * config/nds32/nds32.md: Ditto.
4519         * config/nds32/pipelines.md: Ditto.
4521 2018-04-04  Richard Biener  <rguenther@suse.de>
4523         PR tree-optimization/85168
4524         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4525         propagating abnormals.
4527 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4529         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4531 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4532             Kito Cheng  <kito.cheng@gmail.com>
4534         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4535         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4536         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4537         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4538         * config/nds32/nds32.md (sibcall_internal): New.
4539         (sibcall_register): Remove.
4540         (sibcall_immediate): Remove.
4541         (sibcall_value_internal): New.
4542         (sibcall_value_register): Remove.
4543         (sibcall_value_immediate): Remove.
4544         * config/nds32/predicates.md (nds32_general_register_operand): New.
4545         (nds32_call_address_operand): New.
4547 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4549         PR rtl-optimization/85167
4550         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4551         bb_defs if *split_p, instead preinitialize it to NULL.
4553         PR tree-optimization/85156
4554         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4555         evaluating the argument multiple times.
4557 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4559         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4560         than vector.
4561         (_mm_cvtpd_ps): Likewise.
4562         (_mm_cvttpd_epi32): Likewise.
4563         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4564         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4565         vector, pixel, and bool following altivec.h include.
4567 2018-04-03  Martin Sebor  <msebor@redhat.com>
4569         * doc/extend.texi (Common Function Attributes): Clarify.
4570         (const attribute): Likewise.
4571         (pure attribute): Likewise.
4573 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4575         PR target/85169
4576         * config/i386/i386.c (ix86_expand_vector_set): Use
4577         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4579 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4581         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4582         instructions when changing rounding bits to preserve precision bits
4583         in the x87 control word.
4585 2018-04-03  Martin Liska  <mliska@suse.cz>
4587         PR tree-optimization/82491
4588         * rtl.h (strip_offset_and_add): Replace += suboffset with
4589         poly_uint64 () + suboffset.
4591 2018-03-29  Martin Liska  <mliska@suse.cz>
4592             Martin Jambor  <mjambor@suse.cz>
4594         PR ipa/84947
4595         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4596         param_type is not an integral or pointer type.
4598 2018-04-03  Richard Biener  <rguenther@suse.de>
4600         * sese.h (recompute_all_dominators): Remove.
4602 2018-04-02  Martin Sebor  <msebor@redhat.com>
4604         * doc/invoke.texi (-Wrestrict): Fix typos.
4606 2018-04-02  Jim Wilson  <jimw@sifive.com>
4608         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4609         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4610         (<optab>di3, <optab>si3_extend): Likewise.
4611         (<optab>si3_mask, <optab>si3_mask_1): New.
4612         (<optab>di3_mask, <optab>di3_mask_1): New.
4613         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4614         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4615         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4617 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4619         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4620         example.
4622 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4624         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4625         (nds32_canonicalize_comparison): New function.
4627 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4628             Kito Cheng  <kito.cheng@gmail.com>
4629             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4631         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4632         * config/nds32/constants.md (unspec_volatile_element): Add
4633         UNSPEC_VOLATILE_RELAX_GROUP.
4634         * config/nds32/nds32-relax-opt.c: New file.
4635         * config/nds32/nds32-predicates.c
4636         (nds32_symbol_load_store_p): New function.
4637         * config/nds32/nds32-protos.h
4638         (nds32_symbol_load_store_p): Declare function.
4639         (make_pass_nds32_relax_opt): Declare new rtl pass function.
4640         * config/nds32/nds32.c
4641         (nds32_register_pass): New function to register pass.
4642         (nds32_register_passes): New function to register passes.
4643         * config/nds32/nds32.md (relax_group): New pattern.
4644         * config/nds32/nds32.opt (mrelax-hint): New option.
4645         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
4647 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
4649         * config/nds32/t-nds32: Modify files dependency.
4651 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4653         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
4654         (PROFILE_HOOK): Define its implementation.
4656 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4658         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
4659         type and 32-bit size.
4661 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
4663         PR middle-end/85090
4664         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
4665         (V_128_256): New mode iterator.
4666         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
4667         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
4668         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
4669         of V.
4670         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
4671         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
4673 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
4675         PR target/83315
4676         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
4677         NaN inputs correctly.
4679 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
4681         PR target/80546
4682         * config/rs6000/vsx.md (??r): New mode attribute.
4683         (*vsx_mov<mode>_64bit): Use it.
4684         (*vsx_mov<mode>_32bit): Likewise.
4686 2018-03-30  Martin Sebor  <msebor@redhat.com>
4688         PR tree-optimization/84818
4689         * builtins.c (check_access): Use warning_n.
4691 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
4693         PR target/83822
4694         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4695         condition.
4696         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4697         condition.
4699 2018-03-30  Julia Koval  <julia.koval@intel.com>
4701         PR target/84413
4702         * x86-tune.def (movx, partial_reg_dependency): Enable for
4703         m_SKYLAKE_AVX512.
4705 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
4707         PR inline-asm/84985
4708         * lra-constraints.c (process_alt_operands): Move setting
4709         this_alternative_matches below.
4711 2018-03-29  Martin Liska  <mliska@suse.cz>
4713         PR lto/84995.
4714         * doc/invoke.texi: Document how LTO works with debug info.
4715         Describe auto-load support of binutils.  Mention 'x86-64'
4716         as valid option value of -march option.
4718 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
4720         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4722         PR c/85094
4723         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4724         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4725         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4726         checking.
4728 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4730         PR target/84912
4731         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4732         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4733         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4734         for RS6000_BTM_POWERPC64.
4735         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4736         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4737         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4738         definition.
4739         (DIVDE): Use it.
4740         (DIVDEU): Likewise.
4742 2018-03-28 Carl Love  <cel@us.ibm.com>
4744         Revert
4745         2017-09-27  Carl Love  <cel@us.ibm.com>
4747         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4748         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4749         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4750         fctiw instruction.
4752 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4754         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4755         instead of __vector bool.
4756         (_mm_max_pu8): Likewise.
4757         (_mm_min_pi16): Likewise.
4759 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4761         PR target/84912
4762         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4763         (DIVWEUO): Likewise.
4764         (DIVDEO): Likewise.
4765         (DIVDEUO): Likewise.
4766         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4767         DIVWEUO and DIVDEUO.
4768         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4769         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4770         (div_extend): Likewise.
4771         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4772         builtin function.
4773         (__builtin_divweuo): Likewise.
4774         (__builtin_divdeo): Likewise.
4775         (__builtin_divdeuo): Likewise.
4777 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4779         PR target/85095
4780         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4781         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4783         PR tree-optimization/82004
4784         * gimple-match-head.c (optimize_pow_to_exp): New function.
4785         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4786         Don't fold to exp if optimize_pow_to_exp is false.
4788 2018-03-28  Martin Liska  <mliska@suse.cz>
4790         PR other/84819
4791         * calls.c (initialize_argument_information): Fix trailing space.
4792         * common.opt: Fix typo and provide better explanation for
4793         -fsanitize-coverage option.
4794         * config/i386/i386.opt: Fix typo.
4796 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4797             Martin Liska  <mliska@suse.cz>
4799         PR sanitizer/85081
4800         * gimplify.c (asan_poison_variable): Don't do the check for
4801         gimplify_omp_ctxp here.
4802         (gimplify_decl_expr): Do it here.
4803         (gimplify_target_expr): Likewise.
4805 2018-03-28  Martin Liska  <mliska@suse.cz>
4807         PR target/84988
4808         * config/i386/i386.c (ix86_function_arg_advance): Do not call
4809         chkp_type_bounds_count if MPX is not enabled.
4811 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4813         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4815 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4817         PR target/84914
4818         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4819         function to create the function decl for complex long double
4820         multiply and divide for -mabi=ieeelongdouble.
4821         (init_float128_ieee): Call it.
4823 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
4825         PR target/85044
4826         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4827         -fcf-protection=branch -mibt.
4828         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4830 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4832         PR target/81863
4833         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4835 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
4837         PR target/85056
4838         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4839         extern array declarations.
4841 2018-03-27  Richard Biener  <rguenther@suse.de>
4843         PR middle-end/84067
4844         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4845         explicit single_use checks.
4847 2018-03-27  Richard Biener  <rguenther@suse.de>
4849         PR tree-optimization/85082
4850         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4851         Valueize the VUSE.
4853 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4855         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4856         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4857         Turn on fasynchronous-unwind-tables and funwind-tables.
4859 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
4861         PR target/85073
4862         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4863         (*bmi_blsr_<mode>_ccz): Ditto.
4865 2018-03-26  Tom de Vries  <tom@codesourcery.com>
4867         PR tree-optimization/85063
4868         * omp-general.c (offloading_function_p): New function.  Factor out
4869         of ...
4870         * omp-offload.c (pass_omp_target_link::gate): ... here.
4871         * omp-general.h (offloading_function_p): Declare.
4872         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4873         with attribute omp declare target for offloading functions.
4875 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
4877         PR tree-optimization/84005
4878         * tree-data-ref.h (get_base_for_alignment): Declare.
4879         * tree-data-ref.c (get_base_for_alignment_1): New function.
4880         (get_base_for_alignment): Likewise.
4881         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
4882         get_base_for_alignment to find a suitable base object, instead
4883         of always using drb->base_address.
4885 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
4887         PR inline-asm/85022
4888         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
4889         known size by default.
4891 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
4893         PR inline-asm/85030
4894         * lra-constraints.c (process_alt_operands): Don't match BLKmode
4895         and non BLKmode operands.
4897 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4899         PR target/85026
4900         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
4901         Clean up attributes.
4903 2018-03-23  Richard Biener  <rguenther@suse.de>
4905         PR debug/85020
4906         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
4907         we are going to emit early debug for LTO.
4909 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
4911         PR inline-asm/85034
4912         * function.c (match_asm_constraints_1): Don't optimize if input
4913         doesn't satisfy general_operand predicate for output's mode.
4915         PR inline-asm/85022
4916         * alias.c (write_dependence_p): Don't require for x_canonicalized
4917         non-VOIDmode if x has VOIDmode.
4919         PR sanitizer/85029
4920         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
4921         just don't try to optimize it rather than assert it never happens.
4923 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4925         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
4926         macro expansions for definition of ST_INTERNAL_<mode> and
4927         LD_INTERNAL_<mode> builtins.
4928         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
4929         Remove prototype.
4930         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
4931         function.
4932         (altivec_expand_st_builtin): Likewise.
4933         (altivec_expand_builtin): Remove calls to deleted functions.
4934         (rs6000_address_for_altivec): Delete this function.
4935         * config/rs6000/vector.md: Remove expands for
4936         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
4938 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
4940         PR target/84826
4941         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
4942         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
4943         re-computing once computed.
4944         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
4945         (arm_init_machine_status): Initialize
4946         machine->static_chain_stack_bytes.
4948 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4950         PR target/84760
4951         * doc/extend.texi: Add four new prototypes for vec_ld.
4952         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
4953         definitions for more logical presentation.
4954         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
4955         entries for V1TI variants of __builtin_altivec_ld builtin.
4956         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
4957         handling of V1TI variant of LVX icode pattern.
4958         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
4959         (rs6000_gimple_fold_builtin): Likewise.
4960         (altivec_init_builtins): Add code to define
4961         __builtin_altivec_lvx_v1ti function.
4963 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
4965         PR inline-asm/84941
4966         * function.c (match_asm_constraints_1): Don't do the optimization
4967         if input isn't a REG, SUBREG, MEM or constant.
4969 2018-03-22  Tom de Vries  <tom@codesourcery.com>
4971         PR tree-optimization/84956
4972         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
4973         bb_has_abnormal_pred.
4975 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
4977         PR sanitizer/85018
4978         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
4979         DECL_INITIAL (decl) to decl at the end.
4980         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
4981         adjust the comment.
4983 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
4985         * doc/extend.texi (__builtin_tgmath): Document when complex
4986         integer types are treated as _Complex _Float64.
4988 2018-03-21  Tom de Vries  <tom@codesourcery.com>
4990         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
4992 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4994         PR tree-optimization/84960
4995         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
4996         if it is ENTRY block, move them into single succ of ENTRY in that case.
4998 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5000         PR tree-optimization/84811
5001         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5002         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5003         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5004         (known_subrange_p): Update accordingly.  Cast each value involved
5005         in the size comparison, rather than casting the result of the
5006         subtraction.
5008 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5010         PR tree-optimization/84982
5011         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5012         by flipping the least significant bit rather than all bits from
5013         bitpos to bitpos + bitsize - 1.
5015 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5017         * doc/extend.texi (Deprecated Features): Remove mention of
5018         long-deleted deprecations.
5020 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5022         PR jit/84288
5023         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5024         * configure: Regenerate.
5026 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5028         PR tree-optimization/83126
5029         * tree-parloops.c (num_phis): New function.
5030         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5032 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5034         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5035         mention anon-struct/union members and trailing attributes.
5037 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5039         PR tree-optimization/84969
5040         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5041         builtin memset partitions if they set different rhs values.
5043 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5045         PR rtl-optimization/84989
5046         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5047         VEC_DUPLICATE with scalar result mode.
5049 2018-03-21  Martin Liska  <mliska@suse.cz>
5051         PR ipa/84963
5052         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5053         not intended return statement.
5055 2018-03-21  Martin Liska  <mliska@suse.cz>
5057         PR target/84988
5058         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5059         (chkp_find_bound_slots_1): Limit number of iterations.
5061 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5063         PR target/84838
5064         * Minor grammar fixes for x86 options.
5066 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5068         PR debug/84875
5069         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5070         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5072 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5074         PR target/83789
5075         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5076         (altivec_lvx_<mode>_1op): Likewise.
5077         (altivec_stvx_<mode>_2op): Likewise.
5078         (altivec_stvx_<mode>_1op): Likewise.
5079         (altivec_lvx_<VM2:mode>): New define_expand.
5080         (altivec_stvx_<VM2:mode>): Likewise.
5081         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5082         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5083         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5084         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5085         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5086         (rs6000_gen_lvx): Likewise.
5087         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5088         (altivec_expand_stv_builtin): Likewise.
5089         (altivec_expand_builtin): Likewise.
5090         * config/rs6000/vector.md: Likewise.
5092 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5094         PR target/82518
5095         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5096         BYTES_BIG_ENDIAN.
5098 2018-03-20  Richard Biener  <rguenther@suse.de>
5100         PR target/84986
5101         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5102         sign-conversions as zero, fall back to standard scalar_stmt
5103         cost for the rest.
5105 2018-03-20  Martin Liska  <mliska@suse.cz>
5107         PR ipa/84825
5108         * predict.c (rebuild_frequencies): Handle case when we have
5109         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5111 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5113         PR target/84990
5114         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5115         flag_section_anchors.
5116         * varasm.c (use_blocks_for_decl_p): Remove hack for
5117         dw2_force_const_mem.
5119         PR target/84845
5120         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5121         to ...
5122         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5123         be created, use lowpart_subreg of operands[0] rather than operands[0]
5124         itself.
5125         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5126         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5127         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5128         and n constraint instead of aarch64_shift_imm_di and Usd.
5129         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5130         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5132 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5134         PR target/82989
5135         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5136         to favor GPR over NEON registers.
5137         (<shift>di3_neon): Likewise.
5139 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5141         PR target/84952
5142         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5143         (nvptx_process_pars): Emit bar.sync asap and alap.
5145 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5147         PR target/84954
5148         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5149         seen_label if seen_label is already set.
5151 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5153         PR target/84945
5154         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5155         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5156         Use 1U instead of 1.  Formatting fixes.
5158         PR c/84953
5159         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5160         instead of TREE_TYPE (s1) for the return value.
5162 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5164         PR tree-optimization/84946
5165         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5166         bitsize + bitsize in poly_uint64 rather than poly_int64.
5168         PR sanitizer/78651
5169         * dwarf2asm.c: Include fold-const.c.
5170         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5171         of decl rather than decl itself.
5173         PR rtl-optimization/84643
5174         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5176 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5178         PR sanitizer/78651
5179         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5180         calling assemble_variable.
5182 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5184         PR target/81647
5185         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5186         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5188 2018-03-19  Jim Wilson  <jimw@sifive.com>
5190         PR bootstrap/84856
5191         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5192         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5193         (riscv_first_stack_step): Likewise.
5194         (riscv_option_override): Use STACK_BOUNDARY instead of
5195         MIN_STACK_BOUNDARY.
5196         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5197         MIN_STACK_BOUNDARY.
5198         (BIGGEST_ALIGNMENT): Set to 128.
5199         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5200         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5201         STACK_BOUNDARY.
5203 2018-03-19  Richard Biener  <rguenther@suse.de>
5205         PR tree-optimization/84933
5206         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5207         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5209 2018-03-19  Richard Biener  <rguenther@suse.de>
5211         PR tree-optimization/84859
5212         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5213         (cond_if_else_store_replacement): Perform sinking operation on
5214         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5215         Generalize what a BB with a single eligible store is.
5217 2018-03-19  Richard Biener  <rguenther@suse.de>
5219         PR tree-optimization/84929
5220         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5221         chrec_is_positive against non-chrec arg.
5223 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5225         PR target/84711
5226         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5228 2018-03-18  Martin Liska  <mliska@suse.cz>
5230         PR rtl-optimization/84635
5231         * regrename.c (build_def_use): Use matches_mode only when
5232         matches >= 0.
5234 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5236         PR tree-optimization/84913
5237         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5238         vectorize chains of COND_EXPRs.
5240 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5242         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5244 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5246         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5248 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5250         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5252 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5253             Kito Cheng  <kito.cheng@gmail.com>
5255         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5256         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5257         (nds32_adjust_reg_alloc_order): New function.
5258         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5260 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5262         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5263         nds32_print_operand, nds32_print_operand_address): Use
5264         HOST_WIDE_INT_PRINT_DEC instead.
5266 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5268         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5270 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5272         PR target/84902
5273         * config/i386/i386.c (initial_ix86_tune_features,
5274         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5275         unsigned long long.
5276         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5277         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5278         rather than 1u << ix86_tune.  Formatting fix.
5279         (ix86_option_override_internal): Change ix86_arch_mask from
5280         unsigned int to unsigned HOST_WIDE_INT, initialize to
5281         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5282         (ix86_function_specific_restore): Likewise.
5284 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5286         PR target/84899
5287         * postreload.c (reload_combine_recognize_pattern): Perform
5288         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5289         truncate_int_for_mode the result for the destination's mode.
5291         PR c/84909
5292         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5293         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5294         Likewise.
5295         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5296         Likewise.
5298 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5300         PR target/84876
5301         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5302         regno_allocno_class_array and sorted_pseudos.
5303         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5304         insns where regno is used.
5306 2018-03-16  Martin Liska  <mliska@suse.cz>
5308         PR ipa/84833
5309         * multiple_target.c (create_dispatcher_calls): Redirect
5310         reference in the symbol table.
5312 2018-03-16  Martin Liska  <mliska@suse.cz>
5314         PR ipa/84722
5315         * multiple_target.c (create_dispatcher_calls): Redirect also
5316         an alias.
5318 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5320         PR c++/79937
5321         PR c++/82410
5322         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5323         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5324         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5326 2018-03-16  Julia Koval  <julia.koval@intel.com>
5328         * doc/invoke.texi (Skylake Server): Add CLWB.
5329         Cannonlake): Remove CLWB.
5331 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5333         PR tree-optimization/84841
5334         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5335         1 << 3.
5336         (FLOAT_ONE_CONST_TYPE): Define.
5337         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5338         (sort_by_operand_rank): Put entries with higher constant_type last
5339         rather than first to match comments.
5341 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5343         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5344         split predicate.
5346 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5348         PR c++/79085
5349         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5350         check and use address of target always.
5352 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5354         PR target/84574
5355         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5356         (indirect_thunk_bnd_needed): Likewise.
5357         (indirect_thunks_used): Likewise.
5358         (indirect_thunks_bnd_used): Likewise.
5359         (indirect_return_needed): New.
5360         (indirect_return_bnd_needed): Likewise.
5361         (output_indirect_thunk_function): Add a bool argument for
5362         function return.
5363         (output_indirect_thunk_function): Don't generate alias for
5364         function return thunk.
5365         (ix86_code_end): Call output_indirect_thunk_function to generate
5366         function return thunks.
5367         (ix86_output_function_return): Set indirect_return_bnd_needed
5368         and indirect_return_needed instead of indirect_thunk_bnd_needed
5369         and indirect_thunk_needed.
5371 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5373         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5374         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5375         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5377 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5378             Paul Hua <paul.hua.gm@gmail.com>
5380         PR c/84852
5381         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5383 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5385         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5386         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5387         resp. SFmode cases.
5389 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5391         PR target/84711
5392         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5393         instead of GET_MODE_SIZE when comparing Units.
5395 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5397         PR target/68256
5398         * varasm.c (hash_section): Return an unchangeble hash value
5399         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5400         Return !aarch64_can_use_per_function_literal_pools_p ().
5402 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5404         PR target/84860
5405         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5406         rather than address of cmode as last argument to prepare_cmp_insn.
5408 2018-03-15  Julia Koval  <julia.koval@intel.com>
5410         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5411         F_AVX512VNNI, F_AVX512BITALG): New.
5413 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5415         PR target/83451
5416         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5417         insn for floating-point loads and stores.
5419 2018-03-14  Carl Love  <cel@us.ibm.com>
5421         * config/rs6000/rs6000-c.c: Add macro definitions for
5422         ALTIVEC_BUILTIN_VEC_PERMXOR.
5423         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5424         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5425         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5426         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5427         UNSPEC_VPERMXOR.
5428         * config/doc/extend.texi: Add prototypes for vec_permxor.
5430 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5432         PR c/84852
5433         * diagnostic-show-locus.c (class layout_point): Convert m_line
5434         from int to linenum_type.
5435         (line_span::comparator): Use linenum "compare" function when
5436         comparing line numbers.
5437         (test_line_span): New function.
5438         (layout_range::contains_point): Convert param "row" from int to
5439         linenum_type.
5440         (layout_range::intersects_line_p): Likewise.
5441         (layout::will_show_line_p): Likewise.
5442         (layout::print_source_line): Likewise.
5443         (layout::should_print_annotation_line_p): Likewise.
5444         (layout::print_annotation_line): Likewise.
5445         (layout::print_leading_fixits): Likewise.
5446         (layout::annotation_line_showed_range_p): Likewise.
5447         (struct line_corrections): Likewise for field m_row.
5448         (line_corrections::line_corrections): Likewise for param "row".
5449         (layout::print_trailing_fixits): Likewise.
5450         (layout::get_state_at_point): Likewise.
5451         (layout::get_x_bound_for_row): Likewise.
5452         (layout::print_line): Likewise.
5453         (diagnostic_show_locus): Likewise for locals "last_line" and
5454         "row".
5455         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5456         * input.c (selftest::test_linenum_comparisons): New function.
5457         (selftest::input_c_tests): Call it.
5458         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5459         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5460         * selftest.h (ASSERT_GT): New macro.
5461         (ASSERT_GT_AT): New macro.
5462         (ASSERT_LT): New macro.
5463         (ASSERT_LT_AT): New macro.
5465 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5467         PR rtl-optimization/84780
5468         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5470 2018-03-14  Martin Liska  <mliska@suse.cz>
5472         * tree.c (record_node_allocation_statistics): Use
5473         get_stats_node_kind.
5474         (get_stats_node_kind): New function extracted from
5475         record_node_allocation_statistics.
5476         (free_node): Use get_stats_node_kind.
5478 2018-03-14  Richard Biener  <rguenther@suse.de>
5480         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5481         that the value-set of ANTIC_IN doesn't grow.
5483         Revert
5484         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5485         member.
5486         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5487         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5489 2018-03-14  Julia Koval  <julia.koval@intel.com>
5491         * config.gcc (icelake-client, icelake-server): New.
5492         (icelake): Remove.
5493         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5494         (initial_ix86_arch_features): Ditto.
5495         (PTA_SKYLAKE): Add SGX.
5496         (PTA_ICELAKE): Remove.
5497         (PTA_ICELAKE_CLIENT): New.
5498         (PTA_ICELAKE_SERVER): New.
5499         (ix86_option_override_internal): Split up icelake on icelake client and
5500         icelake server.
5501         (get_builtin_code_for_version): Ditto.
5502         (fold_builtin_cpu): Ditto.
5503         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5504         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5505         * config/i386/i386.h (processor_type): Ditto.
5506         * doc/invoke.texi: Ditto.
5508 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5510         PR sanitizer/83392
5511         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5512         INTEGER_CST offset, add it together with bitpos / 8 and
5513         sign extend based on POINTER_SIZE.
5515         PR target/84844
5516         Revert
5517         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5519         PR target/78090
5520         * config/i386/constraints.md (Yc): New register constraint.
5521         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5522         Use Yc constraint for alternative 2 of operand 0.  Remove
5523         preferred_for_speed attribute.
5525 2018-03-14  Richard Biener  <rguenther@suse.de>
5527         PR tree-optimization/84830
5528         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5529         with the old one to avoid oscillations.
5531 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5533         PR target/83712
5534         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5535         pseudos.
5536         (assign_by_spills): Return a flag of reload assignment failure.
5537         Do not process the reload assignment failures.  Do not spill other
5538         reload pseudos if they has the same reg class.  Update n if
5539         necessary.
5540         (lra_assign): Add a return arg.  Set up from the result of
5541         assign_by_spills call.
5542         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5543         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5544         usage_insns if it is not NULL.
5545         (spill_hard_reg_in_range): New function.
5546         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5547         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5548         function prototypes.
5549         (lra_assign): Change prototype.
5550         * lra.c (lra): Add code to deal with fails by splitting hard reg
5551         live ranges.
5553 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5555         * config/riscv/riscv.opt (mrelax): New option.
5556         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5557         "norelax" when riscv_mrelax is disabled.
5558         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5560 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5562         PR target/84743
5563         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5564         reassociation for int modes.
5566 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5568         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5569         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5570         for big-endian.
5571         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5572         * config/aarch64/aarch64-sve.md
5573         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5574         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5575         (*extend<mode><Vwide>2): Rename to...
5576         (aarch64_sve_extend<mode><Vwide>2): ...this.
5577         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5578         renaming the old pattern to...
5579         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5580         unsigned packs.
5581         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5582         define_expand, renaming the old pattern to...
5583         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5584         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5585         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5586         account when deciding which SVE instruction the optab should use.
5587         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5589 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5591         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5592         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5593         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5594         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5595         (tlsdesc_small_<mode>): Turn a define_expand and use
5596         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5597         (tlsdesc_small_advsimd_<mode>): ...this.
5598         (tlsdesc_small_sve_<mode>): New pattern.
5600 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5602         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5603         (UNSPEC_UMUL_HIGHPART): New constants.
5604         (MUL_HIGHPART): New int iteraor.
5605         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5606         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5607         define_expand.
5608         (*<su>mul<mode>3_highpart): New define_insn.
5610 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5612         PR lto/84805
5613         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5614         incomplete types.
5616 2018-03-13  Martin Liska  <mliska@suse.cz>
5618         PR ipa/84658.
5619         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5620         vector.
5621         (sem_item_optimizer::~sem_item_optimizer): Release it.
5622         (sem_item_optimizer::merge_classes): Register variable aliases.
5623         (sem_item_optimizer::fixup_pt_set): New function.
5624         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5625         * ipa-icf.h: Declare new variables and functions.
5627 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5629         PR middle-end/84834
5630         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5631         integer_pow2p@2 and test integer_pow2p in condition.
5632         (A < 0 ? C : 0): Similarly for @1.
5634         PR middle-end/84831
5635         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5636         characters starting at p contain '\0' character, don't look beyond
5637         that.
5639         PR target/84827
5640         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5641         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
5643         PR target/84828
5644         * reg-stack.c (change_stack): Change update_end var from int to
5645         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
5646         also call set_block_for_insn on the newly added insns and rescan.
5648         PR target/84786
5649         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
5650         on the last operand.
5652         PR c++/84704
5653         * tree.c (stabilize_reference_1): Return save_expr (e) for
5654         STATEMENT_LIST even if it doesn't have side-effects.
5656 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
5658         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
5660 2018-03-12  Renlin Li  <renlin.li@arm.com>
5662         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
5663         aarch64_output_scalar_simd_mov_immediate.
5665 2018-03-12  Martin Sebor  <msebor@redhat.com>
5667         PR tree-optimization/83456
5668         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
5669         for perfectly overlapping calls to memcpy.
5670         (gimple_fold_builtin_memory_chk): Same.
5671         (gimple_fold_builtin_strcpy): Handle no-warning.
5672         (gimple_fold_builtin_stxcpy_chk): Same.
5673         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
5675 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5677         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
5678         parameter.  Use it for SFmode.
5679         (rs6000_function_arg_advance_1): Adjust.
5680         (rs6000_function_arg): Adjust.
5681         (rs6000_gimplify_va_arg): Pass false for that new parameter.
5683 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5685         PR rtl-optimization/84169
5686         PR rtl-optimization/84780
5687         * combine.c (can_combine_p): Check for a 2-insn combination whether
5688         the destination register is used between the two insns, too.
5690 2018-03-12  Richard Biener  <rguenther@suse.de>
5692         PR tree-optimization/84803
5693         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5694         for refs DR analysis didn't process.
5696 2018-03-12  Richard Biener  <rguenther@suse.de>
5698         PR tree-optimization/84777
5699         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5700         force-vectorize loops ignore whether we are optimizing for size.
5702 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5704         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5705         (TARGET_MD_ASM_ADJUST): Define.
5707 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
5708             Kito Cheng  <kito.cheng@gmail.com>
5709             Chung-Ju Wu  <jasonwucj@gmail.com>
5711         * config/nds32/nds32.c (nds32_compute_stack_frame,
5712         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5713         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5714         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5715         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5716         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5717         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5718         * config/nds32/nds32.md (prologue, epilogue): Use macro
5719         NDS32_V3PUSH_AVAILABLE_P to do checking.
5721 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
5723         PR debug/58150
5724         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5725         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5726         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
5727         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
5728         addition of most attributes on !orig_type_die or the attribute not
5729         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5731 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5732             Chung-Ju Wu  <jasonwucj@gmail.com>
5734         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5735         __NDS32_VH__ macro.
5736         * config/nds32/nds32.opt (mvh): New option.
5738 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5739             Chung-Ju Wu  <jasonwucj@gmail.com>
5741         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5742         function.
5743         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5744         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5745         definition.
5747 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5748             Chung-Ju Wu  <jasonwucj@gmail.com>
5750         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5751         function.
5752         * config/nds32/nds32-multiple.md (strlensi): New pattern.
5753         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5755 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
5756             Kito Cheng  <kito.cheng@gmail.com>
5757             Chung-Ju Wu  <jasonwucj@gmail.com>
5759         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5760         UNSPEC_FFMISM and UNSPEC_FLMISM.
5761         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5762         for ffb, ffmism and flmism.
5763         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5764         (unspec_ffmism): Ditto.
5765         (unspec_flmism): Ditto.
5766         (nds32_expand_builtin_impl): Check if string extension is available.
5767         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5768         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5770 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
5772         Reverting patch:
5773         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5775         PR target/83712
5776         * lra-assigns.c (assign_by_spills): Return a flag of reload
5777         assignment failure.  Do not process the reload assignment
5778         failures.  Do not spill other reload pseudos if they has the same
5779         reg class.
5780         (lra_assign): Add a return arg.  Set up from the result of
5781         assign_by_spills call.
5782         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5783         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5784         usage_insns if it is not NULL.
5785         (spill_hard_reg_in_range): New function.
5786         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5787         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5788         function prototypes.
5789         (lra_assign): Change prototype.
5790         * lra.c (lra): Add code to deal with fails by splitting hard reg
5791         live ranges.
5793 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
5795         PR target/84807
5796         * config/i386/i386.opt: Replace Enforcment with Enforcement.
5798 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
5800         PR debug/84620
5801         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5802         (dw_val_node): Add val_symbolic_view.
5803         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5804         (symview_upper_bound): New.
5805         (new_line_info_table): Initialize symviews_since_reset.
5806         (dwarf2out_source_line): Count symviews_since_reset and set
5807         symview_upper_bound.
5808         (dw_val_equal_p): Handle symview.
5809         (add_AT_symview): New.
5810         (print_dw_val): Handle symview.
5811         (attr_checksum, attr_checksum_ordered): Likewise.
5812         (same_dw_val_p, size_of_die): Likewise.
5813         (value_format, output_die): Likewise.
5814         (add_high_low_attributes): Use add_AT_symview for entry_view.
5815         (dwarf2out_finish): Reset symview_upper_bound, clear
5816         zero_view_p.
5818 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
5820         PR target/83969
5821         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5822         Add strict argument and use it.
5823         (rs6000_split_multireg_move): Update for new strict argument.
5824         (mem_operand_gpr): Disallow all non-offsettable addresses.
5825         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5827 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
5829         PR target/84772
5830         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5831         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5832         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5834         PR c++/84767
5835         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5836         decl, use remap_type if we want to use the type.
5838 2018-03-09  Martin Sebor  <msebor@redhat.com>
5840         PR tree-optimization/84526
5841         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5842         Remove dead code.
5843         (builtin_access::generic_overlap): Be prepared to handle non-array
5844         base objects.
5846 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
5848         PR rtl-optimization/84682
5849         * lra-constraints.c (process_address_1): Check is_address flag
5850         for address constraints.
5851         (process_alt_operands): Likewise.
5852         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5853         preprocess_constraints.
5854         * recog.h (preprocess_constraints): Add oploc parameter.
5855         Adjust callers.
5856         * recog.c (preprocess_constraints): Test address_operand for
5857         CT_ADDRESS constraints.
5859 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5861         PR target/83712
5862         * lra-assigns.c (assign_by_spills): Return a flag of reload
5863         assignment failure.  Do not process the reload assignment
5864         failures.  Do not spill other reload pseudos if they has the same
5865         reg class.
5866         (lra_assign): Add a return arg.  Set up from the result of
5867         assign_by_spills call.
5868         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5869         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5870         usage_insns if it is not NULL.
5871         (spill_hard_reg_in_range): New function.
5872         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5873         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5874         function prototypes.
5875         (lra_assign): Change prototype.
5876         * lra.c (lra): Add code to deal with fails by splitting hard reg
5877         live ranges.
5879 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5881         PR target/83193
5882         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
5883         Accept complain bool parameter.  Only emit errors if it is true.
5884         (arm_parse_cpu_option_name): Likewise.
5885         (arm_target_thumb_only): Adjust callers of the above.
5886         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
5887         prototype to take a default true bool parameter.
5888         (arm_parse_arch_option_name): Likewise.
5890 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
5891             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
5893         PR jit/64089
5894         PR jit/84288
5895         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
5896         * configure: Regenerate.
5897         * configure.ac ("linker --version-script option"): New.
5898         ("linker soname option"): New.
5900 2018-03-09  Richard Biener  <rguenther@suse.de>
5902         PR tree-optimization/84775
5903         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
5904         immediate uses of predicate stmts and mark them modified.
5906         Revert
5907         PR tree-optimization/84178
5908         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5909         to caller.
5910         (version_loop_for_if_conversion): Delay update_ssa call.
5911         (tree_if_conversion): Delay update_ssa until after predicate
5912         insertion.
5914 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
5916         PR target/84763
5917         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
5918         when the function accesses prior frames.
5920 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
5922         PR debug/84456
5923         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
5924         gen_llsym, otherwise call maybe_gen_llsym.
5926         PR inline-asm/84742
5927         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
5928         has ',' character inside of it.
5930 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5932         PR target/84748
5933         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
5934         as clobbering CC_REGNUM.
5936 2018-03-08  Richard Biener  <rguenther@suse.de>
5938         PR middle-end/84552
5939         * tree-scalar-evolution.c: Include tree-into-ssa.h.
5940         (follow_copies_to_constant): Do not follow SSA names registered
5941         for update.
5943 2018-03-08  Richard Biener  <rguenther@suse.de>
5945         PR tree-optimization/84178
5946         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5947         to caller.
5948         (version_loop_for_if_conversion): Delay update_ssa call.
5949         (tree_if_conversion): Delay update_ssa until after predicate
5950         insertion.
5952 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
5954         PR tree-optimization/84178
5955         * tree-if-conv.c (release_bb_predicate): Remove the
5956         the assertion that the stmts have NULL use_ops.
5957         Discard the statements, asserting that they haven't
5958         yet been added to a BB.
5960 2018-03-08  Richard Biener  <rguenther@suse.de>
5962         PR tree-optimization/84746
5963         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
5964         (phi_translate): Pass in destination ANTIC_OUT set.
5965         (phi_translate_1): Likewise.  For a simplified result lookup
5966         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
5967         (phi_translate_set): Adjust.
5968         (do_pre_regular_insertion): Likewise.
5969         (do_pre_partial_partial_insertion): Likewise.
5971 2018-03-08  Martin Liska  <mliska@suse.cz>
5973         PR gcov-profile/84735
5974         * doc/gcov.texi: Document usage of profile files.
5975         * gcov-io.h: Document changes in the format.
5977 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
5979         PR debug/84404
5980         PR debug/84408
5981         * dwarf2out.c (struct dw_line_info_table): Update comments for
5982         view == -1.
5983         (FORCE_RESET_NEXT_VIEW): New.
5984         (FORCE_RESETTING_VIEW_P): New.
5985         (RESETTING_VIEW_P): Check for -1 too.
5986         (ZERO_VIEW_P): Likewise.
5987         (new_line_info_table): Force-reset next view.
5988         (dwarf2out_begin_function): Likewise.
5989         (dwarf2out_source_line): Simplify zero_view_p initialization.
5990         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
5991         view directly.  Omit view when omitting .loc at line 0.
5993 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
5995         PR tree-optimization/84740
5996         * tree-switch-conversion.c (process_switch): Call build_constructors
5997         only if info.phi_count is non-zero.
5999         PR tree-optimization/84739
6000         * tree-tailcall.c (find_tail_calls): Check call arguments against
6001         DECL_ARGUMENTS (current_function_decl) rather than
6002         DECL_ARGUMENTS (func) when checking for tail recursion.
6004 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6006         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6007         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6008         Volker Reichelt's entry and add entries for people that perform
6009         GCC fuzzy testing and report numerous bugs.
6011 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6013         PR target/82411
6014         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6015         readonly data in sdata, if that is disabled.
6016         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6017         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6018         -mreadonly-in-sdata option.
6020 2018-03-07  Martin Sebor  <msebor@redhat.com>
6022         PR tree-optimization/84468
6023         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6024         basic block when looking for nul assignment.
6026 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6028         PR target/84277
6029         * except.h (output_function_exception_table): Adjust prototype.
6030         * except.c (output_function_exception_table): Remove FNNAME parameter
6031         and add SECTION parameter.  Ouput one part of the table at a time.
6032         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6033         the first part of the exception table and emit unwind directives.
6034         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6035         (i386_pe_seh_cold_init): Likewise.
6036         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6037         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6038         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6039         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6040         * config/i386/winnt.c: Include except.h.
6041         (struct seh_frame_state): Add reg_offset, after_prologue and
6042         in_cold_section fields.
6043         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6044         (i386_pe_seh_cold_init): New function.
6045         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6046         to seh->in_cold_section.
6047         (seh_emit_push): Record the offset of the push.
6048         (seh_emit_save): Record the offet of the save.
6049         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6050         Test seh->after_prologue to disregard the epilogue.
6051         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6052         (i386_pe_end_cold_function): New function.
6054 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6056         PR fortran/84565
6057         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6058         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6060         PR c++/84704
6061         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6062         on tmp_var.
6063         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6064         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6066         PR middle-end/84723
6067         * multiple_target.c: Include tree-inline.h and intl.h.
6068         (expand_target_clones): Diagnose and fail if node->definition and
6069         !tree_versionable_function_p (node->decl).
6071 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6073         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6074         sprint_ul.
6075         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6076         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6077         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6079 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6081         PR target/84710
6082         * combine.c (try_combine): Use reg_or_subregno instead of handling
6083         just paradoxical SUBREGs and REGs.
6085 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6087          * config/arc/arc.c (arc_finalize_pic): Remove function.
6088          (arc_must_save_register): We use single base PIC register, remove
6089          checks to save/restore the PIC register.
6090          (arc_expand_prologue): Likewise.
6091          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6092          Remove.
6093          (arc_verify_short): Likewise.
6094          (arc_attr_type): Likewise.
6095          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6096          (walk_stores): Likewise.
6097          (arc_address_cost): Make it static.
6098          (arc_verify_short): Likewise.
6099          (branch_dest): Likewise.
6100          (arc_attr_type): Likewise.
6101          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6102          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6103          (arc_final_prescan_insn): Remove inserting the nops due to
6104          hardware hazards.  It is done in reorg step.
6105          (insn_length_variant_t): Remove.
6106          (insn_length_parameters_t): Likewise.
6107          (arc_insn_length_parameters): Likewise.
6108          (arc_get_insn_variants): Likewise.
6109          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6111 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6113         PR inline-asm/84683
6114         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6115         assertion failure.
6117         PR tree-optimization/84687
6118         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6119         on new_node->decl.
6120         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6122 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6124         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6125         Rename to ppc_speculation_barrier.
6126         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6127         __builtin_ppc_speculation_barrier.
6129 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6131         PR target/84700
6132         * combine.c (combine_simplify_rtx): Don't try to simplify if
6133         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6134         are equal to x.
6136 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6138         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6139         to 32 bytes when compiling for POWER9.
6141 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6143         PR target/84564
6144         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6145         regparm >= 3 with no arg reg available also for calls with
6146         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6148         PR target/84524
6149         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6150         orig,vex.
6151         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6153 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6155         PR target/84264
6156         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6158 2018-03-05  Richard Biener  <rguenther@suse.de>
6160         PR tree-optimization/84486
6161         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6162         When inserting a __builtin_assume_aligned call set the LHS
6163         SSA name alignment info accordingly.
6165 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6167         PR tree-optimization/84114
6168         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6169         Avoid reassociation of FLOAT_MODE addition.
6171 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6173         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6174         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6175         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6176         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6177         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6178         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6179         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6180         and -mwbnoinvd.
6181         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6182         __builtin_ia32_wbinvd): New builtins.
6183         (SPECIAL_ARGS2): New.
6184         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6185         (SPECIAL_ARGS2): New.
6186         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6187         (ix86_valid_target_attribute_inner_p): Ditto.
6188         (ix86_init_mmx_sse_builtins): Add special_args2.
6189         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6190         TARGET_WBNOINVD_P): New.
6191         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6192         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6193         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6194         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6195         * config/i386/pconfigintrin.h: New file.
6196         * config/i386/wbnoinvdintrin.h: Ditto.
6197         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6198         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6200 2018-03-05  Richard Biener  <rguenther@suse.de>
6202         PR tree-optimization/84670
6203         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6204         member.
6205         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6206         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6207         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6208         doesn't grow if all successors (recursively) were visited at least
6209         once.
6211 2018-03-05  Richard Biener  <rguenther@suse.de>
6213         PR tree-optimization/84650
6214         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6215         if executed in the loop pipeline.
6217 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6219         * doc/configfiles.texi (Configuration Files): Move info about
6220         conditionalizing $target-protos.h to...
6221         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6222         differs from $target-protos.h.
6224 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6225             Chung-Ju Wu  <jasonwucj@gmail.com>
6227         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6228         * config/nds32/nds32-multiple.md (setmemsi): Define.
6229         * config/nds32/nds32-memory-manipulation.c
6230         (nds32_gen_dup_4_byte_to_word_value): New.
6231         (emit_setmem_word_loop): New.
6232         (emit_setmem_byte_loop): New.
6233         (nds32_expand_setmem_loop): New.
6234         (nds32_expand_setmem_loop_v3m): New.
6235         (nds32_expand_setmem_unroll): New.
6236         (nds32_expand_setmem): New.
6238 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6239             Chung-Ju Wu  <jasonwucj@gmail.com>
6241         * config/nds32/nds32-memory-manipulation.c
6242         (nds32_emit_load_store): New.
6243         (nds32_emit_post_inc_load_store): New.
6244         (nds32_emit_mem_move): New.
6245         (nds32_emit_mem_move_block): New.
6246         (nds32_expand_movmemsi_loop_unknown_size): New.
6247         (nds32_expand_movmemsi_loop_known_size): New.
6248         (nds32_expand_movmemsi_loop): New.
6249         (nds32_expand_movmemsi_unroll): New.
6250         (nds32_expand_movmemqi): Rename ...
6251         (nds32_expand_movmemsi): ... to this.
6252         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6253         (movmemsi): ... to this.
6254         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6255         (nds32_expand_movmemsi): ... to this.
6257 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6258             Monk Chiang  <sh.chiang04@gmail.com>
6259             Chung-Ju Wu  <jasonwucj@gmail.com>
6261         * config/nds32/nds32-protos.h
6262         (nds32_expand_load_multiple): New arguments.
6263         (nds32_expand_store_multiple): Ditto.
6264         (nds32_valid_multiple_load_store): Rename ...
6265         (nds32_valid_multiple_load_store_p): ... to this.
6266         * config/nds32/nds32-memory-manipulation.c
6267         (nds32_expand_load_multiple): Refine implementation.
6268         (nds32_expand_store_multiple): Ditto.
6269         * config/nds32/nds32-multiple.md
6270         (load_multiple): Update nds32_expand_load_multiple interface.
6271         (store_multiple): Update nds32_expand_store_multiple interface.
6272         * config/nds32/nds32-predicates.c
6273         (nds32_valid_multiple_load_store): Rename ...
6274         (nds32_valid_multiple_load_store_p): ... to this and refine
6275         implementation.
6276         * config/nds32/predicates.md
6277         (nds32_load_multiple_and_update_address_operation): New predicate.
6278         (nds32_store_multiple_and_update_address_operation): New predicate.
6280 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6281             Chung-Ju Wu  <jasonwucj@gmail.com>
6283         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6284         (combo): New attribute.
6285         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6287 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6289         * config/nds32/nds32.opt: Change -mcmodel= default value.
6291 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6292             Monk Chiang  <sh.chiang04@gmail.com>
6293             Chung-Ju Wu  <jasonwucj@gmail.com>
6295         * config/nds32/constants.md (unspec_element): New enum.
6296         * config/nds32/constraints.md (Umw): New constraint.
6297         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6298         * config/nds32/nds32-intrinsic.md: Likewise.
6299         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6300         (nds32_valid_smw_lwm_base_p): New.
6301         (nds32_output_smw_single_word): New.
6302         (nds32_output_lmw_single_word): New.
6303         (nds32_expand_unaligned_load): New.
6304         (nds32_expand_unaligned_store): New.
6305         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6306         (nds32_output_smw_single_word): Declare.
6307         (nds32_output_lmw_single_word): Declare.
6308         (nds32_expand_unaligned_load): Declare.
6309         (nds32_expand_unaligned_store): Declare.
6310         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6311         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6312         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6313         NDS32_BUILTIN_UASTORE_DW.
6314         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6315         predicate.
6317 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6318             Kito Cheng  <kito.cheng@gmail.com>
6319             Chung-Ju Wu  <jasonwucj@gmail.com>
6321         * config/nds32/nds32-intrinsic.c
6322         (nds32_expand_builtin_null_ftype_reg): Delete.
6323         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6324         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6325         (nds32_read_argument): New.
6326         (nds32_legitimize_target): Ditto.
6327         (nds32_legitimize_argument): Ditto.
6328         (nds32_check_constant_argument): Ditto.
6329         (nds32_expand_unop_builtin): Ditto.
6330         (nds32_expand_unopimm_builtin): Ditto.
6331         (nds32_expand_binop_builtin): Ditto.
6332         (nds32_builtin_decl_impl): Ditto.
6333         (builtin_description): Ditto.
6334         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6335         (nds32_init_builtins_impl): Ditto.
6336         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6337         (nds32_builtin_decl): New.
6338         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6339         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6341 2018-03-02  Jeff Law  <law@redhat.com>
6343         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6344         (redundant_insn, fill_simple_delay_slots): Likewise.
6345         (fill_slots_from_thread): Likewise.
6346         * resource.c (mark_referenced_resources): Likewise.
6347         (mark_set_resources, find_dead_or_set_registers): Likewise.
6349 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6351         * substring-locations.h (format_warning_va): Formatting fix for
6352         ATTRIBUTE_GCC_DIAG.
6353         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6354         argument.
6355         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6356         * substring-locations.c: Include intl.h.
6357         (format_warning_va): Turned into small wrapper around
6358         format_warning_n_va, renamed to ...
6359         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6360         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6361         use ngettext.
6362         (format_warning_at_substring_n): New function.
6363         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6364         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6365         format_warning_at_substring with just a shorter name instead of
6366         const function pointer.
6367         (fmtwarn_n): New function.
6368         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6369         appropriate, get rid of all the fmtstr temporaries, move conditionals
6370         with G_() wrapped string literals directly into fmtwarn arguments,
6371         cast dir.len to (int), formatting fixes.
6373 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6375         * doc/invoke.texi: Remove "Cilk Plus" references.
6377 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6378             Richard Biener  <rguenther@suse.de>
6380         PR ipa/84628
6381         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6382         for error or warning attributes if CALL_FROM_THUNK_P is set.
6383         Formatting fixes.
6385 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6387         PR target/56540
6388         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6389         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6391         PR target/56540
6392         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6393         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6395         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6396         instead of -1U in last predictors element's probability member.
6398 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6400         PR ipa/83983
6401         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6402         arguments if they are comparable.
6404 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6406         PR tree-optimization/84634
6407         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6408         masks and masked_loop_p with a single loop_masks, making sure it's
6409         null for bb vectorization.
6411 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6413         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6414         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6415         loop->force_vectorize to check whether there is no alias.
6417 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6419         PR target/84614
6420         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6421         prototypes.
6422         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6423         comments.
6424         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6425         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6426         instead of a loop around prev_real_insn.
6427         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6428         prev_real_insn.
6430         PR inline-asm/84625
6431         * config/i386/i386.c (ix86_print_operand): Use conditional
6432         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6433         zero vector.
6435 2018-03-02  Richard Biener  <rguenther@suse.de>
6437         PR tree-optimization/84427
6438         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6439         (bitmap_set_subtract_values): Rewrite to handle multiple
6440         exprs per value.
6441         (clean): Likewise.
6442         (prune_clobbered_mems): Likewise.
6443         (phi_translate): Take edge instead of pred/phiblock.
6444         (phi_translate_1): Likewise.
6445         (phi_translate_set): Likewise.  Insert all translated
6446         exprs for a value into the set, keeping possibly multiple
6447         expressions per value.
6448         (compute_antic_aux): Adjust for phi_translate changes.
6449         When intersecting union the expressions and prune those
6450         not in the final value set, keeping possibly multiple
6451         expressions per value.  Do not use value-insertion
6452         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6453         all expressions.  Add verification that the value-sets
6454         only shrink during iteration.
6455         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6456         (do_pre_regular_insertion): Likewise.
6457         (do_pre_partial_partial_insertion): Likewise.
6459 2018-03-02  Richard Biener  <rguenther@suse.de>
6461         PR target/82005
6462         * config/darwin.c (saved_debug_info_level): New static global.
6463         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6464         (darwin_asm_lto_end): Restore debug info generation settings.
6466 2018-03-01  Martin Liska  <mliska@suse.cz>
6468         PR sanitizer/82484
6469         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6470         volatile arguments.
6472 2018-03-01  Richard Biener  <rguenther@suse.de>
6474         PR debug/84645
6475         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6476         type annotation with LTO when debug was disabled at compile-time.
6478 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6480         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6481         XINT with INTVAL.
6482         (mips_final_postscan_insn): Likewise.
6484 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6486         PR rtl-optimization/84528
6487         * alias.c (init_alias_target): Add commentary.
6488         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6489         a unique base value if the frame pointer is not eliminated
6490         to the stack pointer.
6492 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6494         PR rtl-optimization/83327
6495         * lra-int.h (hard_regs_spilled_into): Declare.
6496         * lra.c (hard_regs_spilled_into): Define.
6497         (init_reg_info): Init hard_regs_spilled_into.
6498         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6499         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6500         (process_bb_lives): Handle hard_regs_spilled_into.
6501         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6502         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6504 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6506         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6507         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6508         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6509         * config/rs6000/aix72.h: New file.
6511 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6513         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6514         instead of warning_at with conditional singular and plural messages
6515         where possible.
6517         PR target/52991
6518         * stor-layout.c (update_alignment_for_field): For
6519         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6520         && !DECL_PACKED (field), do the alignment update, just use
6521         only desired_align instead of MAX (type_align, desired_align)
6522         as the alignment.
6523         (place_field): Don't do known_align < desired_align handling
6524         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6525         is non-NULL, instead do it after rli->prev_field handling and
6526         only if not within a bitfield word.  For DECL_PACKED (field)
6527         use type_align of BITS_PER_UNIT.
6529 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6531         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6532         superfluous parentheses and trailing spaces.
6534 2018-02-28  Richard Biener  <rguenther@suse.de>
6536         PR tree-optimization/84584
6537         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6538         SCoPs with fake exit edge.
6540 2018-02-28  Martin Liska  <mliska@suse.cz>
6542         PR testsuite/84597
6543         * timevar.c (timer::print): Fix format to properly print 100%
6544         values.
6546 2018-02-28  Richard Biener  <rguenther@suse.de>
6548         PR middle-end/84607
6549         * genmatch.c (capture_info::walk_match): Do not mark
6550         captured expressions without operands as expr_p given
6551         they act more like predicates and should be subject to
6552         "lost tail" side-effect preserving.
6554 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6556         PR rtl-optimization/81611
6557         * auto-inc-dec.c (attempt_change): Move dead note from
6558         mem_insn if it's the next use of regno
6559         (find_address): Take address use of reg holding
6560         non-incremented value.  Add parm to limit search to the named
6561         reg only.
6562         (merge_in_block): Attempt to use a mem insn that is the next
6563         use of the original regno.
6565 2018-02-27  Martin Sebor  <msebor@redhat.com>
6567         PR c++/83871
6568         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6569         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6571 2018-02-27  Martin Sebor  <msebor@redhat.com>
6573         PR translation/84207
6574         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6575         n argument to unsigned HOST_WIDE_INT.
6576         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6577         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6578         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6579         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6581 2018-02-27  Richard Biener  <rguenther@suse.de>
6583         PR tree-optimization/84512
6584         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6585         Do not use the estimate returned from record_stmt_cost for
6586         the scalar iteration cost but sum properly using add_stmt_cost.
6588 2018-02-27  Richard Biener  <rguenther@suse.de>
6590         PR tree-optimization/84466
6591         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6592         Adjust last change to less strictly validate use operands.
6594 2018-02-27  Martin Liska  <mliska@suse.cz>
6596         PR gcov-profile/84548
6597         * gcov.c (process_file): Allow partial overlap and consider it
6598         also as group functions.
6599         (output_lines): Properly calculate range of lines for a group.
6601 2018-02-27  Martin Liska  <mliska@suse.cz>
6603         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6604         'ggc' suffixes.  Change first column width.
6605         (timer::print): Fix formatting of the column.
6607 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6609         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6610         preserve inline entry blocks for the sake of debug inline
6611         entry point markers alone.
6612         (remove_unused_locals): Suggest in comments a better place to
6613         force the preservation of inline entry blocks that are
6614         otherwise unused, but do not preserve them.
6616 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6618         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6620 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6622         PR target/84039
6623         * config/i386/constraints.md (Bs): Replace
6624         ix86_indirect_branch_register with
6625         TARGET_INDIRECT_BRANCH_REGISTER.
6626         (Bw): Likewise.
6627         * config/i386/i386.md (indirect_jump): Likewise.
6628         (tablejump): Likewise.
6629         (*sibcall_memory): Likewise.
6630         (*sibcall_value_memory): Likewise.
6631         Peepholes of indirect call and jump via memory: Likewise.
6632         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6633         (*sibcall_value_GOT_32): Likewise.
6634         * config/i386/predicates.md (indirect_branch_operand): Likewise.
6635         (GOT_memory_operand): Likewise.
6636         (call_insn_operand): Likewise.
6637         (sibcall_insn_operand): Likewise.
6638         (GOT32_symbol_operand): Likewise.
6639         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6641 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6643         PR rtl-optimization/83496
6644         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
6645         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
6646         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
6647         redundant insn, if any.
6648         (relax_delay_slots): Likewise.
6649         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
6651 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
6653         PR tree-optimization/83965
6654         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
6655         that grouped statements are part of a reduction chain.  Return
6656         true if the statement is not marked as a reduction itself but
6657         is part of a group.
6658         (vect_recog_dot_prod_pattern): Don't check whether the statement
6659         is part of a group here.
6660         (vect_recog_sad_pattern): Likewise.
6661         (vect_recog_widen_sum_pattern): Likewise.
6663 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6665         PR debug/84545
6666         * final.c (rest_of_clean_state): Also look for calls inside sequences.
6668 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6670         PR target/84530
6671         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
6672         the bool argument.
6673         (ix86_output_indirect_function_return): New prototype.
6674         (ix86_split_simple_return_pop_internal): Likewise.
6675         * config/i386/i386.c (indirect_return_via_cx): New.
6676         (indirect_return_via_cx_bnd): Likewise.
6677         (indirect_thunk_name): Handle return va CX_REG.
6678         (output_indirect_thunk_function): Create alias for
6679         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
6680         (ix86_output_indirect_jmp): Remove the bool argument.
6681         (ix86_output_indirect_function_return): New function.
6682         (ix86_split_simple_return_pop_internal): Likewise.
6683         * config/i386/i386.md (*indirect_jump): Don't pass false
6684         to ix86_output_indirect_jmp.
6685         (*tablejump_1): Likewise.
6686         (simple_return_pop_internal): Change it to define_insn_and_split.
6687         Call ix86_split_simple_return_pop_internal to split it for
6688         -mfunction-return=.
6689         (simple_return_indirect_internal): Call
6690         ix86_output_indirect_function_return instead of
6691         ix86_output_indirect_jmp.
6693 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
6695         PR bootstrap/84405
6696         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6697         memset and value initialization afterwards.
6699 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
6701         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6703 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6705         PR target/84521
6706         * common/config/aarch64/aarch64-common.c
6707         (aarch_option_optimization_table[]): Switch
6708         off fomit-frame-pointer
6710 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6711             Chung-Ju Wu  <jasonwucj@gmail.com>
6713         * config/nds32/nds32-multiple.md (load_multiple): Disallow
6714         volatile memory.
6715         (store_multiple): Ditto.
6717 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6719         * config.gcc: Add --with-cpu support for nds32 target.
6720         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6721         * config/nds32/nds32.opt: Add -mcpu= option.
6723 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
6725         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6726         isel=yes): Warn for these deprecated options.
6728 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
6730         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6731         ISA_2_5_MASKS_EMBEDDED.
6733 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
6735         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6736         p->max as pointers rather than using iterative_hash_expr.
6738 2018-02-23  Carl Love  <cel@us.ibm.com>
6740         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6741         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6742         BU_P8V_OVERLOAD_2.
6743         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6744         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6745         P8V_BUILTIN_VEC_VUNSIGNED2.
6747 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
6749         PR target/81572
6750         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6751         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6752         LRA_UNKNOWN_ALT.
6753         * lra-constraints.c (curr_insn_transform): Set up
6754         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
6755         LRA_UNKNOWN_ALT.
6756         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6757         * lra-eliminations.c (spill_pseudos): Ditto.
6758         (process_insn_for_elimination): Ditto.
6759         * lra-lives.c (reg_early_clobber_p): Use the new macros.
6760         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6761         LRA_NON_CLOBBERED_ALT.
6763 2018-02-22  Martin Sebor  <msebor@redhat.com>
6765         PR tree-optimization/84480
6766         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6767         to maybe_diag_stxncpy_trunc.  Call it.
6768         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6769         from gimple_fold_builtin_strcpy.  Print inlining stack.
6770         (handle_builtin_stxncpy): Print inlining stack.
6771         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6773 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
6775         PR target/84176
6776         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6777         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6778         and -fcheck-pointer-bounds are used together.
6779         (indirect_thunk_prefix): New enum.
6780         (indirect_thunk_need_prefix): New function.
6781         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
6782         "_nt" instead of "_bnd" for NOTRACK prefix.
6783         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6784         (output_indirect_thunk_function): Likewise.
6785         (): Likewise.
6786         (ix86_code_end): Update output_indirect_thunk_function calls.
6787         (ix86_output_indirect_branch_via_reg): Replace
6788         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6789         (ix86_output_indirect_branch_via_push): Likewise.
6790         (ix86_output_function_return): Likewise.
6791         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6792         incompatible with -fcf-protection=branch and
6793         -fcheck-pointer-bounds.
6795 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6797         PR target/83335
6798         * config/aarch64/aarch64.c (aarch64_print_address_internal):
6799         Change gcc_assert call to output_operand_lossage.
6801 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6803         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6805 2018-02-22  DJ Delorie  <dj@redhat.com>
6806             Sebastian Perta  <sebastian.perta@renesas.com>
6807             Oleg Endo  <olegendo@gcc.gnu.org>
6809         * config/rx/rx.c (rx_rtx_costs): New function.
6810         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6812 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6814         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6816 2018-02-22  Martin Liska  <mliska@suse.cz>
6818         PR driver/83193
6819         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6820         Add "native" as a possible value.
6822 2018-02-22  Martin Liska  <mliska@suse.cz>
6824         PR driver/83193
6825         * config/i386/i386.c (ix86_option_override_internal):
6826         Add "native" as a possible value for -march and -mtune.
6828 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
6830         PR target/84502
6831         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6832         to all type variants.
6834         PR tree-optimization/84503
6835         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6836         width as info->bitpos + info->bitsize - start.
6837         (merged_store_group::merge_overlapping): Simplify width computation.
6838         (check_no_overlap): New function.
6839         (imm_store_chain_info::try_coalesce_bswap): Compute expected
6840         start + width and last_order of the group, fail if check_no_overlap
6841         fails.
6842         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6843         to group if check_no_overlap fails.
6845 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6847         * config/rs6000/altivec.md: Delete contraint arguments to
6848         define_expand, define_split, and define_peephole2, and in
6849         define_insn_and_split if always unused.
6850         * config/rs6000/darwin.md: Ditto.
6851         * config/rs6000/dfp.md: Ditto.
6852         * config/rs6000/rs6000.md: Ditto.
6853         * config/rs6000/sync.md: Ditto.
6854         * config/rs6000/vector.md: Ditto.
6855         * config/rs6000/vsx.md: Ditto.
6857 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6859         * config/rs6000/altivec.md: Write output control strings as braced
6860         blocks instead of double-quoted strings.
6861         * config/rs6000/darwin.md: Ditto.
6862         * config/rs6000/rs6000.md: Ditto.
6863         * config/rs6000/vector.md: Ditto.
6864         * config/rs6000/vsx.md: Ditto.
6866 2018-02-21  Jason Merrill  <jason@redhat.com>
6868         PR c++/84314 - ICE with templates and fastcall attribute.
6869         * attribs.c (build_type_attribute_qual_variant): Remove assert.
6871 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6873         * ipa-cp.c (determine_versionability): Fix comment typos.
6875 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6877         PR c/84229
6878         * ipa-cp.c (determine_versionability): Do not version functions caling
6879         va_arg_pack.
6881 2018-02-21  Martin Liska  <mliska@suse.cz>
6883         PR driver/83193
6884         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
6885         Add "native" as a possible value.
6886         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
6887         the macro when native cpu detection is available.
6889 2018-02-21  Martin Liska  <mliska@suse.cz>
6891         PR driver/83193
6892         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
6893         Add "native" as a possible value.
6894         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
6895         when native cpu detection is available.
6897 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
6898             Martin Sebor  <msebor@redhat.com>
6900         PR tree-optimization/84478
6901         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
6902         false.
6903         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
6904         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
6905         support which is conservatively correct, for 2 only stay conservative
6906         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
6907         argument to the 2 argument get_range_strlen, adjust 6 arg
6908         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
6909         false.
6910         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
6911         (gimple_fold_builtin_strlen): Pass true as last argument to
6912         get_range_strlen.
6914 2018-02-20  Martin Sebor  <msebor@redhat.com>
6916         PR middle-end/84095
6917         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
6918         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
6919         (builtin_memref::builtin_memref): Factor out parts into
6920         set_base_and_offset and call it.
6922 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
6924         PR middle-end/84406
6925         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
6926         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
6927         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
6928         search at the associated MODE_INT.
6930 2018-02-20  Jeff Law  <law@redhat.com>
6932         PR middle-end/82123
6933         PR tree-optimization/81592
6934         PR middle-end/79257
6935         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
6936         for range data rather than using global data.
6937         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
6938         range data rather than using global data.
6939         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
6940         pass it to children as needed.
6941         (struct directive::fmtresult): Similarly.
6942         (struct directive::set_width): Similarly.
6943         (struct directive::set_precision): Similarly.
6944         (format_integer, format_directive, parse_directive): Similarly.
6945         (format_none): Accept unnamed vr_values parameter.
6946         (format_percent, format_floating, format_character): Similarly.
6947         (format_string, format_plain): Similarly.
6948         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
6949         the EVRP range analyzer for range data rather than using global data.
6950         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
6951         gimple-ssa-evrp-analyze.h
6952         (class sprintf_dom_walker): Add after_dom_children member function.
6953         Add evrp_range_analyzer member.
6954         (sprintf_dom_walker::before_dom_children): Call into the EVRP
6955         range analyzer as needed.
6956         (sprintf_dom_walker::after_dom_children): New member function.
6957         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
6958         if not optimizing.
6959         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
6960         (evrp_range_analyzer::pop_to_marker): Likewise.
6962 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
6964         PR tree-optimization/84419
6965         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
6966         with the required type if its current type is compatible but
6967         different.
6969 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
6971         PR middle-end/82004
6972         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
6973         after vectorization.
6975 2018-02-20  Martin Liska  <mliska@suse.cz>
6977         PR driver/83193
6978         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
6979         possible values if we don't have a hint.
6981 2018-02-20  Martin Liska  <mliska@suse.cz>
6983         PR c/84310
6984         PR target/79747
6985         * final.c (shorten_branches): Build align_tab array with one
6986         more element.
6987         * opts.c (finish_options): Add alignment option limit check.
6988         (MAX_CODE_ALIGN): Likewise.
6989         (MAX_CODE_ALIGN_VALUE): Likewise.
6990         * doc/invoke.texi: Document maximum allowed option value for
6991         all -falign-* options.
6993 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
6995         PR target/84146
6996         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
6997         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
6998         * var-tracking.c (emit_note_insn_var_location): Remove all references
6999         to NOTE_INSN_CALL_ARG_LOCATION.
7000         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7001         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7002         Use copy_rtx_if_shared.
7003         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7004         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7005         (dwarf2out_var_location): Remove handling of
7006         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7007         on call_insn.
7008         * final.c (final_scan_insn): Remove all references to
7009         NOTE_INSN_CALL_ARG_LOCATION.
7010         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7011         before dumping final insns.
7012         * except.c (emit_note_eh_region_end): Remove all references to
7013         NOTE_INSN_CALL_ARG_LOCATION.
7014         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7015         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7016         * config/arc/arc.c (hwloop_optimize): Likewise.
7017         * config/arm/arm.c (create_fix_barrier): Likewise.
7018         * config/s390/s390.c (s390_chunkify_start): Likewise.
7019         * config/sh/sh.c (find_barrier): Likewise.
7020         * config/i386/i386.c (rest_of_insert_endbranch,
7021         ix86_seh_fixup_eh_fallthru): Likewise.
7022         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7023         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7024         * config/frv/frv.c (frv_function_prologue): Likewise.
7025         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7026         reg note.
7027         (note_outside_basic_block_p): Remove all references to
7028         NOTE_INSN_CALL_ARG_LOCATION.
7029         * gengtype.c (adjust_field_rtx_def): Likewise.
7030         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7031         Likewise.
7032         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7033         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7035         PR c++/84444
7036         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7037         is ADDR_EXPR.
7039         PR tree-optimization/84452
7040         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7041         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7042         is NULL.
7044 2018-02-19  Martin Liska  <mliska@suse.cz>
7046         PR sanitizer/82183
7047         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7049 2018-02-19  Martin Liska  <mliska@suse.cz>
7050             Richard Sandiford  <richard.sandiford@linaro.org>
7052         PR tree-optimization/82491
7053         * gimple-fold.c (get_base_constructor): Make earlier bail out
7054         to prevent ubsan.
7056 2018-02-19  Carl Love  <cel@us.ibm.com>
7058         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7059         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7060         BU_P8V_OVERLOAD_1.
7061         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7062         P8V_BUILTIN_VEC_NEG.
7064 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7066         * config/rl78/rl78.md (movdf): New define expand.
7068 2018-02-19  Martin Liska  <mliska@suse.cz>
7070         PR other/80589
7071         * doc/invoke.texi: Fix typo.
7072         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7074 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7076         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7077         handle rs6000_single_float and rs6000_double_float specially for
7078         e500 family CPUs.
7080 2018-02-16  Jeff Law  <law@redhat.com>
7082         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7083         (pop_regs): Use it.
7085 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7087         PR ipa/84425
7088         * ipa-inline.c (inline_small_functions): Fix a typo.
7090 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7092         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7094 2018-02-16  Carl Love  <cel@us.ibm.com>
7096         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7097         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7098         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7099         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7100         expansion to P8V_BUILTIN_VEC_FLOAT2.
7102 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7104         PR rtl-optimization/70023
7105         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7106         src_regno into account.
7108 2018-02-16  Carl Love  <cel@us.ibm.com>
7110         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7111         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7112         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7113         * config/rs6000/rs6000.c: Remove case statements for
7114         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7115         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7116         and P9V_BUILTIN_VEC_VINSERT4B.
7117         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7118         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7119         * config/rs6000/vsx.md:
7120         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7121         vec_insert4b.
7123 2018-02-16  Carl Love  <cel@us.ibm.com>
7125         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7126         vec_insert4b.
7127         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7128         definitions.
7129         * config/rs6000/rs6000-c.c: Add the definitions for
7130         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7131         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7132         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7133         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7134         definition for insert4b and define insn *insert3b_internal.
7135         * doc/extend.texi: Add documentation for vec_extract4b.
7137 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7139         * doc/extend.texi (Backwards Compatibility): Mention friend
7140         injection.  Note for-scope is deprecated.
7141         * doc/invoke.texi (-ffriend-injection): Deprecate.
7143 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7145         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7146         that moved to I2, also allow destinations that are a paradoxical
7147         subreg (instead of a normal reg).
7149 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7151         PR target/83831
7152         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7153         to QImode.
7155 2018-02-16  Richard Biener  <rguenther@suse.de>
7157         PR tree-optimization/84037
7158         PR tree-optimization/84016
7159         PR target/82862
7160         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7161         Adjust vec_construct for the fact we need additional higher latency
7162         128bit inserts for AVX256 and AVX512 vector builds.
7163         (ix86_add_stmt_cost): Scale vector construction cost for
7164         elementwise loads.
7166 2018-02-16  Richard Biener  <rguenther@suse.de>
7168         PR tree-optimization/84417
7169         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7170         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7171         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7173 2018-02-16  Martin Liska  <mliska@suse.cz>
7175         PR sanitizer/84307
7176         * internal-fn.def (ASAN_CHECK): Set proper flags.
7177         (ASAN_MARK): Likewise.
7179 2018-02-16  Julia Koval  <julia.koval@intel.com>
7181         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7182         from PTA_CANNONLAKE.
7184 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7186         PR target/84272
7187         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7188         Use ++iter rather than iter++ for std::list iterators.
7189         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7190         defer deleting them until all nodes in the forest are processed.  Do
7191         free even leaf nodes.  Change to_process into auto_vec.
7193         PR bootstrap/84405
7194         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7195         * vec.h (vec_default_construct): Use memset instead of placement new
7196         if BROKEN_VALUE_INITIALIZATION is defined.
7197         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7198         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7199         is defined.
7201         PR rtl-optimization/83723
7202         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7203         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7204         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7205         recursive calls.
7206         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7207         callers.
7208         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7210 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7212         PR rtl-optimization/81443
7213         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7214         from inner REGs to paradoxical SUBREGs.
7216 2018-02-16  Richard Biener  <rguenther@suse.de>
7218         PR tree-optimization/84399
7219         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7220         For operands we can analyze at their definition make sure we can
7221         analyze them at each use as well.
7223 2018-02-16  Richard Biener  <rguenther@suse.de>
7225         PR tree-optimization/84190
7226         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7227         volatile accesses if the decl isn't volatile.
7229 2018-02-15  Jason Merrill  <jason@redhat.com>
7231         PR c++/84314 - ICE with templates and fastcall attribute.
7232         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7233         TYPE_CANONICAL on an existing type.
7235 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7237         PR tree-optimization/84383
7238         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7239         dstoff nor call operand_equal_p if dstbase is NULL.
7241         PR tree-optimization/84334
7242         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7243         also a CONSTANT_CLASS_P, punt.
7245 2018-02-14  Jim Wilson  <jimw@sifive.com>
7247         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7248         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7249         to where locals are set.  Add TARGET_RVC support.
7250         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7252 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7254         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7256 2018-02-14  Martin Sebor  <msebor@redhat.com>
7258         PR tree-optimization/83698
7259         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7260         arrays constrain the offset range to their bounds.
7261         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7262         (builtin_access::overlap): Avoid setting the size of overlap if it's
7263         already been set.
7264         (maybe_diag_overlap): Also consider arrays when deciding what values
7265         of offsets to include in diagnostics.
7267 2018-02-14  Martin Sebor  <msebor@redhat.com>
7269         PR c/84108
7270         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7271         that correspond to the kind of a declaration.
7273 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7275         PR target/83984
7276         * config/pa/pa.md: Load address of PIC label using the linkage table
7277         if the label is nonlocal.
7279 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7281         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7282         warning message if user requests -maltivec=be.
7283         * doc/invoke.texi: Document deprecation of -maltivec=be.
7285 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7287         PR target/84220
7288         * config/rs6000/rs6000-c.c: Update definitions for
7289         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7290         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7292 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7294         PR target/84239
7295         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7296         add _get_ssp intrinsics. Remove argument from
7297         __builtin_ia32_rdssp[d|q].
7298         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7299         * config/i386/i386-builtin.def: Remove argument from
7300         __builtin_ia32_rdssp[d|q].
7301         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7302         ix86_expand_special_args_builtin for _rdssp[d|q].
7303         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7304         Clear register before usage.
7305         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7306         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7308 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7310         PR tree-optimization/84357
7311         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7312         operand 1 of an ARRAY_REF too.
7314 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7316         PR target/83831
7317         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7318         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7319         declarations.
7320         (set_of_reg): New struct.
7321         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7322         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7323         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7324         functions.
7325         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7326         Split into bitclr, bitset, bitinvert patterns if appropriate.
7327         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7328         use rx_fuse_in_memory_bitop.
7329         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7330         to named insn, correct maximum insn length.
7332 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7334         PR target/79242
7335         * machmode.def: Define a complex mode for PARTIAL_INT.
7336         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7337         MODE_PARTIAL_INT.
7338         * doc/rtl.texi: Document CSPImode.
7339         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7340         handling.
7341         (msp430_hard_regno_nregs_with_padding): Likewise.
7343 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7345         PR target/84279
7346         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7348 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7350         PR rtl-optimization/84169
7351         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7352         we generated a parallel as new i3 and we split that to new i2 and i3
7353         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7354         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7355         those to i2, not i1.  Partially rewrite this scan code.
7357 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7359         PR c/82210
7360         * stor-layout.c (place_field): For variable length fields, adjust
7361         offset_align afterwards not just based on the field's alignment,
7362         but also on the size.
7364         PR middle-end/84309
7365         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7366         of exps and logs in the use_exp2 case.
7368 2018-02-13  Jeff Law  <law@redhat.com>
7370         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7371         entry for "vector".
7373         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7374         ARGS as unused.
7376 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7378         PR debug/84342
7379         PR debug/84319
7380         * common.opt (gas-loc-support, gas-locview-support): New.
7381         (ginline-points, ginternal-reset-location-views): New.
7382         * doc/invoke.texi: Document them.  Use @itemx where intended.
7383         (gvariable-location-views): Adjust.
7384         * target.def (reset_location_view): New.
7385         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7386         (TARGET_RESET_LOCATION_VIEW): New.
7387         * doc/tm.texi: Rebuilt.
7388         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7389         (dwarf2out_default_as_locview_support): New.
7390         (output_asm_line_debug_info): Use option variables.
7391         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7392         (output_loc_list): Likewise.
7393         (add_high_low_attributes): Check option variables.
7394         Don't output entry view attribute in strict mode.
7395         (gen_inlined_subroutine_die): Check option variables.
7396         (dwarf2out_inline_entry): Likewise.
7397         (init_sections_and_labels): Likewise.
7398         (dwarf2out_early_finish): Likewise.
7399         (maybe_reset_location_view): New, from...
7400         (dwarf2out_var_location): ... here.  Call it.
7401         * debug.h (dwarf2out_default_as_loc_support): Declare.
7402         (dwarf2out_default_as_locview_support): Declare.
7403         * hooks.c (hook_int_rtx_insn_0): New.
7404         * hooks.h (hook_int_rtx_insn_0): Declare.
7405         * toplev.c (process_options): Take -gas-loc-support and
7406         -gas-locview-support from dwarf2out.  Enable
7407         -gvariable-location-views by default only with locview
7408         assembler support.  Enable -ginternal-reset-location-views by
7409         default only if the target defines the corresponding hook.
7410         Enable -ginline-points by default if location views are
7411         enabled; force it disabled if statement frontiers are
7412         disabled.
7413         * tree-inline.c (expand_call_inline): Check option variables.
7414         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7416 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7418         PR tree-optimization/84321
7419         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7420         handling.  Also check whether the anti-range contains any values
7421         that satisfy the mask; switch to a VR_RANGE if not.
7423 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7425         PR sanitizer/84340
7426         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7428 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7430         PR c++/83990
7431         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7432         of call statements, also set location of a load to a temporary.
7434 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7436         * config/rl78/rl78.c (add_vector_labels): New function.
7437         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7438         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7439         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7440         which checks that no arguments are passed.
7441         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7442         * doc/extend.texi: Documentation for the new attribute.
7444 2018-02-13  Andreas Schwab  <schwab@suse.de>
7446         * config/riscv/linux.h (CPP_SPEC): Define.
7448 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7450         PR target/84335
7451         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7452         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7453         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7454         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7455         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7456         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7457         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7458         temporarily for AES and PCLMUL builtins.
7460         PR tree-optimization/84339
7461         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7462         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7463         Formatting fixes.
7465         PR middle-end/84309
7466         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7467         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7468         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7469         inline function.
7470         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7471         inline function.
7472         * omp-simd-clone.h: New file.
7473         * omp-simd-clone.c: Include omp-simd-clone.h.
7474         (expand_simd_clones): No longer static.
7475         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7476         cgraph.h and omp-simd-clone.h.
7477         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7478         (vect_recog_widen_shift_pattern): Formatting fix.
7479         (vect_pattern_recog_1): Don't check optab for calls.
7481         PR target/84336
7482         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7483         operands[2] into a REG before using gen_lowpart on it.
7485 2018-02-12  Jeff Law  <law@redhat.com>
7487         PR target/83760
7488         * config/sh/sh.c (find_barrier): Consider a sibling call
7489         a barrier as well.
7491         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7492         successfully back substituting a reg.
7494 2018-02-12  Richard Biener  <rguenther@suse.de>
7496         PR tree-optimization/84037
7497         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7498         parameter, move visited init to caller.
7499         (vect_slp_analyze_operations): Separate cost from validity
7500         check, initialize visited once for all instances.
7501         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7502         for all instances.
7503         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7504         out an assert.
7505         (vect_model_promotion_demotion_cost): Likewise.
7506         (vectorizable_bswap): Guard cost modeling with !slp_node
7507         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7508         SLP stmts.
7509         (vectorizable_call): Likewise.
7510         (vectorizable_conversion): Likewise.
7511         (vectorizable_assignment): Likewise.
7512         (vectorizable_shift): Likewise.
7513         (vectorizable_operation): Likewise.
7514         (vectorizable_store): Likewise.
7515         (vectorizable_load): Likewise.
7516         (vectorizable_condition): Likewise.
7517         (vectorizable_comparison): Likewise.
7519 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7521         PR sanitizer/84307
7522         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7523         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7524         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7526 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7528         PR middle-end/83665
7529         * params.def (inline-min-speedup): Increase from 8 to 15.
7530         (max-inline-insns-auto): Decrease from 40 to 30.
7531         * ipa-split.c (consider_split): Add some buffer for function to
7532         be considered inlining candidate.
7533         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7534         default values.
7536 2018-02-12  Richard Biener  <rguenther@suse.de>
7538         PR tree-optimization/84037
7539         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7540         matched stmts if we cannot swap the non-matched ones.
7542 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7544         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7545         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7546         _mm_maskz_scalef_round_ss): New intrinsics.
7547         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7548         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7549         __builtin_ia32_scalefss_round): Remove.
7550         (__builtin_ia32_scalefsd_mask_round,
7551         __builtin_ia32_scalefss_mask_round): New intrinsics.
7552         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7553         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7554         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7555         "<round_constraint>")): Changed to ...
7556         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7557         "<round_scalar_constraint>")): ... this.
7558         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7559         %0, %1, %2<round_op3>}"): Changed to ...
7560         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7561         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7562         %2<round_scalar_mask_op3>}"): ... this.
7563         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7565 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7567         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7568         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7569         (_mm_maskz_sqrt_round_ss): New intrinsics.
7570         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7571         (__builtin_ia32_sqrtsd_mask_round)
7572         (__builtin_ia32_sqrtss_mask_round): New builtins.
7573         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7574         (__builtin_ia32_sqrtss_round): Remove.
7575         (__builtin_ia32_sqrtsd_mask_round)
7576         (__builtin_ia32_sqrtss_mask_round): New builtins.
7577         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7578         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7579         ((match_operand:VF_128 1 "vector_operand"
7580         "xBm,<round_constraint>")): Changed to ...
7581         ((match_operand:VF_128 1 "vector_operand"
7582         "xBm,<round_scalar_constraint>")): ... this.
7583         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7584         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7585         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7586         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7587         %<iptr>1<round_scalar_mask_op3>}): ... this.
7588         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7589         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7591 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7593         PR target/84266
7594         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7595         Cast vec_cmpeq result to correct type.
7596         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7597         Cast vec_cmpgt result to correct type.
7599 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7601         * final.c (final_scan_insn_1): Renamed from...
7602         (final_scan_insn): ... this.  New wrapper, to recover
7603         seen from the outermost call in recursive ones.
7604         * config/sparc/sparc.c (output_return): Drop seen from call.
7605         (output_sibcall): Likewise.
7606         * config/visium/visium.c (output_branch): Likewise.
7608 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7610         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7611         function label.
7613 2018-02-10  Alan Modra  <amodra@gmail.com>
7615         PR target/84300
7616         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7617         Specify LR as an input.
7619 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7621         PR sanitizer/83987
7622         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7623         remove_member_access_dummy_vars): New functions.
7624         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7625         lower_omp_1, execute_lower_omp): Use them.
7627         PR rtl-optimization/84308
7628         * shrink-wrap.c (spread_components): Release todo vector.
7630 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7632         PR rtl-optimization/57193
7633         * ira-color.c (struct allocno_color_data): Add member
7634         conflict_allocno_hard_prefs.
7635         (update_conflict_allocno_hard_prefs): New.
7636         (bucket_allocno_compare_func): Add a preference based on
7637         conflict_allocno_hard_prefs.
7638         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7639         (color_allocnos): Remove a dead code.  Initiate
7640         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
7642 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7644         PR target/84226
7645         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
7646         constraint from =wa to wa.  Avoid a subreg on the output operand,
7647         instead use a pseudo and subreg it in a move.
7648         (p9_xxbrd_<mode>): Changed to ...
7649         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
7650         (p9_xxbrd_v2df): New expander.
7651         (p9_xxbrw_<mode>): Changed to ...
7652         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
7653         (p9_xxbrw_v4sf): New expander.
7655 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7657         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
7659 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
7661         PR target/83926
7662         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
7663         multiply in 32-bit mode.
7664         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
7665         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
7666         mode.
7668 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7670         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
7671         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
7672         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
7673         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
7675 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
7677         PR lto/84213
7678         * dwarf2out.c (is_trivial_indirect_ref): New function.
7679         (dwarf2out_late_global_decl): Do not generate a location
7680         attribute for variables that have a non-trivial DECL_VALUE_EXPR
7681         and that are not defined in the current unit.
7683 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7685         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
7686         instead of a libcall for UNORDERED.
7688 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
7690         PR target/82641
7691         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7692         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7694 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7696         PR target/PR84295
7697         * config/s390/s390.c (s390_set_current_function): Invoke
7698         s390_indirect_branch_settings also if fndecl didn't change.
7700 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7702         * config/rs6000/rs6000.md (blockage): Set length to zero.
7704 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7706         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7708 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7710         PR sanitizer/84285
7711         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7712         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7713         -static-lib*san.
7715         PR debug/84252
7716         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7717         PARALLEL incoming that failed vt_get_decl_and_offset check.
7719         PR middle-end/84237
7720         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7721         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7722         TREE_READONLY bit.
7723         (get_variable_section): For decls in named .bss* sections pass true as
7724         second argument to bss_initializer_p.
7726 2018-02-09  Marek Polacek  <polacek@redhat.com>
7727             Jakub Jelinek  <jakub@redhat.com>
7729         PR c++/83659
7730         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7731         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
7732         Sync some changes from cxx_fold_indirect_ref.
7734 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7736         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7737         markers.
7738         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7739         (BLOCK_INLINE_ENTRY_LABEL): New.
7740         (dwarf2out_var_location): Disregard inline entry markers.
7741         (inline_entry_data): New struct.
7742         (inline_entry_data_hasher): New hashtable type.
7743         (inline_entry_data_hasher::hash): New.
7744         (inline_entry_data_hasher::equal): New.
7745         (inline_entry_data_table): New variable.
7746         (add_high_low_attributes): Add DW_AT_entry_pc and
7747         DW_AT_GNU_entry_view attributes if a pending entry is found
7748         in inline_entry_data_table.  Add old entry_pc attribute only
7749         if debug nonbinding markers are disabled.
7750         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7751         markers are enabled.
7752         (block_within_block_p, dwarf2out_inline_entry): New.
7753         (dwarf2out_finish): Check that no entries remained in
7754         inline_entry_data_table.
7755         * final.c (reemit_insn_block_notes): Handle inline entry notes.
7756         (final_scan_insn, notice_source_line): Likewise.
7757         (rest_of_clean_state): Skip inline entry markers.
7758         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7759         markers.
7760         * gimple.c (gimple_build_debug_inline_entry): New.
7761         * gimple.h (enum gimple_debug_subcode): Add
7762         GIMPLE_DEBUG_INLINE_ENTRY.
7763         (gimple_build_debug_inline_entry): Declare.
7764         (gimple_debug_inline_entry_p): New.
7765         (gimple_debug_nonbind_marker_p): Adjust.
7766         * insn-notes.def (INLINE_ENTRY): New.
7767         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7768         inline entry marker notes.
7769         (print_insn): Likewise.
7770         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7771         (INSN_DEBUG_MARKER_KIND): Likewise.
7772         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7773         * tree-inline.c (expand_call_inline): Build and insert
7774         debug_inline_entry stmt.
7775         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7776         inline entry blocks early, if nonbind markers are enabled.
7777         (dump_scope_block): Dump fragment info.
7778         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7779         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7780         (gimple_build_debug_inline_entry): New.
7781         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7782         Enable/disable inline entry points too.
7783         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7784         (DEBUG_INSN): Describe inline entry markers.
7786         * common.opt (gvariable-location-views): New.
7787         (gvariable-location-views=incompat5): New.
7788         * config.in: Rebuilt.
7789         * configure: Rebuilt.
7790         * configure.ac: Test assembler for view support.
7791         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7792         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7793         * dwarf2out.c (var_loc_view): New typedef.
7794         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7795         (dwarf2out_locviews_in_attribute): New.
7796         (dwarf2out_locviews_in_loclist): New.
7797         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7798         (enum dw_line_info_opcode): Add LI_adv_address.
7799         (struct dw_line_info_table): Add view.
7800         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7801         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7802         (zero_view_p): New variable.
7803         (ZERO_VIEW_P): New macro.
7804         (output_asm_line_debug_info): New.
7805         (struct var_loc_node): Add view.
7806         (add_AT_view_list, AT_loc_list): New.
7807         (add_var_loc_to_decl): Add view param.  Test it against last.
7808         (new_loc_list): Add view params.  Record them.
7809         (AT_loc_list_ptr): Handle loc and view lists.
7810         (view_list_to_loc_list_val_node): New.
7811         (print_dw_val): Handle dw_val_class_view_list.
7812         (size_of_die): Likewise.
7813         (value_format): Likewise.
7814         (loc_list_has_views): New.
7815         (gen_llsym): Set vl_symbol too.
7816         (maybe_gen_llsym, skip_loc_list_entry): New.
7817         (dwarf2out_maybe_output_loclist_view_pair): New.
7818         (output_loc_list): Output view list or entries too.
7819         (output_view_list_offset): New.
7820         (output_die): Handle dw_val_class_view_list.
7821         (output_dwarf_version): New.
7822         (output_compilation_unit_header): Use it.
7823         (output_skeleton_debug_sections): Likewise.
7824         (output_rnglists, output_line_info): Likewise.
7825         (output_pubnames, output_aranges): Update version comments.
7826         (output_one_line_info_table): Output view numbers in asm comments.
7827         (dw_loc_list): Determine current endview, pass it to new_loc_list.
7828         Call maybe_gen_llsym.
7829         (loc_list_from_tree_1): Adjust.
7830         (add_AT_location_description): Create view list attribute if
7831         needed, check it's absent otherwise.
7832         (convert_cfa_to_fb_loc_list): Adjust.
7833         (maybe_emit_file): Call output_asm_line_debug_info for test.
7834         (dwarf2out_var_location): Reset views as needed.  Precompute
7835         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
7836         attribute.  Set view.
7837         (new_line_info_table): Reset next view.
7838         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7839         (dwarf2out_source_line): Likewise.  Output view resets and labels to
7840         the assembler, or select appropriate line info opcodes.
7841         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7842         (optimize_string_length): Catch it.  Adjust.
7843         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
7844         dw_val_class_view_list, and remove it if no longer needed.
7845         (hash_loc_list): Hash view numbers.
7846         (loc_list_hasher::equal): Compare them.
7847         (optimize_location_lists): Check whether a view list symbol is
7848         needed, and whether the locview attribute is present, and
7849         whether they match.  Remove the locview attribute if no longer
7850         needed.
7851         (index_location_lists): Call skip_loc_list_entry for test.
7852         (dwarf2out_finish): Call output_asm_line_debug_info for test.
7853         Use output_dwarf_version.
7854         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7855         (struct dw_val_node): Add val_view_list.
7856         * final.c (SEEN_NEXT_VIEW): New.
7857         (set_next_view_needed): New.
7858         (clear_next_view_needed): New.
7859         (maybe_output_next_view): New.
7860         (final_start_function): Rename to...
7861         (final_start_function_1): ... this.  Take pointer to FIRST,
7862         add SEEN parameter.  Emit param bindings in the initial view.
7863         (final_start_function): Reintroduce SEEN-less interface.
7864         (final): Rename to...
7865         (final_1): ... this.  Take SEEN parameter.  Output final pending
7866         next view at the end.
7867         (final): Reintroduce seen-less interface.
7868         (final_scan_insn): Output pending next view before switching
7869         sections or ending a block.  Mark the next view as needed when
7870         outputting variable locations.  Notify debug backend of section
7871         changes, and of location view changes.
7872         (rest_of_handle_final): Adjust.
7873         * toplev.c (process_options): Autodetect value for debug variable
7874         location views option.  Warn on incompat5 without -gdwarf-5.
7875         * doc/invoke.texi (gvariable-location-views): New.
7876         (gvariable-location-views=incompat5): New.
7877         (gno-variable-location-views): New.
7879 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
7881         PR tree-optimization/84136
7882         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
7883         that the result of find_edge is non-NULL.
7885 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
7887         PR target/83008
7888         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
7889         storing integer register in SImode.  Fix cost of 256 and 512
7890         byte aligned SSE register store.
7892 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
7894         * config/i386/i386.c (ix86_multiplication_cost): Fix
7895         multiplication cost for TARGET_AVX512DQ.
7897 2018-02-08  Marek Polacek  <polacek@redhat.com>
7899         PR tree-optimization/84238
7900         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
7901         get_range_strlen.
7903 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7905         PR tree-optimization/84265
7906         * tree-vect-stmts.c (vectorizable_store): Don't treat
7907         VMAT_CONTIGUOUS accesses as grouped.
7908         (vectorizable_load): Likewise.
7910 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7912         PR tree-optimization/81635
7913         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
7914         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
7915         (test_round_for_mask): New functions.
7916         (wide_int_cc_tests): Call test_round_for_mask.
7917         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
7918         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
7919         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
7920         range returned by get_range_info.
7922 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7924         PR ipa/81360
7925         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
7926         * symtab.c: Include builtins.h
7927         (symtab_node::output_to_lto_symbol_table_p): Move here
7928         from lto-streamer-out.c:output_symbol_p.
7929         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
7930         (output_symbol_p): Move all logic to symtab.c
7931         (produce_symtab): Update.
7933 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7935         * config/s390/s390-opts.h (enum indirect_branch): Define.
7936         * config/s390/s390-protos.h (s390_return_addr_from_memory)
7937         (s390_indirect_branch_via_thunk)
7938         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
7939         (enum s390_indirect_branch_type): Define.
7940         * config/s390/s390.c (struct s390_frame_layout, struct
7941         machine_function): Remove.
7942         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
7943         (indirect_branch_table_label_no, indirect_branch_table_name):
7944         Define variables.
7945         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
7946         (enum s390_indirect_branch_option): Define.
7947         (s390_return_addr_from_memory): New function.
7948         (s390_handle_string_attribute): New function.
7949         (s390_attribute_table): Add new attribute handler.
7950         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
7951         (s390_indirect_branch_via_thunk): New function.
7952         (s390_indirect_branch_via_inline_thunk): New function.
7953         (s390_function_ok_for_sibcall): When jumping via thunk disallow
7954         sibling call optimization for non z10 compiles.
7955         (s390_emit_call): Force indirect branch target to be a single
7956         register.  Add r1 clobber for non-z10 compiles.
7957         (s390_emit_epilogue): Emit return jump via return_use expander.
7958         (s390_reorg): Handle JUMP_INSNs as execute targets.
7959         (s390_option_override_internal): Perform validity checks for the
7960         new command line options.
7961         (s390_indirect_branch_attrvalue): New function.
7962         (s390_indirect_branch_settings): New function.
7963         (s390_set_current_function): Invoke s390_indirect_branch_settings.
7964         (s390_output_indirect_thunk_function):  New function.
7965         (s390_code_end): Implement target hook.
7966         (s390_case_values_threshold): Implement target hook.
7967         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
7968         macros.
7969         * config/s390/s390.h (struct s390_frame_layout)
7970         (struct machine_function): Move here from s390.c.
7971         (TARGET_INDIRECT_BRANCH_NOBP_RET)
7972         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
7973         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
7974         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
7975         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
7976         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
7977         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
7978         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
7979         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
7980         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
7981         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
7982         (mnemonic attribute): Add values which aren't recognized
7983         automatically.
7984         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
7985         pattern for branch conversion.  Fix mnemonic attribute.
7986         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
7987         indirect branch via thunk if requested.
7988         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
7989         ("*indirect_jump"): Disable for branch conversion using out of
7990         line thunks.
7991         ("indirect_jump_via_thunk<mode>_z10")
7992         ("indirect_jump_via_thunk<mode>")
7993         ("indirect_jump_via_inlinethunk<mode>_z10")
7994         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
7995         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
7996         ("casesi_jump_via_inlinethunk<mode>_z10")
7997         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
7998         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
7999         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8000         ("*indirect2_jump"): Disable for branch conversion.
8001         ("casesi_jump"): Turn into expander and expand patterns for branch
8002         conversion.
8003         ("return_use"): New expander.
8004         ("*return"): Emit return via thunk and rename it to ...
8005         ("*return<mode>"): ... this one.
8006         * config/s390/s390.opt: Add new options and and enum for the
8007         option values.
8009 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8011         * lra-constraints.c (match_reload): Unconditionally use
8012         gen_lowpart_SUBREG, rather than selecting between that
8013         and equivalent gen_rtx_SUBREG code.
8015 2018-02-08  Richard Biener  <rguenther@suse.de>
8017         PR tree-optimization/84233
8018         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8019         changed flag instead of boguously re-using phi_inserted.
8021 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8023         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8024         static local variables.
8026 2018-02-08  Richard Biener  <rguenther@suse.de>
8028         PR tree-optimization/84278
8029         * tree-vect-stmts.c (vectorizable_store): When looking for
8030         smaller vector types to perform grouped strided loads/stores
8031         make sure the mode is supported by the target.
8032         (vectorizable_load): Likewise.
8034 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8036         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8037         Increase LDP/STP opportunities by adding adjacent callee-saves.
8039 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8041         PR rtl-optimization/84068
8042         PR rtl-optimization/83459
8043         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8045 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8047         PR tree-optimization/84224
8048         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8049         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8050         non-zero arguments.
8052 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8054         PR target/84113
8055         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8056         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8057         count, remove one USE.
8059 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8061         * doc/install.texi (Configuration): Document the
8062         --with-long-double-format={ibm,ieee} PowerPC configuration
8063         options.
8065         PR target/84154
8066         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8067         Convert from define_expand to be define_insn_and_split.  Rework
8068         float/double/_Float128 conversions to QI/HI/SImode to work with
8069         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8070         conversions to QI/HImode types did a store and then a load to
8071         truncate the value.  For conversions to VSX registers, don't split
8072         the insn, instead emit the code directly.  Use the code iterator
8073         any_fix to combine signed and unsigned conversions.
8074         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8075         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8076         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8077         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8078         (fix_<mode>di2_hw): Likewise.
8079         (fixuns_<mode>di2_hw): Likewise.
8080         (fix_<mode>si2_hw): Likewise.
8081         (fixuns_<mode>si2_hw): Likewise.
8082         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8083         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8084         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8085         fix<uns>_trunc<SFDF:mode>si2_p8.
8086         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8087         used.
8088         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8089         (fix<uns>_<mode>_mem): Likewise.
8090         (fctiw<u>z_<mode>_mem): Likewise.
8091         (fix<uns>_<mode>_mem): Likewise.
8092         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8093         the register allocator from doing a direct move to the GPRs to do
8094         a store, and instead use the ISA 3.0 store byte/half-word from
8095         vector register instruction.  For IEEE 128-bit floating point,
8096         also optimize stores of 32-bit ints.
8097         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8099 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8101         * genextract.c (push_pathstr_operand): New function to support
8102         [a-zA-Z].
8103         (walk_rtx): Call push_pathstr_operand.
8104         (print_path): Support [a-zA-Z].
8106 2018-02-07  Richard Biener  <rguenther@suse.de>
8108         PR tree-optimization/84037
8109         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8110         (cse_and_gimplify_to_preheader): Declare.
8111         (vect_get_place_in_interleaving_chain): Likewise.
8112         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8113         ivexpr_map.
8114         (_loop_vec_info::~_loop_vec_info): Delete it.
8115         (cse_and_gimplify_to_preheader): New function.
8116         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8117         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8118         (vectorizable_load): Likewise.  For grouped stores always base
8119         the IV on the first element.
8120         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8121         condition before gimplifying.
8123 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8125         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8126         *DIV_EXPR and *MOD_EXPR.
8128 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8130         PR target/84248
8131         * config/i386/i386.c (ix86_option_override_internal): Mask out
8132         the CF_SET bit when checking -fcf-protection.
8134 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8136         PR libgomp/84217
8137         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8138         enough.
8140 2018-02-07  Richard Biener  <rguenther@suse.de>
8142         PR tree-optimization/84204
8143         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8144         this place.
8146         PR tree-optimization/84205
8147         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8148         special-case isl_ast_op_zdiv_r.
8150         PR tree-optimization/84223
8151         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8152         Only add conditions from within the region.
8153         (gather_bbs::after_dom_children): Adjust.
8155 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8157         PR target/84209
8158         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8159         * config/avr/avr.md: Only post-reload split REG-REG moves if
8160         either register is GENERAL_REG_P.
8162 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8164         PR tree-optimization/84235
8165         * tree-ssa-scopedtables.c
8166         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8167         if the subtraction is performed in floating point type where NaNs are
8168         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8169         build 1.  Formatting fix.
8171 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8173         PR target/84146
8174         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8175         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8176         and skip it regardless of bb boundaries.  Use CALL_P macro,
8177         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8178         unnecessarily, formatting fix.
8180 2018-02-06  Michael Collison  <michael.collison@arm.com>
8182         * config/arm/thumb2.md:
8183         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8184         (*thumb_mov_notscc): Ditto.
8186 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8188         PR target/84154
8189         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8190         unsigned_fix, not "s".
8192 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8194         * configure.ac (gcc_fn_eh_frame_ro): New function.
8195         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8196         correct .eh_frame permissions.
8197         * configure: Regenerate.
8199 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8201         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8202         irrelevant options.
8204 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8206         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8207         Display warning message for -mno-speculate-indirect-jumps.
8209 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8211         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8212         Undocumented.
8213         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8215 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8217         PR tree-optimization/84225
8218         * tree-eh.c (find_trapping_overflow): Only call
8219         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8221 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8223         PR target/84145
8224         * config/i386/i386.c: Reimplement the check of possible options
8225         -mibt/-mshstk conbination. Change error messages.
8226         * doc/invoke.texi: Fix a typo: remove extra '='.
8228 2018-02-06  Marek Polacek  <polacek@redhat.com>
8230         PR tree-optimization/84228
8231         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8233 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8235         PR target/82641
8236         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8237         emitted arch directives.
8238         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8239         __ARM_FEATURE_COPROC before changing architectures.
8241 2018-02-06  Richard Biener  <rguenther@suse.de>
8243         * config/i386/i386.c (print_reg): Fix typo.
8244         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8246 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8248         * configure: Regenerate.
8250 2018-02-05  Martin Sebor  <msebor@redhat.com>
8252         PR tree-optimization/83369
8253         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8254         inlining context.
8256 2018-02-05  Martin Liska  <mliska@suse.cz>
8258         * doc/invoke.texi: Cherry-pick upstream r323995.
8260 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8262         * ira.c (ira_init_register_move_cost): Adjust comment.
8264 2018-02-05  Martin Liska  <mliska@suse.cz>
8266         PR gcov-profile/84137
8267         * doc/gcov.texi: Fix typo in documentation.
8269 2018-02-05  Martin Liska  <mliska@suse.cz>
8271         PR gcov-profile/83879
8272         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8273         using dlopen functionality.
8275 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8277         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8278         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8279         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8280         _mm_maskz_range_round_ss): New intrinsics.
8281         (__builtin_ia32_rangesd128_round)
8282         (__builtin_ia32_rangess128_round): Remove.
8283         (__builtin_ia32_rangesd128_mask_round,
8284         __builtin_ia32_rangess128_mask_round): New builtins.
8285         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8286         __builtin_ia32_rangess128_round): Remove.
8287         (__builtin_ia32_rangesd128_mask_round,
8288         __builtin_ia32_rangess128_mask_round): New builtins.
8289         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8290         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8291         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8292         "<round_saeonly_constraint>")): Changed to ...
8293         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8294         "<round_saeonly_scalar_constraint>")): ... this.
8295         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8296         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8297         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8298         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8299         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8301 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8303         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8304         options.
8305         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8306         Remove all values except native, 8540 and 8548.
8308 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8310         * config/i386/i386.c (ix86_output_function_return): Pass
8311         INVALID_REGNUM, instead of -1, as invalid register number to
8312         indirect_thunk_name and output_indirect_thunk.
8314 2018-02-02  Julia Koval  <julia.koval@intel.com>
8316         * config.gcc: Add -march=icelake.
8317         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8318         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8319         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8320         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8321         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8322         (processor_target_table): Add icelake.
8323         (ix86_option_override_internal): Handle new PTAs.
8324         (get_builtin_code_for_version): Handle icelake.
8325         (M_INTEL_COREI7_ICELAKE): New.
8326         (fold_builtin_cpu): Handle icelake.
8327         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8328         * doc/invoke.texi: Add -march=icelake.
8330 2018-02-02  Julia Koval  <julia.koval@intel.com>
8332         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8333         to wide_int_bitmask.
8334         * wide-int-bitmask.h: New.
8336 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8338         PR target/84066
8339         * config/i386/i386.md: Replace Pmode with word_mode in
8340         builtin_setjmp_setup and builtin_longjmp to support x32.
8342 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8344         PR target/56010
8345         PR target/83743
8346         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8347         #include "opts.h".
8348         (rs6000_supported_cpu_names): New static variable.
8349         (linux_cpu_translation_table): Likewise.
8350         (elf_platform) <cpu>: Define new static variable and use it.
8351         Translate kernel AT_PLATFORM name to canonical name if needed.
8352         Error if platform name is unknown.
8354 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8356         PR target/84089
8357         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8359 2018-02-01  Jeff Law  <law@redhat.com>
8361         PR target/84128
8362         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8363         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8364         the scratch if RELEASE_VIA_POP is false.
8365         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8366         If we have to save a temporary register, decrement SIZE appropriately.
8367         Pass new arguments to release_scratch_register_on_entry.
8368         (ix86_adjust_stack_and_probe): Likewise.
8369         (ix86_emit_probe_stack_range): Pass new arguments to
8370         release_scratch_register_on_entry.
8372 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8374         PR rtl-optimization/84157
8375         * combine.c (change_zero_ext): Use REG_P predicate in
8376         front of HARD_REGISTER_P predicate.
8378 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8380         * config/avr/avr.c (avr_option_override): Move disabling of
8381         -fdelete-null-pointer-checks to...
8382         * common/config/avr/avr-common.c (avr_option_optimization_table):
8383         ...here.
8385 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8387         PR tree-optimization/81635
8388         * tree-data-ref.c (split_constant_offset_1): For types that
8389         wrap on overflow, try to use range info to prove that wrapping
8390         cannot occur.
8392 2018-02-01  Renlin Li  <renlin.li@arm.com>
8394         PR target/83370
8395         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8396         TAILCALL_ADDR_REGS.
8397         (aarch64_register_move_cost): Likewise.
8398         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8399         TAILCALL_ADDR_REGS.
8400         (REG_CLASS_NAMES): Likewise.
8401         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8402         TAILCALL_ADDR_REGS. Remove IP registers.
8403         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8405 2018-02-01  Richard Biener  <rguenther@suse.de>
8407         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8408         for specifying RPO order and allow NULL for that.
8409         * domwalk.c (dom_walker::dom_walker): Likewise.
8410         (dom_walker::walk): Handle NULL RPO order.
8411         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8412         in RPO order.
8413         (rewrite_update_dom_walker): Likewise.
8414         (mark_def_dom_walker): Likewise.
8416 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8418         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8419         (aarch64_maybe_expand_sve_subreg_move): Declare.
8420         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8421         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8422         predicate.
8423         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8424         that are semantically a reverse operation.
8425         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8426         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8427         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8428         functions.
8429         (aarch64_can_change_mode_class): For big-endian, forbid changes
8430         between two SVE modes if they have different element sizes.
8432 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8434         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8435         the TImode handling for big-endian targets.
8437 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8439         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8440         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8441         not just bytes.
8442         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8443         Remove BSWAP handing for big-endian targets and use the form of
8444         LD1RQ appropariate for the mode.
8446 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8448         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8449         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8450         duplicated element.
8452 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8454         PR tearget/83845
8455         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8456         check for operands that need to go through aarch64_sve_reload_be.
8458 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8460         PR tree-optimization/81661
8461         PR tree-optimization/84117
8462         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8463         * tree-eh.c: Include gimplify.h.
8464         (find_trapping_overflow, replace_trapping_overflow,
8465         rewrite_to_non_trapping_overflow): New functions.
8466         * tree-vect-loop.c: Include tree-eh.h.
8467         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8468         * tree-data-ref.c: Include tree-eh.h.
8469         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8471 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8473         PR rtl-optimization/84123
8474         * combine.c (change_zero_ext): Check if hard register satisfies
8475         can_change_dest_mode before calling gen_lowpart_SUBREG.
8477 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8479         PR target/82444
8480         * ira.c (ira_init_register_move_cost): Remove assert.
8482 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8484         PR rtl-optimization/84071
8485         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8486         * doc/tm.texi: Regenerate.
8488 2018-01-31  Richard Biener  <rguenther@suse.de>
8490         PR tree-optimization/84132
8491         * tree-data-ref.c (analyze_miv_subscript): Properly
8492         check whether evolution_function_is_affine_multivariate_p
8493         before calling gcd_of_steps_may_divide_p.
8495 2018-01-31  Julia Koval  <julia.koval@intel.com>
8497         PR target/83618
8498         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8499         * config/i386/i386.md (rdpid_rex64) New.
8500         (rdpid): Make 32bit only.
8502 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8504         PR lto/84105
8505         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8506         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8508 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8510         Revert
8511         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8513         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8515 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8517         PR rtl-optimization/84071
8518         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8519         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8521 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8523         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8524         (arc_attribute_table): Add 'aux' attribute.
8525         (arc_in_small_data_p): Consider aux like variables.
8526         (arc_is_aux_reg_p): New function.
8527         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8528         (arc_get_aux_arg): New function.
8529         (prepare_move_operands): Handle aux-register access.
8530         (arc_handle_aux_attribute): New function.
8531         * doc/extend.texi (ARC Variable attributes): Add subsection.
8533 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8535         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8536         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8537         (arc_attribute_table): Add 'uncached' attribute.
8538         (arc_print_operand): Print '.di' flag for uncached memory
8539         accesses.
8540         (arc_in_small_data_p): Do not consider for small data the uncached
8541         types.
8542         (arc_is_uncached_mem_p): New function.
8543         * config/arc/predicates.md (compact_store_memory_operand): Check
8544         for uncached memory accesses.
8545         (nonvol_nonimm_operand): Likewise.
8546         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8548 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8550         PR c/84100
8551         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8552         falign-loops=): Add Optimization flag.
8554 2018-01-30  Jeff Law  <law@redhat.com>
8556         PR target/84064
8557         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8558         INT_REGISTERS_SAVED.  Check it prior to calling
8559         get_scratch_register_on_entry.
8560         (ix86_adjust_stack_and_probe): Similarly.
8561         (ix86_emit_probe_stack_range): Similarly.
8562         (ix86_expand_prologue): Corresponding changes.
8564 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8566         PR target/40411
8567         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8568         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8570 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8572         PR target/84112
8573         * lra-constraints.c (curr_insn_transform): Process AND in the
8574         address.
8576 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8578         PR rtl-optimization/83986
8579         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8580         dependence against last_pending_memory_flush in addition to
8581         pending_jump_insns.
8583 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8585         PR tree-optimization/81611
8586         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8587         copies.
8589 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8591         PR target/83758
8592         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8593         a reg rtx.
8595 2018-01-30  Richard Biener  <rguenther@suse.de>
8596             Jakub Jelinek  <jakub@redhat.com>
8598         PR tree-optimization/84111
8599         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8600         inner loops added during recursion, as they don't have up-to-date
8601         SSA form.
8603 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8605         PR ipa/81360
8606         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8607         (can_inline_edge_by_limits_p): ... here.
8608         (can_early_inline_edge_p, check_callers,
8609         update_caller_keys, update_callee_keys, recursive_inlining,
8610         add_new_edges_to_heap, speculation_useful_p,
8611         inline_small_functions,
8612         inline_small_functions, flatten_function,
8613         inline_to_all_callers_1): Update.
8615 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8617         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8618         zeros correctly.
8620 2018-01-30  Richard Biener  <rguenther@suse.de>
8622         PR tree-optimization/83008
8623         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8624         invariant and constant vector uses in stmts when they need
8625         more than one stmt.
8627 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8629         PR bootstrap/84017
8630         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8631         * configure: Regenerate.
8633 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8635         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8636         pattern.
8637         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8638         Use gen_rtx_REG rather than gen_lowpart.
8640 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8642         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
8643         rather than 0 when creating partial subregs.
8645 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8647         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
8648         of usage.
8650 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8652         PR target/81550
8653         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
8654         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
8655         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
8656         flags.  This restores the settings used before the 2017-07-24.
8657         Turning off pre increment/decrement/modify allows IVOPTS to
8658         optimize DF/SF loops where the index is an int.
8660 2018-01-29  Richard Biener  <rguenther@suse.de>
8661             Kelvin Nilsen  <kelvin@gcc.gnu.org>
8663         PR bootstrap/80867
8664         * tree-vect-stmts.c (vectorizable_call): Don't call
8665         targetm.vectorize_builtin_md_vectorized_function if callee is
8666         NULL.
8668 2018-01-22  Carl Love  <cel@us.ibm.com>
8670         * doc/extend.tex: Fix typo in second arg in
8671         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
8673 2018-01-29  Richard Biener  <rguenther@suse.de>
8675         PR tree-optimization/84086
8676         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
8677         (flush_ssaname_freelist): When SSA names were released reset
8678         the SCEV hash table.
8680 2018-01-29  Richard Biener  <rguenther@suse.de>
8682         PR tree-optimization/84057
8683         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
8684         removed paths when removing edges.
8686 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
8688         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
8689         -mfunction-return=@var{choice}.
8691 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8693         PR diagnostic/84034
8694         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8695         Handle CR like TAB.
8696         (layout::print_source_line): Likewise.
8697         (test_get_line_width_without_trailing_whitespace): Add test cases.
8699 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
8701         PR middle-end/84040
8702         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8703         debug insns.
8705 2018-01-26  Jim Wilson  <jimw@sifive.com>
8707         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8709         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8710         specified.
8712 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8714         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8715         and CMP + SUB-immediate -> SUBS.
8717 2018-01-26  Martin Sebor  <msebor@redhat.com>
8719         PR tree-optimization/83896
8720         * tree-ssa-strlen.c (get_string_len): Rename...
8721         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
8722         Avoid assuming length is constant.
8723         (handle_char_store): Use HOST_WIDE_INT for string length.
8725 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
8727         PR target/81763
8728         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8729         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8731 2018-01-26  Richard Biener  <rguenther@suse.de>
8733         PR rtl-optimization/84003
8734         * dse.c (record_store): Only record redundant stores when
8735         the earlier store aliases at least all accesses the later one does.
8737 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
8739         PR rtl-optimization/83985
8740         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8741         REG_CFA_RESTORE insns.
8742         (delete_unmarked_insns): Don't ignore separate shrink wrapping
8743         REG_CFA_RESTORE insns here.
8745         PR c/83989
8746         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8747         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8749 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8751         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8752         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8753         (arc_init): Likewise.
8754         (arc_override_options): Likewise.
8755         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8756         value.
8757         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8758         support.
8759         * config/arc/arc.h (TARGET_DBNZ): Define.
8760         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8761         properly set the tune attribute.
8762         (dbnz): Use TARGET_DBNZ guard.
8763         * config/arc/arc.opt (mtune): Add core3 option.
8765 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8767         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8768         recognize new pic like addresses.
8769         (arc_delegitimize_address): Clean up.
8771 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8773         * config/arc/arc-arches.def: Option mrf16 valid for all
8774         architectures.
8775         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8776         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8777         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8778         * config/arc/arc-tables.opt: Regenerate.
8779         * config/arc/arc.c (arc_conditional_register_usage): Handle
8780         reduced register file case.
8781         (arc_file_start): Set must have build attributes.
8782         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8783         mrf16 option value.
8784         * config/arc/arc.opt (mrf16): Add new option.
8785         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8786         * config/arc/genmultilib.awk: Handle new mrf16 option.
8787         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8788         * config/arc/t-multilib: Regenerate.
8789         * doc/invoke.texi (ARC Options): Document mrf16 option.
8791 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8793         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8794         * config/arc/arc.c (arc_handle_secure_attribute): New function.
8795         (arc_attribute_table): Add 'secure_call' attribute.
8796         (arc_print_operand): Print secure call operand.
8797         (arc_function_ok_for_sibcall): Don't optimize tail calls when
8798         secure.
8799         (arc_is_secure_call_p): New function.  * config/arc/arc.md
8800         (call_i): Add support for sjli instruction.
8801         (call_value_i): Likewise.
8802         * config/arc/constraints.md (Csc): New constraint.
8804 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8805             John Eric Martin  <John.Martin@emmicro-us.com>
8807         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8808         * config/arc/arc.c (_arc_jli_section): New struct.
8809         (arc_jli_section): New type.
8810         (rc_jli_sections): New static variable.
8811         (arc_handle_jli_attribute): New function.
8812         (arc_attribute_table): Add jli_always and jli_fixed attribute.
8813         (arc_file_end): New function.
8814         (TARGET_ASM_FILE_END): Define.
8815         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8816         (arc_add_jli_section): New function.
8817         (jli_call_scan): Likewise.
8818         (arc_reorg): Call jli_call_scan.
8819         (arc_output_addsi): Remove 'S' from printing asm operand.
8820         (arc_is_jli_call_p): New function.
8821         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8822         operand.
8823         (movhi_insn): Likewise.
8824         (movsi_insn): Likewise.
8825         (movsi_set_cc_insn): Likewise.
8826         (loadqi_update): Likewise.
8827         (load_zeroextendqisi_update): Likewise.
8828         (load_signextendqisi_update): Likewise.
8829         (loadhi_update): Likewise.
8830         (load_zeroextendhisi_update): Likewise.
8831         (load_signextendhisi_update): Likewise.
8832         (loadsi_update): Likewise.
8833         (loadsf_update): Likewise.
8834         (movsicc_insn): Likewise.
8835         (bset_insn): Likewise.
8836         (bxor_insn): Likewise.
8837         (bclr_insn): Likewise.
8838         (bmsk_insn): Likewise.
8839         (bicsi3_insn): Likewise.
8840         (cmpsi_cc_c_insn): Likewise.
8841         (movsi_ne): Likewise.
8842         (movsi_cond_exec): Likewise.
8843         (clrsbsi2): Likewise.
8844         (norm_f): Likewise.
8845         (normw): Likewise.
8846         (swap): Likewise.
8847         (divaw): Likewise.
8848         (flag): Likewise.
8849         (sr): Likewise.
8850         (kflag): Likewise.
8851         (ffs): Likewise.
8852         (ffs_f): Likewise.
8853         (fls): Likewise.
8854         (call_i): Remove 'S' asm letter, add jli instruction.
8855         (call_value_i): Likewise.
8856         * config/arc/arc.op (mjli-always): New option.
8857         * config/arc/constraints.md (Cji): New constraint.
8858         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8859         operand.
8860         (subsf3_fpx): Likewise.
8861         (mulsf3_fpx): Likewise.
8862         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8863         asm operand.
8864         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8865         function attrbutes.
8866         * doc/invoke.texi (ARC): Document mjli-always option.
8868 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
8870         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
8871         avoid addition with 0 and use incw and decw where possible.
8873 2018-01-26  Richard Biener  <rguenther@suse.de>
8875         PR tree-optimization/81082
8876         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8877         association if it requires casting to unsigned.
8878         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8879         from fold_plusminus_mult_expr to catch important cases late when
8880         range info is available.
8882 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8884         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
8885         * configure.ac (hidden_linkonce): New test.
8886         * configure: Regenerate.
8887         * config.in: Regenerate.
8889 2018-01-26  Julia Koval  <julia.koval@intel.com>
8891         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
8892         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
8893         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
8894         _mm_mask_bitshuffle_epi64_mask): Fix type.
8895         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
8896         USI_FTYPE_V4DI_V4DI_USI): Remove.
8897         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
8898         __builtin_ia32_vpshufbitqmb256_mask,
8899         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
8900         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
8901         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
8903 2018-01-26  Alan Modra  <amodra@gmail.com>
8905         PR target/84033
8906         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
8907         UNSPEC_VBPERMQ.  Sort other unspecs.
8909 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
8911         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
8913 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
8915         PR middle-end/83055
8916         * predict.c (drop_profile): Do not push/pop cfun; update also
8917         node->count.
8918         (handle_missing_profiles): Fix logic looking for zero profiles.
8920 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
8922         PR middle-end/83977
8923         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
8924         on functions with #pragma omp declare simd or functions with simd
8925         attribute.
8926         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
8927         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
8928         Remove trailing \n from warning_at calls.
8930 2018-01-25  Tom de Vries  <tom@codesourcery.com>
8932         PR target/84028
8933         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8934         for neutered workers.
8936 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
8938         PR target/68467
8939         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
8940         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
8942 2018-01-24  Jeff Law  <law@redhat.com>
8944         PR target/83994
8945         * i386.c (get_probe_interval): Move to earlier point.
8946         (ix86_compute_frame_layout): If -fstack-clash-protection and
8947         the frame is larger than the probe interval, then use pushes
8948         to save registers rather than reg->mem moves.
8949         (ix86_expand_prologue): Remove conditional for int_registers_saved
8950         assertion.
8952 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
8954         PR target/84014
8955         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
8956         min/max for never referenced object.
8958 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
8960         PR middle-end/83977
8961         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
8962         here.
8963         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
8964         attributes from DECL_ATTRIBUTES (decl) without affecting
8965         DECL_ATTRIBUTES (current_function_decl).
8966         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
8967         functions with non-NULL DECL_ABSTRACT_ORIGIN.
8969 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
8971         PR tree-optimization/83979
8972         * fold-const.c (fold_comparison): Use constant_boolean_node
8973         instead of boolean_{true,false}_node.
8975 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
8977         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
8978         with zero counts.
8980 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8982         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8983         Simplify the clause that sets the length attribute.
8984         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8985         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
8986         clause that sets the length attribute.
8987         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8989 2018-01-24  Tom de Vries  <tom@codesourcery.com>
8991         PR target/83589
8992         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
8993         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
8994         Add strict parameter.
8995         (prevent_branch_around_nothing): Insert dummy insn between branch to
8996         label and label with no ptx insn inbetween.
8997         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
8999 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9001         PR target/81352
9002         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9003         for neutered threads in warp.
9004         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9006 2018-01-24  Richard Biener  <rguenther@suse.de>
9008         PR tree-optimization/83176
9009         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9010         operands.
9012 2018-01-24  Richard Biener  <rguenther@suse.de>
9014         PR tree-optimization/82819
9015         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9016         code generating pluses that are no-ops in the target precision.
9018 2018-01-24  Richard Biener  <rguenther@suse.de>
9020         PR middle-end/84000
9021         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9023 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9025         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9026         to merge probabilities.
9027         * predict.c (probably_never_executed): Also mark as cold functions
9028         with global 0 profile and guessed local profile.
9029         * profile-count.c (profile_probability::combine_with_count): New
9030         member function.
9031         * profile-count.h (profile_probability::operator*,
9032         profile_probability::operator*=, profile_probability::operator/,
9033         profile_probability::operator/=): Reduce precision to adjusted
9034         and set value to guessed on contradictory divisions.
9035         (profile_probability::combine_with_freq): Remove.
9036         (profile_probability::combine_wiht_count): Declare.
9037         (profile_count::force_nonzero):: Set to adjusted.
9038         (profile_count::probability_in):: Set quality to adjusted.
9039         * tree-ssa-tail-merge.c (replace_block_by): Use
9040         combine_with_count.
9042 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9043             Jim Wilson  <jimw@sifive.com>
9045         * config/riscv/riscv.c (riscv_stack_boundary): New.
9046         (riscv_option_override): Set riscv_stack_boundary.  Handle
9047         riscv_preferred_stack_boundary_arg.
9048         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9049         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9050         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9051         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9052         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9053         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9055 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9057         PR target/83905
9058         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9059         of struct ix86_frame.
9060         (ix86_expand_epilogue): Likewise.  Add a local variable for
9061         the reg_save_offset field in struct ix86_frame.
9063 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9065         PR tree-optimization/82604
9066         * tree-loop-distribution.c (enum partition_kind): New enum item
9067         PKIND_PARTIAL_MEMSET.
9068         (partition_builtin_p): Support above new enum item.
9069         (generate_code_for_partition): Ditto.
9070         (compute_access_range): Differentiate cases that equality can be
9071         proven at all loops, the innermost loops or no loops.
9072         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9073         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9074         (finalize_partitions, distribute_loop): Don't fuse partition of
9075         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9076         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9077         parloop is enabled.
9079 2018-01-23  Martin Liska  <mliska@suse.cz>
9081         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9082         order to ignore the predictor.
9083         (PRED_POLYMORPHIC_CALL): Likewise.
9084         (PRED_RECURSIVE_CALL): Likewise.
9086 2018-01-23  Martin Liska  <mliska@suse.cz>
9088         * tree-profile.c (tree_profiling): Print function header to
9089         aware reader which function we are working on.
9090         * value-prof.c (gimple_find_values_to_profile): Do not print
9091         not interesting value histograms.
9093 2018-01-23  Martin Liska  <mliska@suse.cz>
9095         * profile-count.h (enum profile_quality): Add
9096         profile_uninitialized as the first value. Do not number values
9097         as they are zero based.
9098         (profile_count::verify): Update sanity check.
9099         (profile_probability::verify): Likewise.
9101 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9103         * doc/invoke.texi (ffor-scope): Deprecate.
9105 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9107         PR tree-optimization/83510
9108         * domwalk.c (set_all_edges_as_executable): New function.
9109         (dom_walker::dom_walker): Convert bool param
9110         "skip_unreachable_blocks" to enum reachability.  Move setup of
9111         edge flags to set_all_edges_as_executable and only do it when
9112         reachability is REACHABLE_BLOCKS.
9113         * domwalk.h (enum dom_walker::reachability): New enum.
9114         (dom_walker::dom_walker): Convert bool param
9115         "skip_unreachable_blocks" to enum reachability.
9116         (set_all_edges_as_executable): New decl.
9117         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9118         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9119         "reachability".
9120         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9121         but converting true to REACHABLE_BLOCKS.
9122         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9123         * tree-vrp.c
9124         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9125         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9126         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9127         REACHABLE_BLOCKS.
9128         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9129         if check_all_array_refs will be called.
9131 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9133         * tree.c (selftest::test_location_wrappers): Add more test
9134         coverage.
9136 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9138         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9139         (selftest::test_bit_in_range): Likewise.
9141 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9143         PR testsuite/83888
9144         * doc/sourcebuild.texi (vect_float): Say that the selector
9145         only describes the situation when -funsafe-math-optimizations is on.
9146         (vect_float_strict): Document.
9148 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9150         PR tree-optimization/83965
9151         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9152         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9153         instead of checking only for a reduction.
9154         (vect_recog_widen_sum_pattern): Likewise.
9156 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9158         * predict.c (probably_never_executed): Only use precise profile info.
9159         (compute_function_frequency): Skip after inlining hack since we now
9160         have quality checking.
9162 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9164         * profile-count.h (profile_probability::very_unlikely,
9165         profile_probability::unlikely, profile_probability::even): Set
9166         precision to guessed.
9168 2018-01-23  Richard Biener  <rguenther@suse.de>
9170         PR tree-optimization/83963
9171         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9172         Properly terminate dominator walk when crossing the exit edge not
9173         when visiting its source block.
9175 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9177         PR c++/83918
9178         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9179         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9181 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9183         PR tree-optimization/83957
9184         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9185         semicolon after for body surrounded by braces.
9187         PR tree-optimization/83081
9188         * profile-count.h (profile_probability::split): New method.
9189         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9190         Use profile_probability::split.
9191         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9192         when splitting a single conditional jump into 2.
9194 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9196         PR tree-optimization/69452
9197         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9198         decl.
9200 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9202         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9203         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9204         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9206 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9208         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9209         * config/rl78/rl78.md (movdi): New define_expand.
9210         * config/rl78/rl78.c (rl78_split_movdi): New function.
9212 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9214         PR target/83862
9215         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9216         no longer used.
9217         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9218         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9219         128-bit to produce an UNSPEC move to get the double word with the
9220         signbit and then a shift directly to do signbit.
9221         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9222         implementation with a new version that just does either a direct
9223         move or a regular move.  Move memory interface to separate insns.
9224         Move insns so they are next to the expander.
9225         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9226         with signbit move.  Split big and little endian case.
9227         (signbit<mode>2_dm_mem_le): Likewise.
9228         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9229         (signbit<mode>2_dm2): Likewise.
9231 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9233         * config/rl78/rl78.md (anddi3): New define_expand.
9235 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9237         * config/rl78/rl78.md (umindi3): New define_expand.
9239 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9241         * config/rl78/rl78.md (smindi3): New define_expand.
9243 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9245         * config/rl78/rl78.md (smaxdi3): New define_expand.
9247 2018-01-22  Carl Love  <cel@us.ibm.com>
9249         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9250         LVX_V1TI): Add macro expansion.
9251         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9252         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9253         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9254         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9255         Change check to determine if the instruction is a byte reversing
9256         entry.  Fix typo in comment.
9257         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9258         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9259         Add def_builtin calls for new builtins.
9260         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9261         Add define_insn expansion.
9263 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9265         * config/rl78/rl78.md (umaxdi3): New define_expand.
9267 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9269         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9270         for non-QImode registers.
9272 2018-01-22  Richard Biener  <rguenther@suse.de>
9274         PR tree-optimization/83963
9275         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9276         including the loop exit block.
9277         (scop_detection::merge_sese): Likewise.
9278         (scop_detection::add_scop): Do it here instead.
9280 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9282         * doc/sourcebuild.texi (arm_softfloat): Document.
9284 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9286         PR gcc/77734
9287         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9288         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9289         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9291 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9292             David Edelsohn  <dje.gcc@gmail.com>
9294         PR target/83946
9295         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9296         Change "crset eq" to "crset 2".
9297         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9298         (*call_indirect_aix<mode>_nospec): Likewise.
9299         (*call_value_indirect_aix<mode>_nospec): Likewise.
9300         (*call_indirect_elfv2<mode>_nospec): Likewise.
9301         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9302         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9303         change assembly output from . to $.
9304         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9305         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9306         (*tablejump<mode>_internal1_nospec): Likewise.
9308 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9310         PR target/80870
9311         * config/sh/sh_optimize_sett_clrt.cc:
9312         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9314 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9316         PR tree-optimization/83940
9317         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9318         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9319         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9320         use it to pass back the definition type.
9321         (vect_check_store_rhs): Likewise rhs_dt_out.
9322         (vect_build_gather_load_calls): Add a mask_dt argument and use
9323         it instead of a call to vect_is_simple_use.
9324         (vectorizable_store): Update calls to vect_check_load_store_mask
9325         and vect_check_store_rhs.  Use the dt returned by the latter instead
9326         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9327         instead of calls to vect_is_simple_use.  Pass the scalar rather
9328         than the vector operand to vect_is_simple_use when handling
9329         second and subsequent copies of an rhs value.
9330         (vectorizable_load): Update calls to vect_check_load_store_mask
9331         and vect_build_gather_load_calls.  Use the cached mask_dt and
9332         gs_info.offset_dt instead of calls to vect_is_simple_use.
9334 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9336         PR middle-end/83945
9337         * tree-emutls.c: Include gimplify.h.
9338         (lower_emutls_2): New function.
9339         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9340         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9341         it before further processing.
9343         PR target/83930
9344         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9345         UINTVAL (trueop1) instead of INTVAL (op1).
9347 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9349         PR debug/81570
9350         PR debug/83728
9351         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9352         INCOMING_FRAME_SP_OFFSET if not defined.
9353         (scan_trace): Add ENTRY argument.  If true and
9354         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9355         emit a note to adjust the CFA offset.
9356         (create_cfi_notes): Adjust scan_trace callers.
9357         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9358         INCOMING_FRAME_SP_OFFSET in the CIE.
9359         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9360         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9361         Likewise.
9362         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9363         * doc/tm.texi: Regenerated.
9365 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9367         PR rtl-optimization/83147
9368         * lra-constraints.c (remove_inheritance_pseudos): Use
9369         lra_substitute_pseudo_within_insn.
9371 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9372             Cesar Philippidis  <cesar@codesourcery.com>
9374         PR target/83920
9375         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9377 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9379         PR target/83790
9380         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9381         spaces for function labels.
9383 2018-01-19  Martin Liska  <mliska@suse.cz>
9385         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9386         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9387         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9388         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9389         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9390         (PRED_CONST_RETURN): Change from 69 to 65.
9391         (PRED_NULL_RETURN): Change from 91 to 71.
9392         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9393         (PRED_LOOP_GUARD): Change from 66 to 73.
9395 2018-01-19  Martin Liska  <mliska@suse.cz>
9397         * predict.c (predict_insn_def): Add new assert.
9398         (struct branch_predictor): Change type to signed integer.
9399         (test_prediction_value_range): Amend test to cover
9400         PROB_UNINITIALIZED.
9401         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9402         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9403         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9404         (PRED_LOOP_IV_COMPARE): Likewise.
9405         * predict.h (PROB_UNINITIALIZED): Define new constant.
9407 2018-01-19  Martin Liska  <mliska@suse.cz>
9409         * predict.c (dump_prediction): Add new format for
9410         analyze_brprob.py script which is enabled with -details
9411         suboption.
9412         * profile-count.h (precise_p): New function.
9414 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9416         PR tree-optimization/83922
9417         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9418         there are no statements that need masking.
9419         (vect_active_double_reduction_p): New function.
9420         (vect_analyze_loop_operations): Use it when handling phis that
9421         are not in the loop header.
9423 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9425         PR tree-optimization/83914
9426         * tree-vect-loop.c (vectorizable_induction): Don't convert
9427         init_expr or apply the peeling adjustment for inductions
9428         that are nested within the vectorized loop.
9430 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9432         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9433         instead of NEG.
9435 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9437         PR sanitizer/81715
9438         PR testsuite/83882
9439         * function.h (gimplify_parameters): Add gimple_seq * argument.
9440         * function.c: Include gimple.h and options.h.
9441         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9442         for the added local temporaries if needed.
9443         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9444         if there are any parameter cleanups, wrap whole body into a
9445         try/finally with the cleanups.
9447 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9449         PR target/82964
9450         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9451         Use GET_MODE_CLASS for scalar floating point.
9453 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9455         PR ipa/82256
9456         patch by PaX Team
9457         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9458         Fix call of call_cgraph_insertion_hooks.
9460 2018-01-18  Martin Sebor  <msebor@redhat.com>
9462         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9464 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9466         PR ipa/83619
9467         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9468         frequencies.
9470 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9472         PR other/70268
9473         * common.opt: (-ffile-prefix-map): New option.
9474         * opts.c (common_handle_option): Defer it.
9475         * opts-global.c (handle_common_deferred_options): Handle it.
9476         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9477         * file-prefix-map.h: New file.
9478         (remap_debug_filename, add_debug_prefix_map): ...here.
9479         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9480         * final.c (debug_prefix_map, add_debug_prefix_map
9481         remap_debug_filename): Move to...
9482         * file-prefix-map.c: New file.
9483         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9484         generalize, get rid of alloca(), use strrchr() instead of strchr().
9485         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9486         Implement in terms of add_prefix_map().
9487         (remap_macro_filename, remap_debug_filename): Implement in term of
9488         remap_filename().
9489         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9490         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9491         * dbxout.c: Include file-prefix-map.h.
9492         * varasm.c: Likewise.
9493         * vmsdbgout.c: Likewise.
9494         * xcoffout.c: Likewise.
9495         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9496         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9497         * doc/invoke.texi (-ffile-prefix-map): Document.
9498         (-fdebug-prefix-map): Update description.
9500 2018-01-18  Martin Liska  <mliska@suse.cz>
9502         * config/i386/i386.c (indirect_thunk_name): Document that also
9503         lfence is emitted.
9504         (output_indirect_thunk): Document why both instructions
9505         (pause and lfence) are generated.
9507 2018-01-18  Richard Biener  <rguenther@suse.de>
9509         PR tree-optimization/83887
9510         * graphite-scop-detection.c
9511         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9512         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9513         (scop_detection::merge_sese): Re-implement with a flood-fill
9514         algorithm that properly finds a SESE region if it exists.
9516 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9518         PR c/61240
9519         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9520         pointer_diff optimizations use view_convert instead of convert.
9522 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9524         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9525         Generate different code for -mno-speculate-indirect-jumps.
9526         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9527         (*call_indirect_aix<mode>): Disable for
9528         -mno-speculate-indirect-jumps.
9529         (*call_indirect_aix<mode>_nospec): New define_insn.
9530         (*call_value_indirect_aix<mode>): Disable for
9531         -mno-speculate-indirect-jumps.
9532         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9533         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9534         -mno-speculate-indirect-jumps.
9535         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9537 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9539         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9540         long double type, set the flags for noting the default long double
9541         type, even if we don't pass or return a long double type.
9543 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9545         PR ipa/83051
9546         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9547         failure.
9549 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9551         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9552         support for merge[hl].
9553         (fold_mergehl_helper): New helper function.
9554         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9555         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9556         (altivec_vmrglw_direct): Add xxmrglw insn.
9558 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9560         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9561         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9563 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9565         PR lto/83121
9566         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9567         call the lto_location_cache before reading the
9568         DECL_SOURCE_LOCATION of the types.
9570 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9571             Richard Sandiford  <richard.sandiford@linaro.org>
9573         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9574         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9575         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9576         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9577         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9578         Add declaration.
9579         * config/aarch64/constraints.md (aarch64_movti_operand):
9580         Limit immediates.
9581         * config/aarch64/predicates.md (Uti): Add new constraint.
9583 2018-01-17 Carl Love  <cel@us.ibm.com>
9585         * config/rs6000/vsx.md (define_expand xl_len_r,
9586         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9587         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9588         lxvll.
9589         (define_expand, define_insn): Move the shift left from  the
9590         define_insn to the define_expand for lxvl and stxvl instructions.
9591         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9592         and XL_LEN_R definitions to PURE.
9594 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9596         * config/i386/i386.c (indirect_thunk_name): Declare regno
9597         as unsigned int.  Compare regno with INVALID_REGNUM.
9598         (output_indirect_thunk): Ditto.
9599         (output_indirect_thunk_function): Ditto.
9600         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9601         in the call to output_indirect_thunk_function.
9603 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9605         PR middle-end/83884
9606         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9607         rather than the size of inner_type to determine the stack slot size
9608         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9610 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9612         PR target/83546
9613         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9614         to PTA_SILVERMONT.
9616 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9618         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9619         endian Linux systems to optionally enable multilibs for selecting
9620         the long double type if the user configured an explicit type.
9621         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9622         have no long double multilibs if not defined.
9623         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9624         warn if the user used -mabi={ieee,ibm}longdouble and we built
9625         multilibs for long double.
9626         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9627         appropriate multilib option.
9628         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9629         multilib options.
9630         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9631         for building long double multilibs.
9632         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9634 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
9636         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9637         copies.
9639         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9640         64 bits.
9641         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9642         128 bits.
9644         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
9645         variables.
9647         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
9648         return value.
9650 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9652         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
9653         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
9655 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9657         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
9658         different rtl trees depending on TARGET_64BIT.
9659         (rs6000_gen_lvx): Likewise.
9661 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9663         * config/visium/visium.md (nop): Tweak comment.
9664         (hazard_nop): Likewise.
9666 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9668         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
9669         -mspeculate-indirect-jumps.
9670         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
9671         for -mno-speculate-indirect-jumps.
9672         (*call_indirect_elfv2<mode>_nospec): New define_insn.
9673         (*call_value_indirect_elfv2<mode>): Disable for
9674         -mno-speculate-indirect-jumps.
9675         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
9676         (indirect_jump): Emit different RTL for
9677         -mno-speculate-indirect-jumps.
9678         (*indirect_jump<mode>): Disable for
9679         -mno-speculate-indirect-jumps.
9680         (*indirect_jump<mode>_nospec): New define_insn.
9681         (tablejump): Emit different RTL for
9682         -mno-speculate-indirect-jumps.
9683         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
9684         (tablejumpsi_nospec): New define_expand.
9685         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
9686         (tablejumpdi_nospec): New define_expand.
9687         (*tablejump<mode>_internal1): Disable for
9688         -mno-speculate-indirect-jumps.
9689         (*tablejump<mode>_internal1_nospec): New define_insn.
9690         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9691         option.
9693 2018-01-16  Artyom Skrobov tyomitch@gmail.com
9695         * caller-save.c (insert_save): Drop unnecessary parameter.  All
9696         callers updated.
9698 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9699             Richard Biener  <rguenth@suse.de>
9701         PR libgomp/83590
9702         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9703         return early, inline manually is_gimple_sizepos.  Make sure if we
9704         call gimplify_expr we don't end up with a gimple constant.
9705         * tree.c (variably_modified_type_p): Don't return true for
9706         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
9707         * gimplify.h (is_gimple_sizepos): Remove.
9709 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9711         PR tree-optimization/83857
9712         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9713         vectorizable_live_operation for pure SLP statements.
9714         (vectorizable_live_operation): Handle PHIs.
9716 2018-01-16  Richard Biener  <rguenther@suse.de>
9718         PR tree-optimization/83867
9719         * tree-vect-stmts.c (vect_transform_stmt): Precompute
9720         nested_in_vect_loop_p since the scalar stmt may get invalidated.
9722 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9724         PR c/83844
9725         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9726         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9727         If off is not INTEGER_CST, issue a may not be aligned warning
9728         rather than isn't aligned.  Use isn%'t rather than isn't.
9729         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9730         into MULT_EXPR.
9731         <case MULT_EXPR>: Improve the case when bottom and one of the
9732         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9733         operand, in that case check if the other operand is multiple of
9734         bottom divided by the INTEGER_CST operand.
9736 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9738         PR target/83858
9739         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9740         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9741         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9742         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9743         * config/pa/pa.c (pa_function_arg_advance): Likewise.
9744         (pa_function_arg, pa_arg_partial_bytes): Likewise.
9745         (pa_function_arg_size): New function.
9747 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9749         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9750         in a separate statement.
9752 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9754         PR tree-optimization/83847
9755         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9756         group gathers and scatters.
9758 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9760         PR rtl-optimization/86620
9761         * params.def (max-sched-ready-insns): Bump minimum value to 1.
9763         PR rtl-optimization/83213
9764         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9765         to last if both are JUMP_INSNs.
9767         PR tree-optimization/83843
9768         * gimple-ssa-store-merging.c
9769         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9770         store_immediate_info for bswap/nop orig_stores.
9772 2018-01-15  Andrew Waterman  <andrew@sifive.com>
9774         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9775         !TARGET_MUL.
9776         <UDIV>: Increase cost if !TARGET_DIV.
9778 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
9780         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9781         (define_attr "cr_logical_3op"): New.
9782         (cceq_ior_compare): Adjust.
9783         (cceq_ior_compare_complement): Adjust.
9784         (*cceq_rev_compare): Adjust.
9785         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9786         (is_cracked_insn): Adjust.
9787         (insn_must_be_first_in_group): Adjust.
9788         * config/rs6000/40x.md: Adjust.
9789         * config/rs6000/440.md: Adjust.
9790         * config/rs6000/476.md: Adjust.
9791         * config/rs6000/601.md: Adjust.
9792         * config/rs6000/603.md: Adjust.
9793         * config/rs6000/6xx.md: Adjust.
9794         * config/rs6000/7450.md: Adjust.
9795         * config/rs6000/7xx.md: Adjust.
9796         * config/rs6000/8540.md: Adjust.
9797         * config/rs6000/cell.md: Adjust.
9798         * config/rs6000/e300c2c3.md: Adjust.
9799         * config/rs6000/e500mc.md: Adjust.
9800         * config/rs6000/e500mc64.md: Adjust.
9801         * config/rs6000/e5500.md: Adjust.
9802         * config/rs6000/e6500.md: Adjust.
9803         * config/rs6000/mpc.md: Adjust.
9804         * config/rs6000/power4.md: Adjust.
9805         * config/rs6000/power5.md: Adjust.
9806         * config/rs6000/power6.md: Adjust.
9807         * config/rs6000/power7.md: Adjust.
9808         * config/rs6000/power8.md: Adjust.
9809         * config/rs6000/power9.md: Adjust.
9810         * config/rs6000/rs64.md: Adjust.
9811         * config/rs6000/titan.md: Adjust.
9813 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9815         * config/i386/predicates.md (indirect_branch_operand): Rewrite
9816         ix86_indirect_branch_register logic.
9818 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9820         * config/i386/constraints.md (Bs): Update
9821         ix86_indirect_branch_register check.  Don't check
9822         ix86_indirect_branch_register with GOT_memory_operand.
9823         (Bw): Likewise.
9824         * config/i386/predicates.md (GOT_memory_operand): Don't check
9825         ix86_indirect_branch_register here.
9826         (GOT32_symbol_operand): Likewise.
9828 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9830         * config/i386/predicates.md (constant_call_address_operand):
9831         Rewrite ix86_indirect_branch_register logic.
9832         (sibcall_insn_operand): Likewise.
9834 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9836         * config/i386/constraints.md (Bs): Replace
9837         ix86_indirect_branch_thunk_register with
9838         ix86_indirect_branch_register.
9839         (Bw): Likewise.
9840         * config/i386/i386.md (indirect_jump): Likewise.
9841         (tablejump): Likewise.
9842         (*sibcall_memory): Likewise.
9843         (*sibcall_value_memory): Likewise.
9844         Peepholes of indirect call and jump via memory: Likewise.
9845         * config/i386/i386.opt: Likewise.
9846         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9847         (GOT_memory_operand): Likewise.
9848         (call_insn_operand): Likewise.
9849         (sibcall_insn_operand): Likewise.
9850         (GOT32_symbol_operand): Likewise.
9852 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9854         PR middle-end/83837
9855         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9856         type rather than type addr's type points to.
9857         (expand_omp_atomic_mutex): Likewise.
9858         (expand_omp_atomic): Likewise.
9860 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9862         PR target/83839
9863         * config/i386/i386.c (output_indirect_thunk_function): Use
9864         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9865         for  __x86_return_thunk.
9867 2018-01-15  Richard Biener  <rguenther@suse.de>
9869         PR middle-end/83850
9870         * expmed.c (extract_bit_field_1): Fix typo.
9872 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9874         PR target/83687
9875         * config/arm/iterators.md (VF): New mode iterator.
9876         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9877         Remove integer-related logic from pattern.
9878         (neon_vabd<mode>_3): Likewise.
9880 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9882         PR middle-end/82694
9883         * common.opt (fstrict-overflow): No longer an alias.
9884         (fwrapv-pointer): New option.
9885         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
9886         also for pointer types based on flag_wrapv_pointer.
9887         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
9888         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
9889         opts->x_flag_wrapv got set.
9890         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
9891         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
9892         POINTER_TYPE_OVERFLOW_UNDEFINED.
9893         * match.pd: Likewise in address comparison pattern.
9894         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
9896 2018-01-15  Richard Biener  <rguenther@suse.de>
9898         PR lto/83804
9899         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
9900         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
9901         Reset type names to their identifier if their TYPE_DECL doesn't
9902         have linkage (and thus is used for ODR and devirt).
9903         (save_debug_info_for_decl): Remove.
9904         (save_debug_info_for_type): Likewise.
9905         (add_tree_to_fld_list): Adjust.
9906         * tree-pretty-print.c (dump_generic_node): Make dumping of
9907         type names more robust.
9909 2018-01-15  Richard Biener  <rguenther@suse.de>
9911         * BASE-VER: Bump to 8.0.1.
9913 2018-01-14  Martin Sebor  <msebor@redhat.com>
9915         PR other/83508
9916         * builtins.c (check_access): Avoid warning when the no-warning bit
9917         is set.
9919 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
9921         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
9922         * ira-color (allocno_hard_regs_compare): Likewise.
9924 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
9926         PR target/83013
9927         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
9928         Use .pushsection/.popsection.
9930 2018-01-14  Martin Sebor  <msebor@redhat.com>
9932         PR c++/81327
9933         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
9935 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
9937         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
9938         entry from extra_headers.
9939         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
9940         extra_headers, make the list bitwise identical to the i?86-*-* one.
9942 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9944         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
9945         -mcmodel=large with -mindirect-branch=thunk,
9946         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
9947         -mfunction-return=thunk-extern.
9948         * doc/invoke.texi: Document -mcmodel=large is incompatible with
9949         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
9950         -mfunction-return=thunk and -mfunction-return=thunk-extern.
9952 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9954         * config/i386/i386.c (print_reg): Print the name of the full
9955         integer register without '%'.
9956         (ix86_print_operand): Handle 'V'.
9957          * doc/extend.texi: Document 'V' modifier.
9959 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9961         * config/i386/constraints.md (Bs): Disallow memory operand for
9962         -mindirect-branch-register.
9963         (Bw): Likewise.
9964         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9965         (GOT_memory_operand): Likewise.
9966         (call_insn_operand): Likewise.
9967         (sibcall_insn_operand): Likewise.
9968         (GOT32_symbol_operand): Likewise.
9969         * config/i386/i386.md (indirect_jump): Call convert_memory_address
9970         for -mindirect-branch-register.
9971         (tablejump): Likewise.
9972         (*sibcall_memory): Likewise.
9973         (*sibcall_value_memory): Likewise.
9974         Disallow peepholes of indirect call and jump via memory for
9975         -mindirect-branch-register.
9976         (*call_pop): Replace m with Bw.
9977         (*call_value_pop): Likewise.
9978         (*sibcall_pop_memory): Replace m with Bs.
9979         * config/i386/i386.opt (mindirect-branch-register): New option.
9980         * doc/invoke.texi: Document -mindirect-branch-register option.
9982 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9984         * config/i386/i386-protos.h (ix86_output_function_return): New.
9985         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
9986         set function_return_type.
9987         (indirect_thunk_name): Add ret_p to indicate thunk for function
9988         return.
9989         (output_indirect_thunk_function): Pass false to
9990         indirect_thunk_name.
9991         (ix86_output_indirect_branch_via_reg): Likewise.
9992         (ix86_output_indirect_branch_via_push): Likewise.
9993         (output_indirect_thunk_function): Create alias for function
9994         return thunk if regno < 0.
9995         (ix86_output_function_return): New function.
9996         (ix86_handle_fndecl_attribute): Handle function_return.
9997         (ix86_attribute_table): Add function_return.
9998         * config/i386/i386.h (machine_function): Add
9999         function_return_type.
10000         * config/i386/i386.md (simple_return_internal): Use
10001         ix86_output_function_return.
10002         (simple_return_internal_long): Likewise.
10003         * config/i386/i386.opt (mfunction-return=): New option.
10004         (indirect_branch): Mention -mfunction-return=.
10005         * doc/extend.texi: Document function_return function attribute.
10006         * doc/invoke.texi: Document -mfunction-return= option.
10008 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10010         * config/i386/i386-opts.h (indirect_branch): New.
10011         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10012         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10013         with local indirect jump when converting indirect call and jump.
10014         (ix86_set_indirect_branch_type): New.
10015         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10016         (indirectlabelno): New.
10017         (indirect_thunk_needed): Likewise.
10018         (indirect_thunk_bnd_needed): Likewise.
10019         (indirect_thunks_used): Likewise.
10020         (indirect_thunks_bnd_used): Likewise.
10021         (INDIRECT_LABEL): Likewise.
10022         (indirect_thunk_name): Likewise.
10023         (output_indirect_thunk): Likewise.
10024         (output_indirect_thunk_function): Likewise.
10025         (ix86_output_indirect_branch_via_reg): Likewise.
10026         (ix86_output_indirect_branch_via_push): Likewise.
10027         (ix86_output_indirect_branch): Likewise.
10028         (ix86_output_indirect_jmp): Likewise.
10029         (ix86_code_end): Call output_indirect_thunk_function if needed.
10030         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10031         needed.
10032         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10033         (ix86_attribute_table): Add indirect_branch.
10034         * config/i386/i386.h (machine_function): Add indirect_branch_type
10035         and has_local_indirect_jump.
10036         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10037         to true.
10038         (tablejump): Likewise.
10039         (*indirect_jump): Use ix86_output_indirect_jmp.
10040         (*tablejump_1): Likewise.
10041         (simple_return_indirect_internal): Likewise.
10042         * config/i386/i386.opt (mindirect-branch=): New option.
10043         (indirect_branch): New.
10044         (keep): Likewise.
10045         (thunk): Likewise.
10046         (thunk-inline): Likewise.
10047         (thunk-extern): Likewise.
10048         * doc/extend.texi: Document indirect_branch function attribute.
10049         * doc/invoke.texi: Document -mindirect-branch= option.
10051 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10053         PR ipa/83051
10054         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10056 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10058         * ipa-inline.c (want_inline_small_function_p): Return false if
10059         inlining has already failed with CIF_FINAL_ERROR.
10060         (update_caller_keys): Call want_inline_small_function_p before
10061         can_inline_edge_p.
10062         (update_callee_keys): Likewise.
10064 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10066         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10067         New function.
10068         (rs6000_quadword_masked_address_p): Likewise.
10069         (quad_aligned_load_p): Likewise.
10070         (quad_aligned_store_p): Likewise.
10071         (const_load_sequence_p): Add comment to describe the outer-most loop.
10072         (mimic_memory_attributes_and_flags): New function.
10073         (rs6000_gen_stvx): Likewise.
10074         (replace_swapped_aligned_store): Likewise.
10075         (rs6000_gen_lvx): Likewise.
10076         (replace_swapped_aligned_load): Likewise.
10077         (replace_swapped_load_constant): Capitalize argument name in
10078         comment describing this function.
10079         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10080         and stores that access quad-word aligned addresses and replace
10081         with stvx or lvx instructions when appropriate.
10082         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10083         New function prototype.
10084         (rs6000_quadword_masked_address_p): Likewise.
10085         (rs6000_gen_lvx): Likewise.
10086         (rs6000_gen_stvx): Likewise.
10087         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10088         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10089         when memory address is aligned.
10090         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10091         this split to select lvx instruction when memory address is aligned.
10092         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10093         instruction when memory address is aligned.
10094         (*vsx_le_perm_load_v16qi): Likewise.
10095         (four unnamed splitters): Modify to select the stvx instruction
10096         when memory is aligned.
10098 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10100         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10101         which appears in the queue multiple times.
10103 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10104             Alan Hayward  <alan.hayward@arm.com>
10105             David Sherwood  <david.sherwood@arm.com>
10107         * tree-vectorizer.h (vec_lower_bound): New structure.
10108         (_loop_vec_info): Add check_nonzero and lower_bounds.
10109         (LOOP_VINFO_CHECK_NONZERO): New macro.
10110         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10111         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10112         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10113         fields.  Make seg_len the distance travelled, not including the
10114         access size.
10115         (dr_direction_indicator): Declare.
10116         (dr_zero_step_indicator): Likewise.
10117         (dr_known_forward_stride_p): Likewise.
10118         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10119         tree-ssanames.h.
10120         (runtime_alias_check_p): Allow runtime alias checks with
10121         variable strides.
10122         (operator ==): Compare access_size and align.
10123         (prune_runtime_alias_test_list): Rework for new distinction between
10124         the access_size and seg_len.
10125         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10126         segment lengths.
10127         (get_segment_min_max): New function.
10128         (create_intersect_range_checks): Use it.
10129         (dr_step_indicator): New function.
10130         (dr_direction_indicator): Likewise.
10131         (dr_zero_step_indicator): Likewise.
10132         (dr_known_forward_stride_p): Likewise.
10133         * tree-loop-distribution.c (data_ref_segment_size): Return
10134         DR_STEP * (niters - 1).
10135         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10136         constructor.
10137         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10138         (vect_preserves_scalar_order_p): New function, split out from...
10139         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10140         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10141         (vect_vfa_access_size): New function.
10142         (vect_vfa_align): Likewise.
10143         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10144         (dump_lower_bound): New function.
10145         (vect_check_lower_bound): Likewise.
10146         (vect_small_gap_p): Likewise.
10147         (vectorizable_with_step_bound_p): Likewise.
10148         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10149         depencies if the vectorization factor is 1.  Convert the checks
10150         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10151         a bunds check for variable steps if the minimum required step is
10152         relatively small. Update calls to the dr_with_seg_len
10153         constructor and to vect_compile_time_alias.
10154         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10155         function.
10156         (vect_loop_versioning): Call it.
10157         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10158         when retrying.
10159         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10161 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10162             Alan Hayward  <alan.hayward@arm.com>
10163             David Sherwood  <david.sherwood@arm.com>
10165         * doc/sourcebuild.texi (vect_scatter_store): Document.
10166         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10167         optabs.
10168         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10169         Document.
10170         * genopinit.c (main): Add supports_vec_scatter_store and
10171         supports_vec_scatter_store_cached to target_optabs.
10172         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10173         IFN_MASK_SCATTER_STORE.
10174         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10175         functions.
10176         * internal-fn.h (internal_store_fn_p): Declare.
10177         (internal_fn_stored_value_index): Likewise.
10178         * internal-fn.c (scatter_store_direct): New macro.
10179         (expand_scatter_store_optab_fn): New function.
10180         (direct_scatter_store_optab_supported_p): New macro.
10181         (internal_store_fn_p): New function.
10182         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10183         IFN_MASK_SCATTER_STORE.
10184         (internal_fn_mask_index): Likewise.
10185         (internal_fn_stored_value_index): New function.
10186         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10187         for scatter stores.
10188         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10189         * optabs-query.c (supports_vec_scatter_store_p): New function.
10190         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10191         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10192         true for scatter stores.
10193         (vect_gather_scatter_fn_p): Handle scatter stores too.
10194         (vect_check_gather_scatter): Consider using scatter stores if
10195         supports_vec_scatter_store_p.
10196         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10197         scatter stores too.
10198         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10199         internal_fn_stored_value_index.
10200         (check_load_store_masking): Handle scatter stores too.
10201         (vect_get_store_rhs): Make public.
10202         (vectorizable_call): Use internal_store_fn_p.
10203         (vectorizable_store): Handle scatter store internal functions.
10204         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10205         when deciding whether the end of the group has been reached.
10206         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10207         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10208         (mask_scatter_store<mode>): New insns.
10210 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10211             Alan Hayward  <alan.hayward@arm.com>
10212             David Sherwood  <david.sherwood@arm.com>
10214         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10215         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10216         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10217         function.
10218         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10219         Use vect_truncate_gather_scatter_offset if we can't treat the
10220         operation as a normal gather load or scatter store.
10221         (get_group_load_store_type): Take the gather_scatter_info
10222         as argument.  Try using a gather load or scatter store for
10223         single-element groups.
10224         (get_load_store_type): Update calls to get_group_load_store_type
10225         and vect_use_strided_gather_scatters_p.
10227 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10228             Alan Hayward  <alan.hayward@arm.com>
10229             David Sherwood  <david.sherwood@arm.com>
10231         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10232         optional tree argument.
10233         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10234         null target hooks.
10235         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10236         but continue to use the current value as a fallback.
10237         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10238         to compare the updates.
10239         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10240         (get_load_store_type): Use it when handling a strided access.
10241         (vect_get_strided_load_store_ops): New function.
10242         (vect_get_data_ptr_increment): Likewise.
10243         (vectorizable_load): Handle strided gather loads.  Always pass
10244         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10246 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10247             Alan Hayward  <alan.hayward@arm.com>
10248             David Sherwood  <david.sherwood@arm.com>
10250         * doc/md.texi (gather_load@var{m}): Document.
10251         (mask_gather_load@var{m}): Likewise.
10252         * genopinit.c (main): Add supports_vec_gather_load and
10253         supports_vec_gather_load_cached to target_optabs.
10254         * optabs-tree.c (init_tree_optimization_optabs): Use
10255         ggc_cleared_alloc to allocate target_optabs.
10256         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10257         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10258         functions.
10259         * internal-fn.h (internal_load_fn_p): Declare.
10260         (internal_gather_scatter_fn_p): Likewise.
10261         (internal_fn_mask_index): Likewise.
10262         (internal_gather_scatter_fn_supported_p): Likewise.
10263         * internal-fn.c (gather_load_direct): New macro.
10264         (expand_gather_load_optab_fn): New function.
10265         (direct_gather_load_optab_supported_p): New macro.
10266         (direct_internal_fn_optab): New function.
10267         (internal_load_fn_p): Likewise.
10268         (internal_gather_scatter_fn_p): Likewise.
10269         (internal_fn_mask_index): Likewise.
10270         (internal_gather_scatter_fn_supported_p): Likewise.
10271         * optabs-query.c (supports_at_least_one_mode_p): New function.
10272         (supports_vec_gather_load_p): Likewise.
10273         * optabs-query.h (supports_vec_gather_load_p): Declare.
10274         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10275         and memory_type field.
10276         (NUM_PATTERNS): Bump to 15.
10277         * tree-vect-data-refs.c: Include internal-fn.h.
10278         (vect_gather_scatter_fn_p): New function.
10279         (vect_describe_gather_scatter_call): Likewise.
10280         (vect_check_gather_scatter): Try using internal functions for
10281         gather loads.  Recognize existing calls to a gather load function.
10282         (vect_analyze_data_refs): Consider using gather loads if
10283         supports_vec_gather_load_p.
10284         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10285         (vect_get_gather_scatter_offset_type): Likewise.
10286         (vect_convert_mask_for_vectype): Likewise.
10287         (vect_add_conversion_to_patterm): Likewise.
10288         (vect_try_gather_scatter_pattern): Likewise.
10289         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10290         (vect_vect_recog_func_ptrs): Add it.
10291         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10292         internal_fn_mask_index and internal_gather_scatter_fn_p.
10293         (check_load_store_masking): Take the gather_scatter_info as an
10294         argument and handle gather loads.
10295         (vect_get_gather_scatter_ops): New function.
10296         (vectorizable_call): Check internal_load_fn_p.
10297         (vectorizable_load): Likewise.  Handle gather load internal
10298         functions.
10299         (vectorizable_store): Update call to check_load_store_masking.
10300         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10301         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10302         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10303         (aarch64_gather_scale_operand_d): New predicates.
10304         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10305         (mask_gather_load<mode>): New insns.
10307 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10308             Alan Hayward  <alan.hayward@arm.com>
10309             David Sherwood  <david.sherwood@arm.com>
10311         * optabs.def (fold_left_plus_optab): New optab.
10312         * doc/md.texi (fold_left_plus_@var{m}): Document.
10313         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10314         * internal-fn.c (fold_left_direct): Define.
10315         (expand_fold_left_optab_fn): Likewise.
10316         (direct_fold_left_optab_supported_p): Likewise.
10317         * fold-const-call.c (fold_const_fold_left): New function.
10318         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10319         * tree-parloops.c (valid_reduction_p): New function.
10320         (gather_scalar_reductions): Use it.
10321         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10322         (vect_finish_replace_stmt): Declare.
10323         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10324         (needs_fold_left_reduction_p): New function, split out from...
10325         (vect_is_simple_reduction): ...here.  Accept reductions that
10326         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10327         (vect_force_simple_reduction): Also store the reduction type in
10328         the assignment's STMT_VINFO_REDUC_TYPE.
10329         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10330         (merge_with_identity): New function.
10331         (vect_expand_fold_left): Likewise.
10332         (vectorize_fold_left_reduction): Likewise.
10333         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10334         scalar phi in place for it.  Check for target support and reject
10335         cases that would reassociate the operation.  Defer the transform
10336         phase to vectorize_fold_left_reduction.
10337         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10338         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10339         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10341 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10343         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10344         call to ifc_temp_var.
10346 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10347             Alan Hayward  <alan.hayward@arm.com>
10348             David Sherwood  <david.sherwood@arm.com>
10350         * target.def (legitimize_address_displacement): Take the original
10351         offset as a poly_int.
10352         * targhooks.h (default_legitimize_address_displacement): Update
10353         accordingly.
10354         * targhooks.c (default_legitimize_address_displacement): Likewise.
10355         * doc/tm.texi: Regenerate.
10356         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10357         as an argument, moving assert of ad->disp == ad->disp_term to...
10358         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10359         Try calling targetm.legitimize_address_displacement before expanding
10360         the address rather than afterwards, and adjust for the new interface.
10361         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10362         Match the new hook interface.  Handle SVE addresses.
10363         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10364         new hook interface.
10366 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10368         * Makefile.in (OBJS): Add early-remat.o.
10369         * target.def (select_early_remat_modes): New hook.
10370         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10371         * doc/tm.texi: Regenerate.
10372         * targhooks.h (default_select_early_remat_modes): Declare.
10373         * targhooks.c (default_select_early_remat_modes): New function.
10374         * timevar.def (TV_EARLY_REMAT): New timevar.
10375         * passes.def (pass_early_remat): New pass.
10376         * tree-pass.h (make_pass_early_remat): Declare.
10377         * early-remat.c: New file.
10378         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10379         function.
10380         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10382 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10383             Alan Hayward  <alan.hayward@arm.com>
10384             David Sherwood  <david.sherwood@arm.com>
10386         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10387         vfm1 with a bound_epilog parameter.
10388         (vect_do_peeling): Update calls accordingly, and move the prologue
10389         call earlier in the function.  Treat the base bound_epilog as 0 for
10390         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10391         this base when peeling for gaps.
10392         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10393         with fully-masked loops.
10394         (vect_estimate_min_profitable_iters): Handle the single peeled
10395         iteration in that case.
10397 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10398             Alan Hayward  <alan.hayward@arm.com>
10399             David Sherwood  <david.sherwood@arm.com>
10401         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10402         single-element interleaving even if the size is not a power of 2.
10403         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10404         accesses for single-element interleaving if the group size is
10405         not a power of 2.
10407 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10408             Alan Hayward  <alan.hayward@arm.com>
10409             David Sherwood  <david.sherwood@arm.com>
10411         * doc/md.texi (fold_extract_last_@var{m}): Document.
10412         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10413         * optabs.def (fold_extract_last_optab): New optab.
10414         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10415         * internal-fn.c (fold_extract_direct): New macro.
10416         (expand_fold_extract_optab_fn): Likewise.
10417         (direct_fold_extract_optab_supported_p): Likewise.
10418         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10419         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10420         EXTRACT_LAST_REDUCTION.
10421         (get_initial_def_for_reduction): Do not create an initial vector
10422         for EXTRACT_LAST_REDUCTION reductions.
10423         (vectorizable_reduction): Leave the scalar phi in place for
10424         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10425         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10426         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10427         transform phase to vectorizable_condition.
10428         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10429         split out from...
10430         (vect_finish_stmt_generation): ...here.
10431         (vect_finish_replace_stmt): New function.
10432         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10433         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10434         pattern.
10435         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10437 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10438             Alan Hayward  <alan.hayward@arm.com>
10439             David Sherwood  <david.sherwood@arm.com>
10441         * doc/md.texi (extract_last_@var{m}): Document.
10442         * optabs.def (extract_last_optab): New optab.
10443         * internal-fn.def (EXTRACT_LAST): New internal function.
10444         * internal-fn.c (cond_unary_direct): New macro.
10445         (expand_cond_unary_optab_fn): Likewise.
10446         (direct_cond_unary_optab_supported_p): Likewise.
10447         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10448         loops using EXTRACT_LAST.
10449         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10450         (extract_last_<mode>): ...this optab.
10451         (vec_extract<mode><Vel>): Update accordingly.
10453 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10454             Alan Hayward  <alan.hayward@arm.com>
10455             David Sherwood  <david.sherwood@arm.com>
10457         * target.def (empty_mask_is_expensive): New hook.
10458         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10459         * doc/tm.texi: Regenerate.
10460         * targhooks.h (default_empty_mask_is_expensive): Declare.
10461         * targhooks.c (default_empty_mask_is_expensive): New function.
10462         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10463         if the target says that empty masks are expensive.
10464         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10465         New function.
10466         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10468 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10469             Alan Hayward  <alan.hayward@arm.com>
10470             David Sherwood  <david.sherwood@arm.com>
10472         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10473         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10474         (vect_use_loop_mask_for_alignment_p): New function.
10475         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10476         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10477         niters_skip argument.  Make sure that the first niters_skip elements
10478         of the first iteration are inactive.
10479         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10480         Update call to vect_set_loop_masks_directly.
10481         (get_misalign_in_elems): New function, split out from...
10482         (vect_gen_prolog_loop_niters): ...here.
10483         (vect_update_init_of_dr): Take a code argument that specifies whether
10484         the adjustment should be added or subtracted.
10485         (vect_update_init_of_drs): Likewise.
10486         (vect_prepare_for_masked_peels): New function.
10487         (vect_do_peeling): Skip prologue peeling if we're using a mask
10488         instead.  Update call to vect_update_inits_of_drs.
10489         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10490         mask_skip_niters.
10491         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10492         alignment.  Do not include the number of peeled iterations in
10493         the minimum threshold in that case.
10494         (vectorizable_induction): Adjust the start value down by
10495         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10496         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10497         Take the number of skipped iterations into account when calculating
10498         the loop bounds.
10499         * tree-vect-stmts.c (vect_gen_while_not): New function.
10501 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10502             Alan Hayward  <alan.hayward@arm.com>
10503             David Sherwood  <david.sherwood@arm.com>
10505         * doc/sourcebuild.texi (vect_fully_masked): Document.
10506         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10507         default value to 0.
10508         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10509         split out from...
10510         (vect_analyze_loop_2): ...here. Don't check the vectorization
10511         factor against the number of loop iterations if the loop is
10512         fully-masked.
10514 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10515             Alan Hayward  <alan.hayward@arm.com>
10516             David Sherwood  <david.sherwood@arm.com>
10518         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10519         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10520         (dump_groups): Update accordingly.
10521         (iv_use::mem_type): New member variable.
10522         (address_p): New function.
10523         (record_use): Add a mem_type argument and initialize the new
10524         mem_type field.
10525         (record_group_use): Add a mem_type argument.  Use address_p.
10526         Remove obsolete null checks of base_object.  Update call to record_use.
10527         (find_interesting_uses_op): Update call to record_group_use.
10528         (find_interesting_uses_cond): Likewise.
10529         (find_interesting_uses_address): Likewise.
10530         (get_mem_type_for_internal_fn): New function.
10531         (find_address_like_use): Likewise.
10532         (find_interesting_uses_stmt): Try find_address_like_use before
10533         calling find_interesting_uses_op.
10534         (addr_offset_valid_p): Use the iv mem_type field as the type
10535         of the addressed memory.
10536         (add_autoinc_candidates): Likewise.
10537         (get_address_cost): Likewise.
10538         (split_small_address_groups_p): Use address_p.
10539         (split_address_groups): Likewise.
10540         (add_iv_candidate_for_use): Likewise.
10541         (autoinc_possible_for_pair): Likewise.
10542         (rewrite_groups): Likewise.
10543         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10544         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10545         (get_alias_ptr_type_for_ptr_address): New function.
10546         (rewrite_use_address): Rewrite address uses in calls that were
10547         identified by find_address_like_use.
10549 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10550             Alan Hayward  <alan.hayward@arm.com>
10551             David Sherwood  <david.sherwood@arm.com>
10553         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10554         TARGET_MEM_REFs.
10555         * gimple-expr.h (is_gimple_addressable: Likewise.
10556         * gimple-expr.c (is_gimple_address): Likewise.
10557         * internal-fn.c (expand_call_mem_ref): New function.
10558         (expand_mask_load_optab_fn): Use it.
10559         (expand_mask_store_optab_fn): Likewise.
10561 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10562             Alan Hayward  <alan.hayward@arm.com>
10563             David Sherwood  <david.sherwood@arm.com>
10565         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10566         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10567         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10568         (cond_umax@var{mode}): Document.
10569         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10570         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10571         (cond_umin_optab, cond_umax_optab): New optabs.
10572         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10573         (COND_IOR, COND_XOR): New internal functions.
10574         * internal-fn.h (get_conditional_internal_fn): Declare.
10575         * internal-fn.c (cond_binary_direct): New macro.
10576         (expand_cond_binary_optab_fn): Likewise.
10577         (direct_cond_binary_optab_supported_p): Likewise.
10578         (get_conditional_internal_fn): New function.
10579         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10580         Cope with reduction statements that are vectorized as calls rather
10581         than assignments.
10582         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10583         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10584         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10585         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10586         (UNSPEC_COND_EOR): New unspecs.
10587         (optab): Add mappings for them.
10588         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10589         (sve_int_op, sve_fp_op): New int attributes.
10591 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10592             Alan Hayward  <alan.hayward@arm.com>
10593             David Sherwood  <david.sherwood@arm.com>
10595         * optabs.def (while_ult_optab): New optab.
10596         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10597         * internal-fn.def (WHILE_ULT): New internal function.
10598         * internal-fn.h (direct_internal_fn_supported_p): New override
10599         that takes two types as argument.
10600         * internal-fn.c (while_direct): New macro.
10601         (expand_while_optab_fn): New function.
10602         (convert_optab_supported_p): Likewise.
10603         (direct_while_optab_supported_p): New macro.
10604         * wide-int.h (wi::udiv_ceil): New function.
10605         * tree-vectorizer.h (rgroup_masks): New structure.
10606         (vec_loop_masks): New typedef.
10607         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10608         and fully_masked_p.
10609         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10610         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10611         (vect_max_vf): New function.
10612         (slpeel_make_loop_iterate_ntimes): Delete.
10613         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10614         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10615         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10616         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10617         internal-fn.h, stor-layout.h and optabs-query.h.
10618         (vect_set_loop_mask): New function.
10619         (add_preheader_seq): Likewise.
10620         (add_header_seq): Likewise.
10621         (interleave_supported_p): Likewise.
10622         (vect_maybe_permute_loop_masks): Likewise.
10623         (vect_set_loop_masks_directly): Likewise.
10624         (vect_set_loop_condition_masked): Likewise.
10625         (vect_set_loop_condition_unmasked): New function, split out from
10626         slpeel_make_loop_iterate_ntimes.
10627         (slpeel_make_loop_iterate_ntimes): Rename to..
10628         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10629         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10630         (vect_do_peeling): Update call accordingly.
10631         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10632         loops.
10633         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10634         mask_compare_type, can_fully_mask_p and fully_masked_p.
10635         (release_vec_loop_masks): New function.
10636         (_loop_vec_info): Use it to free the loop masks.
10637         (can_produce_all_loop_masks_p): New function.
10638         (vect_get_max_nscalars_per_iter): Likewise.
10639         (vect_verify_full_masking): Likewise.
10640         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10641         retries, and free the mask rgroups before retrying.  Check loop-wide
10642         reasons for disallowing fully-masked loops.  Make the final decision
10643         about whether use a fully-masked loop or not.
10644         (vect_estimate_min_profitable_iters): Do not assume that peeling
10645         for the number of iterations will be needed for fully-masked loops.
10646         (vectorizable_reduction): Disable fully-masked loops.
10647         (vectorizable_live_operation): Likewise.
10648         (vect_halve_mask_nunits): New function.
10649         (vect_double_mask_nunits): Likewise.
10650         (vect_record_loop_mask): Likewise.
10651         (vect_get_loop_mask): Likewise.
10652         (vect_transform_loop): Handle the case in which the final loop
10653         iteration might handle a partial vector.  Call vect_set_loop_condition
10654         instead of slpeel_make_loop_iterate_ntimes.
10655         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
10656         (check_load_store_masking): New function.
10657         (prepare_load_store_mask): Likewise.
10658         (vectorizable_store): Handle fully-masked loops.
10659         (vectorizable_load): Likewise.
10660         (supportable_widening_operation): Use vect_halve_mask_nunits for
10661         booleans.
10662         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
10663         (vect_gen_while): New function.
10664         * config/aarch64/aarch64.md (umax<mode>3): New expander.
10665         (aarch64_uqdec<mode>): New insn.
10667 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10668             Alan Hayward  <alan.hayward@arm.com>
10669             David Sherwood  <david.sherwood@arm.com>
10671         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
10672         (reduc_xor_scal_optab): New optabs.
10673         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
10674         (reduc_xor_scal_@var{m}): Document.
10675         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
10676         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
10677         internal functions.
10678         * fold-const-call.c (fold_const_call): Handle them.
10679         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
10680         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
10681         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
10682         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
10683         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
10684         (UNSPEC_XORV): New unspecs.
10685         (optab): Add entries for them.
10686         (BITWISEV): New int iterator.
10687         (bit_reduc_op): New int attributes.
10689 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10690             Alan Hayward  <alan.hayward@arm.com>
10691             David Sherwood  <david.sherwood@arm.com>
10693         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10694         * internal-fn.def (VEC_SHL_INSERT): New internal function.
10695         * optabs.def (vec_shl_insert_optab): New optab.
10696         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10697         (duplicate_and_interleave): Likewise.
10698         * tree-vect-loop.c: Include internal-fn.h.
10699         (neutral_op_for_slp_reduction): New function, split out from
10700         get_initial_defs_for_reduction.
10701         (get_initial_def_for_reduction): Handle option 2 for variable-length
10702         vectors by loading the neutral value into a vector and then shifting
10703         the initial value into element 0.
10704         (get_initial_defs_for_reduction): Replace the code argument with
10705         the neutral value calculated by neutral_op_for_slp_reduction.
10706         Use gimple_build_vector for constant-length vectors.
10707         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10708         but the first group_size elements have a neutral value.
10709         Use duplicate_and_interleave otherwise.
10710         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10711         Update call to get_initial_defs_for_reduction.  Handle SLP
10712         reductions for variable-length vectors by creating one vector
10713         result for each scalar result, with the elements associated
10714         with other scalar results stubbed out with the neutral value.
10715         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10716         Require IFN_VEC_SHL_INSERT for double reductions on
10717         variable-length vectors, or SLP reductions that have
10718         a neutral value.  Require can_duplicate_and_interleave_p
10719         support for variable-length unchained SLP reductions if there
10720         is no neutral value, such as for MIN/MAX reductions.  Also require
10721         the number of vector elements to be a multiple of the number of
10722         SLP statements when doing variable-length unchained SLP reductions.
10723         Update call to vect_create_epilog_for_reduction.
10724         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10725         and remove initial values.
10726         (duplicate_and_interleave): Make public.
10727         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10728         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10730 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10731             Alan Hayward  <alan.hayward@arm.com>
10732             David Sherwood  <david.sherwood@arm.com>
10734         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10735         (can_duplicate_and_interleave_p): New function.
10736         (vect_get_and_check_slp_defs): Take the vector of statements
10737         rather than just the current one.  Remove excess parentheses.
10738         Restriction rejectinon of vect_constant_def and vect_external_def
10739         for variable-length vectors to boolean types, or types for which
10740         can_duplicate_and_interleave_p is false.
10741         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10742         (duplicate_and_interleave): New function.
10743         (vect_get_constant_vectors): Use gimple_build_vector for
10744         constant-length vectors and suitable variable-length constant
10745         vectors.  Use duplicate_and_interleave for other variable-length
10746         vectors.  Don't defer the update when inserting new statements.
10748 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10749             Alan Hayward  <alan.hayward@arm.com>
10750             David Sherwood  <david.sherwood@arm.com>
10752         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10753         min_profitable_iters doesn't go negative.
10755 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10756             Alan Hayward  <alan.hayward@arm.com>
10757             David Sherwood  <david.sherwood@arm.com>
10759         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10760         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10761         * optabs.def (vec_mask_load_lanes_optab): New optab.
10762         (vec_mask_store_lanes_optab): Likewise.
10763         * internal-fn.def (MASK_LOAD_LANES): New internal function.
10764         (MASK_STORE_LANES): Likewise.
10765         * internal-fn.c (mask_load_lanes_direct): New macro.
10766         (mask_store_lanes_direct): Likewise.
10767         (expand_mask_load_optab_fn): Handle masked operations.
10768         (expand_mask_load_lanes_optab_fn): New macro.
10769         (expand_mask_store_optab_fn): Handle masked operations.
10770         (expand_mask_store_lanes_optab_fn): New macro.
10771         (direct_mask_load_lanes_optab_supported_p): Likewise.
10772         (direct_mask_store_lanes_optab_supported_p): Likewise.
10773         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10774         parameter.
10775         (vect_load_lanes_supported): Likewise.
10776         * tree-vect-data-refs.c (strip_conversion): New function.
10777         (can_group_stmts_p): Likewise.
10778         (vect_analyze_data_ref_accesses): Use it instead of checking
10779         for a pair of assignments.
10780         (vect_store_lanes_supported): Take a masked_p parameter.
10781         (vect_load_lanes_supported): Likewise.
10782         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10783         vect_store_lanes_supported and vect_load_lanes_supported.
10784         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10785         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10786         parameter.  Don't allow gaps for masked accesses.
10787         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
10788         and vect_load_lanes_supported.
10789         (get_load_store_type): Take a masked_p parameter and update
10790         call to get_group_load_store_type.
10791         (vectorizable_store): Update call to get_load_store_type.
10792         Handle IFN_MASK_STORE_LANES.
10793         (vectorizable_load): Update call to get_load_store_type.
10794         Handle IFN_MASK_LOAD_LANES.
10796 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10797             Alan Hayward  <alan.hayward@arm.com>
10798             David Sherwood  <david.sherwood@arm.com>
10800         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10801         modes for SVE.
10802         * config/aarch64/aarch64-protos.h
10803         (aarch64_sve_struct_memory_operand_p): Declare.
10804         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10805         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10806         (VPRED, vpred): Handle SVE structure modes.
10807         * config/aarch64/constraints.md (Utx): New constraint.
10808         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10809         (aarch64_sve_struct_nonimmediate_operand): New predicates.
10810         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10811         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10812         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10813         structure modes.  Split into pieces after RA.
10814         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10815         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10816         New patterns.
10817         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10818         SVE structure modes.
10819         (aarch64_classify_address): Likewise.
10820         (sizetochar): Move earlier in file.
10821         (aarch64_print_operand): Handle SVE register lists.
10822         (aarch64_array_mode): New function.
10823         (aarch64_sve_struct_memory_operand_p): Likewise.
10824         (TARGET_ARRAY_MODE): Redefine.
10826 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10827             Alan Hayward  <alan.hayward@arm.com>
10828             David Sherwood  <david.sherwood@arm.com>
10830         * target.def (array_mode): New target hook.
10831         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10832         * doc/tm.texi: Regenerate.
10833         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10834         * hooks.c (hook_optmode_mode_uhwi_none): New function.
10835         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10836         targetm.array_mode.
10837         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
10838         type sizes.
10840 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10841             Alan Hayward  <alan.hayward@arm.com>
10842             David Sherwood  <david.sherwood@arm.com>
10844         * fold-const.c (fold_binary_loc): Check the argument types
10845         rather than the result type when testing for a vector operation.
10847 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10849         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10850         * doc/tm.texi: Regenerate.
10852 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10853             Alan Hayward  <alan.hayward@arm.com>
10854             David Sherwood  <david.sherwood@arm.com>
10856         * doc/invoke.texi (-msve-vector-bits=): Document new option.
10857         (sve): Document new AArch64 extension.
10858         * doc/md.texi (w): Extend the description of the AArch64
10859         constraint to include SVE vectors.
10860         (Upl, Upa): Document new AArch64 predicate constraints.
10861         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10862         enum.
10863         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10864         (msve-vector-bits=): New option.
10865         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10866         SVE when these are disabled.
10867         (sve): New extension.
10868         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10869         modes.  Adjust their number of units based on aarch64_sve_vg.
10870         (MAX_BITSIZE_MODE_ANY_MODE): Define.
10871         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10872         aarch64_addr_query_type.
10873         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10874         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10875         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10876         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10877         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10878         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10879         (aarch64_simd_imm_zero_p): Delete.
10880         (aarch64_check_zero_based_sve_index_immediate): Declare.
10881         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10882         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10883         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10884         (aarch64_sve_float_mul_immediate_p): Likewise.
10885         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10886         rather than an rtx.
10887         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
10888         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
10889         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
10890         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
10891         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
10892         (aarch64_regmode_natural_size): Likewise.
10893         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
10894         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
10895         left one place.
10896         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
10897         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
10898         for VG and the SVE predicate registers.
10899         (V_ALIASES): Add a "z"-prefixed alias.
10900         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
10901         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
10902         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
10903         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
10904         (REG_CLASS_NAMES): Add entries for them.
10905         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
10906         and the predicate registers.
10907         (aarch64_sve_vg): Declare.
10908         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
10909         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
10910         (REGMODE_NATURAL_SIZE): Define.
10911         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
10912         SVE macros.
10913         * config/aarch64/aarch64.c: Include cfgrtl.h.
10914         (simd_immediate_info): Add a constructor for series vectors,
10915         and an associated step field.
10916         (aarch64_sve_vg): New variable.
10917         (aarch64_dbx_register_number): Handle VG and the predicate registers.
10918         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
10919         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
10920         (VEC_ANY_DATA, VEC_STRUCT): New constants.
10921         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
10922         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
10923         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
10924         (aarch64_get_mask_mode): New functions.
10925         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
10926         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
10927         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
10928         predicate modes and predicate registers.  Explicitly restrict
10929         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
10930         to store a vector mode if it is recognized by
10931         aarch64_classify_vector_mode.
10932         (aarch64_regmode_natural_size): New function.
10933         (aarch64_hard_regno_caller_save_mode): Return the original mode
10934         for predicates.
10935         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
10936         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
10937         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
10938         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
10939         functions.
10940         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
10941         does not overlap dest if the function is frame-related.  Handle
10942         SVE constants.
10943         (aarch64_split_add_offset): New function.
10944         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
10945         them aarch64_add_offset.
10946         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
10947         and update call to aarch64_sub_sp.
10948         (aarch64_add_cfa_expression): New function.
10949         (aarch64_expand_prologue): Pass extra temporary registers to the
10950         functions above.  Handle the case in which we need to emit new
10951         DW_CFA_expressions for registers that were originally saved
10952         relative to the stack pointer, but now have to be expressed
10953         relative to the frame pointer.
10954         (aarch64_output_mi_thunk): Pass extra temporary registers to the
10955         functions above.
10956         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
10957         IP0 and IP1 values for SVE frames.
10958         (aarch64_expand_vec_series): New function.
10959         (aarch64_expand_sve_widened_duplicate): Likewise.
10960         (aarch64_expand_sve_const_vector): Likewise.
10961         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
10962         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
10963         into the register, rather than emitting a SET directly.
10964         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
10965         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
10966         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
10967         (offset_9bit_signed_scaled_p): New functions.
10968         (aarch64_replicate_bitmask_imm): New function.
10969         (aarch64_bitmask_imm): Use it.
10970         (aarch64_cannot_force_const_mem): Reject expressions involving
10971         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
10972         (aarch64_classify_index): Handle SVE indices, by requiring
10973         a plain register index with a scale that matches the element size.
10974         (aarch64_classify_address): Handle SVE addresses.  Assert that
10975         the mode of the address is VOIDmode or an integer mode.
10976         Update call to aarch64_classify_symbol.
10977         (aarch64_classify_symbolic_expression): Update call to
10978         aarch64_classify_symbol.
10979         (aarch64_const_vec_all_in_range_p): New function.
10980         (aarch64_print_vector_float_operand): Likewise.
10981         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
10982         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
10983         and the FP immediates 1.0 and 0.5.
10984         (aarch64_print_address_internal): Handle SVE addresses.
10985         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
10986         (aarch64_regno_regclass): Handle predicate registers.
10987         (aarch64_secondary_reload): Handle big-endian reloads of SVE
10988         data modes.
10989         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
10990         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
10991         (aarch64_convert_sve_vector_bits): New function.
10992         (aarch64_override_options): Use it to handle -msve-vector-bits=.
10993         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10994         rather than an rtx.
10995         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
10996         Handle SVE vector and predicate modes.  Accept VL-based constants
10997         that need only one temporary register, and VL offsets that require
10998         no temporary registers.
10999         (aarch64_conditional_register_usage): Mark the predicate registers
11000         as fixed if SVE isn't available.
11001         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11002         Return true for SVE vector and predicate modes.
11003         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11004         rather than an unsigned int.  Handle SVE modes.
11005         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11006         SVE modes.
11007         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11008         if SVE is enabled.
11009         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11010         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11011         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11012         (aarch64_sve_float_mul_immediate_p): New functions.
11013         (aarch64_sve_valid_immediate): New function.
11014         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11015         Explicitly reject structure modes.  Check for INDEX constants.
11016         Handle PTRUE and PFALSE constants.
11017         (aarch64_check_zero_based_sve_index_immediate): New function.
11018         (aarch64_simd_imm_zero_p): Delete.
11019         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11020         vector modes.  Accept constants in the range of CNT[BHWD].
11021         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11022         ask for an Advanced SIMD mode.
11023         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11024         (aarch64_simd_vector_alignment): Handle SVE predicates.
11025         (aarch64_vectorize_preferred_vector_alignment): New function.
11026         (aarch64_simd_vector_alignment_reachable): Use it instead of
11027         the vector size.
11028         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11029         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11030         functions.
11031         (MAX_VECT_LEN): Delete.
11032         (expand_vec_perm_d): Add a vec_flags field.
11033         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11034         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11035         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11036         for SVE modes.
11037         (aarch64_evpc_rev): Rename to...
11038         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11039         (aarch64_evpc_rev_global): New function.
11040         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11041         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11042         MAX_VECT_LEN.
11043         (aarch64_evpc_sve_tbl): New function.
11044         (aarch64_expand_vec_perm_const_1): Update after rename of
11045         aarch64_evpc_rev.  Handle SVE permutes too, trying
11046         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11047         than aarch64_evpc_tbl.
11048         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11049         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11050         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11051         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11052         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11053         (aarch64_expand_sve_vcond): New functions.
11054         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11055         of aarch64_vector_mode_p.
11056         (aarch64_dwarf_poly_indeterminate_value): New function.
11057         (aarch64_compute_pressure_classes): Likewise.
11058         (aarch64_can_change_mode_class): Likewise.
11059         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11060         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11061         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11062         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11063         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11064         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11065         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11066         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11067         constraints.
11068         (Dn, Dl, Dr): Accept const as well as const_vector.
11069         (Dz): Likewise.  Compare against CONST0_RTX.
11070         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11071         of "vector" where appropriate.
11072         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11073         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11074         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11075         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11076         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11077         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11078         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11079         (v_int_equiv): Extend to SVE modes.
11080         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11081         mode attributes.
11082         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11083         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11084         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11085         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11086         (SVE_COND_FP_CMP): New int iterators.
11087         (perm_hilo): Handle the new unpack unspecs.
11088         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11089         attributes.
11090         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11091         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11092         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11093         (aarch64_equality_operator, aarch64_constant_vector_operand)
11094         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11095         (aarch64_sve_nonimmediate_operand): Likewise.
11096         (aarch64_sve_general_operand): Likewise.
11097         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11098         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11099         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11100         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11101         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11102         (aarch64_sve_float_arith_immediate): Likewise.
11103         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11104         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11105         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11106         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11107         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11108         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11109         (aarch64_sve_float_arith_operand): Likewise.
11110         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11111         (aarch64_sve_float_mul_operand): Likewise.
11112         (aarch64_sve_vec_perm_operand): Likewise.
11113         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11114         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11115         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11116         as well as const_vector.
11117         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11118         in file.  Use CONST0_RTX and CONSTM1_RTX.
11119         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11120         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11121         Use aarch64_simd_imm_zero.
11122         * config/aarch64/aarch64-sve.md: New file.
11123         * config/aarch64/aarch64.md: Include it.
11124         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11125         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11126         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11127         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11128         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11129         (sve): New attribute.
11130         (enabled): Disable instructions with the sve attribute unless
11131         TARGET_SVE.
11132         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11133         aarch64_expand_mov_immediate.
11134         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11135         CNT[BHSD] immediates.
11136         (movti): Split CONST_POLY_INT moves into two halves.
11137         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11138         Split additions that need a temporary here if the destination
11139         is the stack pointer.
11140         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11141         (*add<mode>3_poly_1): New instruction.
11142         (set_clobber_cc): New expander.
11144 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11146         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11147         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11148         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11149         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11150         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11151         Change innermode from fixed_mode_size to machine_mode.
11152         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11153         subreg of a variable-length CONST_VECTOR.
11155 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11156             Alan Hayward  <alan.hayward@arm.com>
11157             David Sherwood  <david.sherwood@arm.com>
11159         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11160         (add_offset_to_base): New function, split out from...
11161         (create_mem_ref): ...here.  When handling a scale other than 1,
11162         check first whether the address is valid without the offset.
11163         Add it into the base if so, leaving the index and scale as-is.
11165 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11167         PR c++/83778
11168         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11169         fold_for_warn before checking if arg2 is INTEGER_CST.
11171 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11173         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11174         (store_multiple_operation): Delete.
11175         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11176         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11177         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11178         guarded by TARGET_STRING.
11179         (rs6000_output_load_multiple): Delete.
11180         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11181         OPTION_MASK_STRING / TARGET_STRING handling.
11182         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11183         (const rs6000_opt_masks) <"string">: Change mask to 0.
11184         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11185         (MASK_STRING): Delete.
11186         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11187         parts.  Simplify.
11188         (load_multiple): Delete.
11189         (*ldmsi8): Delete.
11190         (*ldmsi7): Delete.
11191         (*ldmsi6): Delete.
11192         (*ldmsi5): Delete.
11193         (*ldmsi4): Delete.
11194         (*ldmsi3): Delete.
11195         (store_multiple): Delete.
11196         (*stmsi8): Delete.
11197         (*stmsi7): Delete.
11198         (*stmsi6): Delete.
11199         (*stmsi5): Delete.
11200         (*stmsi4): Delete.
11201         (*stmsi3): Delete.
11202         (movmemsi_8reg): Delete.
11203         (corresponding unnamed define_insn): Delete.
11204         (movmemsi_6reg): Delete.
11205         (corresponding unnamed define_insn): Delete.
11206         (movmemsi_4reg): Delete.
11207         (corresponding unnamed define_insn): Delete.
11208         (movmemsi_2reg): Delete.
11209         (corresponding unnamed define_insn): Delete.
11210         (movmemsi_1reg): Delete.
11211         (corresponding unnamed define_insn): Delete.
11212         * config/rs6000/rs6000.opt (mno-string): New.
11213         (mstring): Replace by deprecation warning stub.
11214         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11216 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11218         * regrename.c (regrename_do_replace): If replacing the same
11219         reg multiple times, try to reuse last created gen_raw_REG.
11221         PR debug/81155
11222         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11223         main to workaround a bug in GDB.
11225 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11227         PR target/83737
11228         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11230 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11232         PR rtl-optimization/80481
11233         * ira-color.c (get_cap_member): New function.
11234         (allocnos_conflict_by_live_ranges_p): Use it.
11235         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11236         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11238 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11240         PR target/83628
11241         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11242         (*saddl_se_1): Ditto.
11243         (*ssubsi_1): Ditto.
11244         (*ssubl_se_1): Ditto.
11246 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11248         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11249         rather than wi::to_widest for DR_INITs.
11250         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11251         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11252         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11253         INTEGER_CSTs.
11254         (vect_analyze_group_access_1): Note that here.
11256 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11258         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11259         polynomial type sizes.
11261 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11263         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11264         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11265         (gimple_add_tmp_var): Likewise.
11267 2018-01-12  Martin Liska  <mliska@suse.cz>
11269         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11270         (gimple_alloc_sizes): Likewise.
11271         (dump_gimple_statistics): Use PRIu64 in printf format.
11272         * gimple.h: Change uint64_t to int.
11274 2018-01-12  Martin Liska  <mliska@suse.cz>
11276         * tree-core.h: Use uint64_t instead of int.
11277         * tree.c (tree_node_counts): Likewise.
11278         (tree_node_sizes): Likewise.
11279         (dump_tree_statistics): Use PRIu64 in printf format.
11281 2018-01-12  Martin Liska  <mliska@suse.cz>
11283         * Makefile.in: As qsort_chk is implemented in vec.c, add
11284         vec.o to linkage of gencfn-macros.
11285         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11286         passing the info to record_node_allocation_statistics.
11287         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11288         and pass the info.
11289         * ggc-common.c (struct ggc_usage): Add operator== and use
11290         it in operator< and compare function.
11291         * mem-stats.h (struct mem_usage): Likewise.
11292         * vec.c (struct vec_usage): Remove operator< and compare
11293         function. Can be simply inherited.
11295 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11297         PR target/81616
11298         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11299         * tree-ssa-math-opts.c: Include domwalk.h.
11300         (convert_mult_to_fma_1): New function.
11301         (fma_transformation_info): New type.
11302         (fma_deferring_state): Likewise.
11303         (cancel_fma_deferring): New function.
11304         (result_of_phi): Likewise.
11305         (last_fma_candidate_feeds_initial_phi): Likewise.
11306         (convert_mult_to_fma): Added deferring logic, split actual
11307         transformation to convert_mult_to_fma_1.
11308         (math_opts_dom_walker): New type.
11309         (math_opts_dom_walker::after_dom_children): New method, body moved
11310         here from pass_optimize_widening_mul::execute, added deferring logic
11311         bits.
11312         (pass_optimize_widening_mul::execute): Moved most of code to
11313         math_opts_dom_walker::after_dom_children.
11314         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11315         * config/i386/i386.c (ix86_option_override_internal): Added
11316         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11318 2018-01-12  Richard Biener  <rguenther@suse.de>
11320         PR debug/83157
11321         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11322         inline instance vars.
11324 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11326         PR target/81819
11327         * config/rx/rx.c (rx_is_restricted_memory_address):
11328         Handle SUBREG case.
11330 2018-01-12  Richard Biener  <rguenther@suse.de>
11332         PR tree-optimization/80846
11333         * target.def (split_reduction): New target hook.
11334         * targhooks.c (default_split_reduction): New function.
11335         * targhooks.h (default_split_reduction): Declare.
11336         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11337         target requests first reduce vectors by combining low and high
11338         parts.
11339         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11340         (get_vectype_for_scalar_type_and_size): Export.
11341         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11342         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11343         * doc/tm.texi: Regenerate.
11344         * config/i386/i386.c (ix86_split_reduction): Implement
11345         TARGET_VECTORIZE_SPLIT_REDUCTION.
11347 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11349         PR target/83368
11350         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11351         in PIC mode except for TARGET_VXWORKS_RTP.
11352         * config/sparc/sparc.c: Include cfgrtl.h.
11353         (TARGET_INIT_PIC_REG): Define.
11354         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11355         (sparc_pic_register_p): New predicate.
11356         (sparc_legitimate_address_p): Use it.
11357         (sparc_legitimize_pic_address): Likewise.
11358         (sparc_delegitimize_address): Likewise.
11359         (sparc_mode_dependent_address_p): Likewise.
11360         (gen_load_pcrel_sym): Remove 4th parameter.
11361         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11362         (sparc_expand_prologue): Do not call load_got_register here.
11363         (sparc_flat_expand_prologue): Likewise.
11364         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11365         (sparc_use_pseudo_pic_reg): New function.
11366         (sparc_init_pic_reg): Likewise.
11367         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11368         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11370 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11372         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11373         Add item for branch_cost.
11375 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11377         PR rtl-optimization/83565
11378         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11379         not extend the result to a larger mode for rotate operations.
11380         (num_sign_bit_copies1): Likewise.
11382 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11384         PR target/40411
11385         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11386         -symbolic.
11387         Use values-Xc.o for -pedantic.
11388         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11390 2018-01-12  Martin Liska  <mliska@suse.cz>
11392         PR ipa/83054
11393         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11394         New function.
11395         (possible_polymorphic_call_targets): Use it.
11396         (ipa_devirt): Likewise.
11398 2018-01-12  Martin Liska  <mliska@suse.cz>
11400         * profile-count.h (enum profile_quality): Use 0 as invalid
11401         enum value of profile_quality.
11403 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11405         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11406         -mext-string options.
11408 2018-01-12  Richard Biener  <rguenther@suse.de>
11410         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11411         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11412         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11413         Likewise.
11414         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11416 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11418         * configure.ac (--with-long-double-format): Add support for the
11419         configuration option to change the default long double format on
11420         PowerPC systems.
11421         * config.gcc (powerpc*-linux*-*): Likewise.
11422         * configure: Regenerate.
11423         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11424         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11425         used without modification.
11427 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11429         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11430         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11431         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11432         MISC_BUILTIN_SPEC_BARRIER.
11433         (rs6000_init_builtins): Likewise.
11434         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11435         enum value.
11436         (speculation_barrier): New define_insn.
11437         * doc/extend.texi: Document __builtin_speculation_barrier.
11439 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11441         PR target/83203
11442         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11443         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11444         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11445         iterators.
11446         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11447         integral modes instead of "ss" and "sd".
11448         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11449         vectors with 32-bit and 64-bit elements.
11450         (vecdupssescalarmodesuffix): New mode attribute.
11451         (vec_dup<mode>): Use it.
11453 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11455         PR target/83330
11456         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11457         frame if argument is passed on stack.
11459 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11461         PR target/82682
11462         * ree.c (combine_reaching_defs): Optimize also
11463         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11464         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11466 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11468         PR middle-end/83189
11469         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11471 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11473         PR middle-end/83718
11474         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11475         after they are computed.
11477 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11479         PR tree-optimization/83695
11480         * gimple-loop-linterchange.cc
11481         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11482         reset cached scev information after interchange.
11483         (pass_linterchange::execute): Remove call to scev_reset_htab.
11485 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11487         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11488         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11489         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11490         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11491         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11492         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11493         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11494         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11495         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11496         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11497         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11498         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11499         (V_lane_reg): Likewise.
11500         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11501         New define_expand.
11502         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11503         (vfmal_lane_low<mode>_intrinsic,
11504         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11505         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11506         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11507         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11508         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11509         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11511 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11513         * config/arm/arm-cpus.in (fp16fml): New feature.
11514         (ALL_SIMD): Add fp16fml.
11515         (armv8.2-a): Add fp16fml as an option.
11516         (armv8.3-a): Likewise.
11517         (armv8.4-a): Add fp16fml as part of fp16.
11518         * config/arm/arm.h (TARGET_FP16FML): Define.
11519         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11520         when appropriate.
11521         * config/arm/arm-modes.def (V2HF): Define.
11522         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11523         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11524         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11525         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11526         vfmsl_low, vfmsl_high): New set of builtins.
11527         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11528         (vfml_op): New code attribute.
11529         (VFMLHALVES): New int iterator.
11530         (VFML, VFMLSEL): New mode attributes.
11531         (V_reg): Define mapping for V2HF.
11532         (V_hi, V_lo): New mode attributes.
11533         (VF_constraint): Likewise.
11534         (vfml_half, vfml_half_selector): New int attributes.
11535         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11536         define_expand.
11537         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11538         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11539         New define_insn.
11540         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11541         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11542         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11543         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11544         documentation.
11545         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11546         Document new effective target and option set.
11548 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11550         * config/arm/arm-cpus.in (armv8_4): New feature.
11551         (ARMv8_4a): New fgroup.
11552         (armv8.4-a): New arch.
11553         * config/arm/arm-tables.opt: Regenerate.
11554         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11555         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11556         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11557         Add matching rules for -march=armv8.4-a and extensions.
11558         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11560 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11562         PR target/81821
11563         * config/rx/rx.md (BW): New mode attribute.
11564         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11566 2018-01-11  Richard Biener  <rguenther@suse.de>
11568         PR tree-optimization/83435
11569         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11570         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11571         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11573 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11574             Alan Hayward  <alan.hayward@arm.com>
11575             David Sherwood  <david.sherwood@arm.com>
11577         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11578         field.
11579         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11580         (aarch64_print_address_internal): Use it to check for a zero offset.
11582 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11583             Alan Hayward  <alan.hayward@arm.com>
11584             David Sherwood  <david.sherwood@arm.com>
11586         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11587         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11588         Return a poly_int64 rather than a HOST_WIDE_INT.
11589         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11590         rather than a HOST_WIDE_INT.
11591         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11592         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11593         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11594         final_offset from HOST_WIDE_INT to poly_int64.
11595         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11596         to_constant when getting the number of units in an Advanced SIMD
11597         mode.
11598         (aarch64_builtin_vectorized_function): Check for a constant number
11599         of units.
11600         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11601         GET_MODE_SIZE.
11602         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11603         attribute instead of GET_MODE_NUNITS.
11604         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11605         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11606         GET_MODE_SIZE for fixed-size registers.
11607         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11608         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11609         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11610         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11611         (aarch64_print_operand, aarch64_print_address_internal)
11612         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11613         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11614         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11615         Handle polynomial GET_MODE_SIZE.
11616         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11617         wider than SImode without modification.
11618         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11619         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11620         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11621         passing and returning SVE modes.
11622         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11623         rather than GEN_INT.
11624         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11625         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11626         (aarch64_allocate_and_probe_stack_space): Likewise.
11627         (aarch64_layout_frame): Cope with polynomial offsets.
11628         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11629         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11630         polynomial offsets.
11631         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11632         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11633         poly_int64 rather than a HOST_WIDE_INT.
11634         (aarch64_get_separate_components, aarch64_process_components)
11635         (aarch64_expand_prologue, aarch64_expand_epilogue)
11636         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11637         (aarch64_anchor_offset): New function, split out from...
11638         (aarch64_legitimize_address): ...here.
11639         (aarch64_builtin_vectorization_cost): Handle polynomial
11640         TYPE_VECTOR_SUBPARTS.
11641         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11642         GET_MODE_NUNITS.
11643         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
11644         number of elements from the PARALLEL rather than the mode.
11645         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
11646         rather than GET_MODE_BITSIZE.
11647         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
11648         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
11649         (aarch64_expand_vec_perm_const_1): Handle polynomial
11650         d->perm.length () and d->perm elements.
11651         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
11652         Apply to_constant to d->perm elements.
11653         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
11654         polynomial CONST_VECTOR_NUNITS.
11655         (aarch64_move_pointer): Take amount as a poly_int64 rather
11656         than an int.
11657         (aarch64_progress_pointer): Avoid temporary variable.
11658         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
11659         the mode attribute instead of GET_MODE.
11661 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11662             Alan Hayward  <alan.hayward@arm.com>
11663             David Sherwood  <david.sherwood@arm.com>
11665         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
11666         x exists before using it.
11667         (aarch64_add_constant_internal): Rename to...
11668         (aarch64_add_offset_1): ...this.  Replace regnum with separate
11669         src and dest rtxes.  Handle the case in which they're different,
11670         including when the offset is zero.  Replace scratchreg with an rtx.
11671         Use 2 additions if there is no spare register into which we can
11672         move a 16-bit constant.
11673         (aarch64_add_constant): Delete.
11674         (aarch64_add_offset): Replace reg with separate src and dest
11675         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
11676         Use aarch64_add_offset_1.
11677         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
11678         an rtx rather than an int.  Take the delta as a poly_int64
11679         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
11680         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
11681         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
11682         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
11683         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
11684         and aarch64_add_sp.
11685         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
11686         aarch64_add_constant.
11688 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11690         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11691         Use scalar_float_mode.
11693 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11695         * config/aarch64/aarch64-simd.md
11696         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11697         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11698         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11699         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11700         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11701         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11702         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11703         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11704         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11705         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11707 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11709         PR target/83514
11710         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11711         targ_options->x_arm_arch_string is non NULL.
11713 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
11715         * config/aarch64/aarch64.h
11716         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
11718 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
11720         PR target/82096
11721         * expmed.c (emit_store_flag_force): Swap if const op0
11722         and change VOIDmode to mode of op0.
11724 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11726         PR rtl-optimization/83761
11727         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11728         than bytes to mode_for_size.
11730 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11732         PR middle-end/83189
11733         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11734         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11735         profile.
11737 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11739         PR middle-end/83575
11740         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11741         when in layout mode.
11742         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11743         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11744         partition fixup.
11746 2018-01-10  Michael Collison  <michael.collison@arm.com>
11748         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11749         * config/aarch64/aarch64-option-extension.def: Add
11750         AARCH64_OPT_EXTENSION of 'fp16fml'.
11751         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11752         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11753         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11754         * config/aarch64/constraints.md (Ui7): New constraint.
11755         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11756         (VFMLA_SEL_W): Ditto.
11757         (f16quad): Ditto.
11758         (f16mac1): Ditto.
11759         (VFMLA16_LOW): New int iterator.
11760         (VFMLA16_HIGH): Ditto.
11761         (UNSPEC_FMLAL): New unspec.
11762         (UNSPEC_FMLSL): Ditto.
11763         (UNSPEC_FMLAL2): Ditto.
11764         (UNSPEC_FMLSL2): Ditto.
11765         (f16mac): New code attribute.
11766         * config/aarch64/aarch64-simd-builtins.def
11767         (aarch64_fmlal_lowv2sf): Ditto.
11768         (aarch64_fmlsl_lowv2sf): Ditto.
11769         (aarch64_fmlalq_lowv4sf): Ditto.
11770         (aarch64_fmlslq_lowv4sf): Ditto.
11771         (aarch64_fmlal_highv2sf): Ditto.
11772         (aarch64_fmlsl_highv2sf): Ditto.
11773         (aarch64_fmlalq_highv4sf): Ditto.
11774         (aarch64_fmlslq_highv4sf): Ditto.
11775         (aarch64_fmlal_lane_lowv2sf): Ditto.
11776         (aarch64_fmlsl_lane_lowv2sf): Ditto.
11777         (aarch64_fmlal_laneq_lowv2sf): Ditto.
11778         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11779         (aarch64_fmlalq_lane_lowv4sf): Ditto.
11780         (aarch64_fmlsl_lane_lowv4sf): Ditto.
11781         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11782         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11783         (aarch64_fmlal_lane_highv2sf): Ditto.
11784         (aarch64_fmlsl_lane_highv2sf): Ditto.
11785         (aarch64_fmlal_laneq_highv2sf): Ditto.
11786         (aarch64_fmlsl_laneq_highv2sf): Ditto.
11787         (aarch64_fmlalq_lane_highv4sf): Ditto.
11788         (aarch64_fmlsl_lane_highv4sf): Ditto.
11789         (aarch64_fmlalq_laneq_highv4sf): Ditto.
11790         (aarch64_fmlsl_laneq_highv4sf): Ditto.
11791         * config/aarch64/aarch64-simd.md:
11792         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11793         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11794         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11795         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11796         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11797         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11798         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11799         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11800         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11801         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11802         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11803         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11804         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11805         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11806         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11807         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11808         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11809         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11810         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11811         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11812         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11813         (vfmlsl_low_u32): Ditto.
11814         (vfmlalq_low_u32): Ditto.
11815         (vfmlslq_low_u32): Ditto.
11816         (vfmlal_high_u32): Ditto.
11817         (vfmlsl_high_u32): Ditto.
11818         (vfmlalq_high_u32): Ditto.
11819         (vfmlslq_high_u32): Ditto.
11820         (vfmlal_lane_low_u32): Ditto.
11821         (vfmlsl_lane_low_u32): Ditto.
11822         (vfmlal_laneq_low_u32): Ditto.
11823         (vfmlsl_laneq_low_u32): Ditto.
11824         (vfmlalq_lane_low_u32): Ditto.
11825         (vfmlslq_lane_low_u32): Ditto.
11826         (vfmlalq_laneq_low_u32): Ditto.
11827         (vfmlslq_laneq_low_u32): Ditto.
11828         (vfmlal_lane_high_u32): Ditto.
11829         (vfmlsl_lane_high_u32): Ditto.
11830         (vfmlal_laneq_high_u32): Ditto.
11831         (vfmlsl_laneq_high_u32): Ditto.
11832         (vfmlalq_lane_high_u32): Ditto.
11833         (vfmlslq_lane_high_u32): Ditto.
11834         (vfmlalq_laneq_high_u32): Ditto.
11835         (vfmlslq_laneq_high_u32): Ditto.
11836         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11837         (AARCH64_FL_FOR_ARCH8_4): New.
11838         (AARCH64_ISA_F16FML): New ISA flag.
11839         (TARGET_F16FML): New feature flag for fp16fml.
11840         (doc/invoke.texi): Document new fp16fml option.
11842 2018-01-10  Michael Collison  <michael.collison@arm.com>
11844         * config/aarch64/aarch64-builtins.c:
11845         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11846         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11847         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11848         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11849         (AARCH64_ISA_SHA3): New ISA flag.
11850         (TARGET_SHA3): New feature flag for sha3.
11851         * config/aarch64/iterators.md (sha512_op): New int attribute.
11852         (CRYPTO_SHA512): New int iterator.
11853         (UNSPEC_SHA512H): New unspec.
11854         (UNSPEC_SHA512H2): Ditto.
11855         (UNSPEC_SHA512SU0): Ditto.
11856         (UNSPEC_SHA512SU1): Ditto.
11857         * config/aarch64/aarch64-simd-builtins.def
11858         (aarch64_crypto_sha512hqv2di): New builtin.
11859         (aarch64_crypto_sha512h2qv2di): Ditto.
11860         (aarch64_crypto_sha512su0qv2di): Ditto.
11861         (aarch64_crypto_sha512su1qv2di): Ditto.
11862         (aarch64_eor3qv8hi): Ditto.
11863         (aarch64_rax1qv2di): Ditto.
11864         (aarch64_xarqv2di): Ditto.
11865         (aarch64_bcaxqv8hi): Ditto.
11866         * config/aarch64/aarch64-simd.md:
11867         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11868         (aarch64_crypto_sha512su0qv2di): Ditto.
11869         (aarch64_crypto_sha512su1qv2di): Ditto.
11870         (aarch64_eor3qv8hi): Ditto.
11871         (aarch64_rax1qv2di): Ditto.
11872         (aarch64_xarqv2di): Ditto.
11873         (aarch64_bcaxqv8hi): Ditto.
11874         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11875         (vsha512h2q_u64): Ditto.
11876         (vsha512su0q_u64): Ditto.
11877         (vsha512su1q_u64): Ditto.
11878         (veor3q_u16): Ditto.
11879         (vrax1q_u64): Ditto.
11880         (vxarq_u64): Ditto.
11881         (vbcaxq_u16): Ditto.
11882         * config/arm/types.md (crypto_sha512): New type attribute.
11883         (crypto_sha3): Ditto.
11884         (doc/invoke.texi): Document new sha3 option.
11886 2018-01-10  Michael Collison  <michael.collison@arm.com>
11888         * config/aarch64/aarch64-builtins.c:
11889         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
11890         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11891         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
11892         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
11893         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
11894         (AARCH64_ISA_SM4): New ISA flag.
11895         (TARGET_SM4): New feature flag for sm4.
11896         * config/aarch64/aarch64-simd-builtins.def
11897         (aarch64_sm3ss1qv4si): Ditto.
11898         (aarch64_sm3tt1aq4si): Ditto.
11899         (aarch64_sm3tt1bq4si): Ditto.
11900         (aarch64_sm3tt2aq4si): Ditto.
11901         (aarch64_sm3tt2bq4si): Ditto.
11902         (aarch64_sm3partw1qv4si): Ditto.
11903         (aarch64_sm3partw2qv4si): Ditto.
11904         (aarch64_sm4eqv4si): Ditto.
11905         (aarch64_sm4ekeyqv4si): Ditto.
11906         * config/aarch64/aarch64-simd.md:
11907         (aarch64_sm3ss1qv4si): Ditto.
11908         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
11909         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
11910         (aarch64_sm4eqv4si): Ditto.
11911         (aarch64_sm4ekeyqv4si): Ditto.
11912         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
11913         (sm3part_op): Ditto.
11914         (CRYPTO_SM3TT): Ditto.
11915         (CRYPTO_SM3PART): Ditto.
11916         (UNSPEC_SM3SS1): New unspec.
11917         (UNSPEC_SM3TT1A): Ditto.
11918         (UNSPEC_SM3TT1B): Ditto.
11919         (UNSPEC_SM3TT2A): Ditto.
11920         (UNSPEC_SM3TT2B): Ditto.
11921         (UNSPEC_SM3PARTW1): Ditto.
11922         (UNSPEC_SM3PARTW2): Ditto.
11923         (UNSPEC_SM4E): Ditto.
11924         (UNSPEC_SM4EKEY): Ditto.
11925         * config/aarch64/constraints.md (Ui2): New constraint.
11926         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
11927         * config/arm/types.md (crypto_sm3): New type attribute.
11928         (crypto_sm4): Ditto.
11929         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
11930         (vsm3tt1aq_u32): Ditto.
11931         (vsm3tt1bq_u32): Ditto.
11932         (vsm3tt2aq_u32): Ditto.
11933         (vsm3tt2bq_u32): Ditto.
11934         (vsm3partw1q_u32): Ditto.
11935         (vsm3partw2q_u32): Ditto.
11936         (vsm4eq_u32): Ditto.
11937         (vsm4ekeyq_u32): Ditto.
11938         (doc/invoke.texi): Document new sm4 option.
11940 2018-01-10  Michael Collison  <michael.collison@arm.com>
11942         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
11943         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
11944         (AARCH64_FL_FOR_ARCH8_4): New.
11945         (AARCH64_FL_V8_4): New flag.
11946         (doc/invoke.texi): Document new armv8.4-a option.
11948 2018-01-10  Michael Collison  <michael.collison@arm.com>
11950         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11951         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
11952         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
11953         * config/aarch64/aarch64-option-extension.def: Add
11954         AARCH64_OPT_EXTENSION of 'sha2'.
11955         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
11956         (crypto): Disable sha2 and aes if crypto disabled.
11957         (crypto): Enable aes and sha2 if enabled.
11958         (simd): Disable sha2 and aes if simd disabled.
11959         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
11960         New flags.
11961         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
11962         (TARGET_SHA2): New feature flag for sha2.
11963         (TARGET_AES): New feature flag for aes.
11964         * config/aarch64/aarch64-simd.md:
11965         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
11966         conditional on TARGET_AES.
11967         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
11968         (aarch64_crypto_sha1hsi): Make pattern conditional
11969         on TARGET_SHA2.
11970         (aarch64_crypto_sha1hv4si): Ditto.
11971         (aarch64_be_crypto_sha1hv4si): Ditto.
11972         (aarch64_crypto_sha1su1v4si): Ditto.
11973         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
11974         (aarch64_crypto_sha1su0v4si): Ditto.
11975         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
11976         (aarch64_crypto_sha256su0v4si): Ditto.
11977         (aarch64_crypto_sha256su1v4si): Ditto.
11978         (doc/invoke.texi): Document new aes and sha2 options.
11980 2018-01-10  Martin Sebor  <msebor@redhat.com>
11982         PR tree-optimization/83781
11983         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
11984         as string arrays.
11986 2018-01-11  Martin Sebor  <msebor@gmail.com>
11987             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11989         PR tree-optimization/83501
11990         PR tree-optimization/81703
11992         * tree-ssa-strlen.c (get_string_cst): Rename...
11993         (get_string_len): ...to this.  Handle global constants.
11994         (handle_char_store): Adjust.
11996 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
11997             Jim Wilson  <jimw@sifive.com>
11999         * config/riscv/riscv-protos.h (riscv_output_return): New.
12000         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12001         (riscv_attribute_table, riscv_output_return),
12002         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12003         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12004         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12005         function.
12006         (riscv_expand_prologue): Add early return for naked function.
12007         (riscv_expand_epilogue): Likewise.
12008         (riscv_function_ok_for_sibcall): Return false for naked function.
12009         (riscv_set_current_function): New.
12010         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12011         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12012         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12013         * doc/extend.texi (RISC-V Function Attributes): New.
12015 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12017         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12018         check for 128-bit long double before checking TCmode.
12019         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12020         128-bit long doubles before checking TFmode or TCmode.
12021         (FLOAT128_IBM_P): Likewise.
12023 2018-01-10  Martin Sebor  <msebor@redhat.com>
12025         PR tree-optimization/83671
12026         * builtins.c (c_strlen): Unconditionally return zero for the empty
12027         string.
12028         Use -Warray-bounds for warnings.
12029         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12030         for non-constant array indices with COMPONENT_REF, arrays of
12031         arrays, and pointers to arrays.
12032         (gimple_fold_builtin_strlen): Determine and set length range for
12033         non-constant character arrays.
12035 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12037         PR middle-end/81897
12038         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12039         empty blocks.
12041 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12043         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12045 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12047         PR target/83399
12048         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12049         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12050         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12051         indexed_or_indirect_operand predicate.
12052         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12053         (*vsx_le_perm_load_v8hi): Likewise.
12054         (*vsx_le_perm_load_v16qi): Likewise.
12055         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12056         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12057         (*vsx_le_perm_store_v8hi): Likewise.
12058         (*vsx_le_perm_store_v16qi): Likewise.
12059         (eight unnamed splitters): Likewise.
12061 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12063         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12064         * config/rs6000/emmintrin.h: Likewise.
12065         * config/rs6000/mmintrin.h: Likewise.
12066         * config/rs6000/xmmintrin.h: Likewise.
12068 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12070         PR c++/43486
12071         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12072         "public_flag".
12073         * tree.c (tree_nop_conversion): Return true for location wrapper
12074         nodes.
12075         (maybe_wrap_with_location): New function.
12076         (selftest::check_strip_nops): New function.
12077         (selftest::test_location_wrappers): New function.
12078         (selftest::tree_c_tests): Call it.
12079         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12080         (maybe_wrap_with_location): New decl.
12081         (EXPR_LOCATION_WRAPPER_P): New macro.
12082         (location_wrapper_p): New inline function.
12083         (tree_strip_any_location_wrapper): New inline function.
12085 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12087         PR target/83735
12088         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12089         stack_realign_offset for the largest alignment of stack slot
12090         actually used.
12091         (ix86_find_max_used_stack_alignment): New function.
12092         (ix86_finalize_stack_frame_flags): Use it.  Set
12093         max_used_stack_alignment if we don't realign stack.
12094         * config/i386/i386.h (machine_function): Add
12095         max_used_stack_alignment.
12097 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12099         * config/arm/arm.opt (-mbranch-cost): New option.
12100         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12101         account.
12103 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12105         PR target/83629
12106         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12107         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12109 2018-01-10  Richard Biener  <rguenther@suse.de>
12111         PR debug/83765
12112         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12113         early out so it also covers the case where we have a non-NULL
12114         origin.
12116 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12118         PR tree-optimization/83753
12119         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12120         for non-strided grouped accesses if the number of elements is 1.
12122 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12124         PR target/81616
12125         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12126         * i386.h (TARGET_USE_GATHER): Define.
12127         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12129 2018-01-10  Martin Liska  <mliska@suse.cz>
12131         PR bootstrap/82831
12132         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12133         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12134         partitioning.
12135         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12136         CLEANUP_NO_PARTITIONING is not set.
12138 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12140         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12141         for vectors, as a partial revert of r254296.
12142         * rtl.h (const_vec_p): Delete.
12143         (const_vec_duplicate_p): Don't test for vector CONSTs.
12144         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12145         * expmed.c (make_tree): Likewise.
12147         Revert:
12148         * common.md (E, F): Use CONSTANT_P instead of checking for
12149         CONST_VECTOR.
12150         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12151         checking for CONST_VECTOR.
12153 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12155         PR middle-end/83575
12156         * predict.c (force_edge_cold): Handle in more sane way edges
12157         with no prediction.
12159 2018-01-09  Carl Love  <cel@us.ibm.com>
12161         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12162         V4SI, V4SF types.
12163         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12164         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12165         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12166         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12167         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12168         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12169         * config/rs6000/rs6000-protos.h: Add extern defition for
12170         rs6000_generate_float2_double_code.
12171         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12172         function.
12173         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12174         (float2_v2df): Add define_expand.
12176 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12178         PR target/83628
12179         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12180         op_mode in the force_to_mode call.
12182 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12184         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12185         instead of checking each element individually.
12186         (aarch64_evpc_uzp): Likewise.
12187         (aarch64_evpc_zip): Likewise.
12188         (aarch64_evpc_ext): Likewise.
12189         (aarch64_evpc_rev): Likewise.
12190         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12191         instead of checking each element individually.  Return true without
12192         generating rtl if
12193         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12194         whether all selected elements come from the same input, instead of
12195         checking each element individually.  Remove calls to gen_rtx_REG,
12196         start_sequence and end_sequence and instead assert that no rtl is
12197         generated.
12199 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12201         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12202         order of HIGH and CONST checks.
12204 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12206         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12207         if the destination isn't an SSA_NAME.
12209 2018-01-09  Richard Biener  <rguenther@suse.de>
12211         PR tree-optimization/83668
12212         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12213         move prologue...
12214         (canonicalize_loop_form): ... here, renamed from ...
12215         (canonicalize_loop_closed_ssa_form): ... this and amended to
12216         swap successor edges for loop exit blocks to make us use
12217         the RPO order we need for initial schedule generation.
12219 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12221         PR tree-optimization/64811
12222         * match.pd: When optimizing comparisons with Inf, avoid
12223         introducing or losing exceptions from comparisons with NaN.
12225 2018-01-09  Martin Liska  <mliska@suse.cz>
12227         PR sanitizer/82517
12228         * asan.c (shadow_mem_size): Add gcc_assert.
12230 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12232         Don't save registers in main().
12234         PR target/83738
12235         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12236         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12237         * config/avr/avr.c (avr_set_current_function): Don't error if
12238         naked, OS_task or OS_main are specified at the same time.
12239         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12240         OS_main.
12241         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12242         attribute.
12243         * common/config/avr/avr-common.c (avr_option_optimization_table):
12244         Switch on -mmain-is-OS_task for optimizing compilations.
12246 2018-01-09  Richard Biener  <rguenther@suse.de>
12248         PR tree-optimization/83572
12249         * graphite.c: Include cfganal.h.
12250         (graphite_transform_loops): Connect infinite loops to exit
12251         and remove fake edges at the end.
12253 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12255         * ipa-inline.c (edge_badness): Revert accidental checkin.
12257 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12259         PR ipa/80763
12260         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12261         symbols; not inline clones.
12263 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12265         PR target/83507
12266         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12267         hard registers.  Formatting fixes.
12269         PR preprocessor/83722
12270         * gcc.c (try_generate_repro): Pass
12271         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12272         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12273         do_report_bug.
12275 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12276             Kito Cheng  <kito.cheng@gmail.com>
12278         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12279         (riscv_leaf_function_p): Delete.
12280         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12282 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12284         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12285         function.
12286         (do_ifelse): New function.
12287         (do_isel): New function.
12288         (do_sub3): New function.
12289         (do_add3): New function.
12290         (do_load_mask_compare): New function.
12291         (do_overlap_load_compare): New function.
12292         (expand_compare_loop): New function.
12293         (expand_block_compare): Call expand_compare_loop() when appropriate.
12294         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12295         option description.
12296         (-mblock-compare-inline-loop-limit): New option.
12298 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12300         PR target/83677
12301         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12302         Reverse order of second and third operands in first alternative.
12303         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12304         of first and second elements in UNSPEC_VPERMR vector.
12305         (altivec_expand_vec_perm_le): Likewise.
12307 2018-01-08  Jeff Law  <law@redhat.com>
12309         PR rtl-optimizatin/81308
12310         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12311         (process_switch): If group_case_labels makes a change, then set
12312         cfg_altered.
12313         (pass_convert_switch::execute): If a switch is converted, then
12314         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12316         PR rtl-optimization/81308
12317         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12318         splitting insns.
12320 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12322         PR target/83663 - Revert r255946
12323         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12324         generation for cases where splatting a value is not useful.
12325         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12326         across a vec_duplicate and a paradoxical subreg forming a vector
12327         mode to a vec_concat.
12329 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12331         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12332         -march=armv8.3-a variants.
12333         * config/arm/t-multilib: Likewise.
12334         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12336 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12338         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12339         to generate rtl.
12340         (cceq_ior_compare_complement): Give it a name so I can use it, and
12341         change boolean_or_operator predicate to boolean_operator so it can
12342         be used to generate a crand.
12343         (eqne): New code iterator.
12344         (bd/bd_neg): New code_attrs.
12345         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12346         a single define_insn.
12347         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12348         decrement (bdnzt/bdnzf/bdzt/bdzf).
12349         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12350         with the new names of the branch decrement patterns, and added the
12351         names of the branch decrement conditional patterns.
12353 2018-01-08  Richard Biener  <rguenther@suse.de>
12355         PR tree-optimization/83563
12356         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12357         cache.
12359 2018-01-08  Richard Biener  <rguenther@suse.de>
12361         PR middle-end/83713
12362         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12364 2018-01-08  Richard Biener  <rguenther@suse.de>
12366         PR tree-optimization/83685
12367         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12368         references to abnormals.
12370 2018-01-08  Richard Biener  <rguenther@suse.de>
12372         PR lto/83719
12373         * dwarf2out.c (output_indirect_strings): Handle empty
12374         skeleton_debug_str_hash.
12375         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12377 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12379         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12380         (emit_store_direct): Likewise.
12381         (arc_trampoline_adjust_address): Likewise.
12382         (arc_asm_trampoline_template): New function.
12383         (arc_initialize_trampoline): Use asm_trampoline_template.
12384         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12385         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12386         * config/arc/arc.md (flush_icache): Delete pattern.
12388 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12390         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12391         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12392         munaligned-access.
12394 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12396         PR target/83681
12397         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12398         by not USED_FOR_TARGET.
12399         (make_pass_resolve_sw_modes): Likewise.
12401 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12403         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12404         USED_FOR_TARGET.
12406 2018-01-08  Richard Biener  <rguenther@suse.de>
12408         PR middle-end/83580
12409         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12411 2018-01-08  Richard Biener  <rguenther@suse.de>
12413         PR middle-end/83517
12414         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12416 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12418         PR middle-end/81897
12419         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12420         basic blocks with a small number of successors.
12421         (convert_control_dep_chain_into_preds): Improve handling of
12422         forwarder blocks.
12423         (dump_predicates): Split apart into...
12424         (dump_pred_chain): ...here...
12425         (dump_pred_info): ...and here.
12426         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12427         (can_chain_union_be_invalidated_p): Improve check for invalidation
12428         of paths.
12429         (uninit_uses_cannot_happen): Avoid unnecessary if
12430         convert_control_dep_chain_into_preds yielded nothing.
12432 2018-01-06  Martin Sebor  <msebor@redhat.com>
12434         PR tree-optimization/83640
12435         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12436         subtracting negative offset from size.
12437         (builtin_access::overlap): Adjust offset bounds of the access to fall
12438         within the size of the object if possible.
12440 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12442         PR rtl-optimization/83699
12443         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12444         extract_bit_field_as_subreg to cases in which the extracted
12445         value is also a vector.
12447         * lra-constraints.c (process_alt_operands): Test for the equivalence
12448         substitutions when detecting a possible reload cycle.
12450 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12452         PR debug/83480
12453         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12454         by default if flag_selective_schedling{,2}.  Formatting fixes.
12456         PR rtl-optimization/83682
12457         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12458         if it has non-VECTOR_MODE element mode.
12459         (vec_duplicate_p): Likewise.
12461         PR middle-end/83694
12462         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12463         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12465 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12467         PR target/83604
12468         * config/i386/i386-builtin.def
12469         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12470         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12471         Require also OPTION_MASK_ISA_AVX512F in addition to
12472         OPTION_MASK_ISA_GFNI.
12473         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12474         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12475         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12476         to OPTION_MASK_ISA_GFNI.
12477         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12478         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12479         OPTION_MASK_ISA_AVX512BW.
12480         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12481         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12482         addition to OPTION_MASK_ISA_GFNI.
12483         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12484         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12485         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12486         to OPTION_MASK_ISA_GFNI.
12487         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12488         a requirement for all ISAs rather than any of them with a few
12489         exceptions.
12490         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12491         processing.
12492         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12493         bitmasks to be enabled with 3 exceptions, instead of requiring any
12494         enabled ISA with lots of exceptions.
12495         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12496         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12497         Change avx512bw in isa attribute to avx512f.
12498         * config/i386/sgxintrin.h: Add license boilerplate.
12499         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12500         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12501         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12502         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12503         defined.
12504         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12505         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12506         temporarily sse2 rather than sse if not enabled already.
12508         PR target/83604
12509         * config/i386/sse.md (VI248_VLBW): Rename to ...
12510         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12511         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12512         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12513         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12514         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12515         mode iterator instead of VI248_VLBW.
12517 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12519         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12520         (record_modified): Skip clobbers; add debug output.
12521         (param_change_prob): Use sreal frequencies.
12523 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12525         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12526         punt for user-aligned variables.
12528 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12530         * tree-chrec.c (chrec_contains_symbols): Return true for
12531         POLY_INT_CST.
12533 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12535         PR target/82439
12536         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12537         of (x|y) == x for BICS pattern.
12539 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12541         PR tree-optimization/83605
12542         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12543         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12544         can throw.
12546 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12548         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12549         * config/epiphany/rtems.h: New file.
12551 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12552             Uros Bizjak  <ubizjak@gmail.com>
12554         PR target/83554
12555         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12556         QIreg_operand instead of register_operand predicate.
12557         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12558         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12559         comments instead of -fmitigate[-_]rop.
12561 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12563         PR bootstrap/81926
12564         * cgraphunit.c (symbol_table::compile): Switch to text_section
12565         before calling assembly_start debug hook.
12566         * run-rtl-passes.c (run_rtl_passes): Likewise.
12567         Include output.h.
12569 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12571         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12572         range_int_cst_p rather than !symbolic_range_p before calling
12573         extract_range_from_multiplicative_op_1.
12575 2018-01-04  Jeff Law  <law@redhat.com>
12577         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12578         redundant test in assertion.
12580 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12582         * doc/rtl.texi: Document machine_mode wrapper classes.
12584 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12586         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12587         using tree_to_uhwi.
12589 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12591         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12592         the VEC_PERM_EXPR fold to fail.
12594 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12596         PR debug/83585
12597         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12598         to switched_sections.
12600 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12602         PR target/83680
12603         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12604         test for d.testing.
12606 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12608         PR target/83387
12609         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12610         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12612 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12614         PR debug/83666
12615         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12616         is BLKmode and bitpos not zero or mode change is needed.
12618 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12620         PR target/83675
12621         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12622         TARGET_VIS2.
12624 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12626         PR target/83628
12627         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12628         instead of MULT rtx.  Update all corresponding splitters.
12629         (*saddl_se): Ditto.
12630         (*ssub<modesuffix>): Ditto.
12631         (*ssubl_se): Ditto.
12632         (*cmp_sadd_di): Update split patterns.
12633         (*cmp_sadd_si): Ditto.
12634         (*cmp_sadd_sidi): Ditto.
12635         (*cmp_ssub_di): Ditto.
12636         (*cmp_ssub_si): Ditto.
12637         (*cmp_ssub_sidi): Ditto.
12638         * config/alpha/predicates.md (const23_operand): New predicate.
12639         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12640         Look for ASHIFT, not MULT inner operand.
12641         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
12643 2018-01-04  Martin Liska  <mliska@suse.cz>
12645         PR gcov-profile/83669
12646         * gcov.c (output_intermediate_file): Add version to intermediate
12647         gcov file.
12648         * doc/gcov.texi: Document new field 'version' in intermediate
12649         file format. Fix location of '-k' option of gcov command.
12651 2018-01-04  Martin Liska  <mliska@suse.cz>
12653         PR ipa/82352
12654         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
12656 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12658         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
12660 2018-01-03  Martin Sebor  <msebor@redhat.com>
12662         PR tree-optimization/83655
12663         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
12664         checking calls with invalid arguments.
12666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12668         * tree-vect-stmts.c (vect_get_store_rhs): New function.
12669         (vectorizable_mask_load_store): Delete.
12670         (vectorizable_call): Return false for masked loads and stores.
12671         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
12672         instead of gimple_assign_rhs1.
12673         (vectorizable_load): Handle IFN_MASK_LOAD.
12674         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
12676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12678         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
12679         split out from..,
12680         (vectorizable_mask_load_store): ...here.
12681         (vectorizable_load): ...and here.
12683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12685         * tree-vect-stmts.c (vect_build_all_ones_mask)
12686         (vect_build_zero_merge_argument): New functions, split out from...
12687         (vectorizable_load): ...here.
12689 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12691         * tree-vect-stmts.c (vect_check_store_rhs): New function,
12692         split out from...
12693         (vectorizable_mask_load_store): ...here.
12694         (vectorizable_store): ...and here.
12696 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12698         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12699         split out from...
12700         (vectorizable_mask_load_store): ...here.
12702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12704         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12705         (vect_model_store_cost): Take a vec_load_store_type instead of a
12706         vect_def_type.
12707         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12708         (vect_model_store_cost): Take a vec_load_store_type instead of a
12709         vect_def_type.
12710         (vectorizable_mask_load_store): Update accordingly.
12711         (vectorizable_store): Likewise.
12712         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12714 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12716         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12717         IFN_MASK_LOAD calls here rather than...
12718         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12721             Alan Hayward  <alan.hayward@arm.com>
12722             David Sherwood  <david.sherwood@arm.com>
12724         * expmed.c (extract_bit_field_1): For vector extracts,
12725         fall back to extract_bit_field_as_subreg if vec_extract
12726         isn't available.
12728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12729             Alan Hayward  <alan.hayward@arm.com>
12730             David Sherwood  <david.sherwood@arm.com>
12732         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12733         they are variable or constant sized.
12734         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12735         slots for constant-sized data.
12737 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12738             Alan Hayward  <alan.hayward@arm.com>
12739             David Sherwood  <david.sherwood@arm.com>
12741         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12742         handling COND_EXPRs with boolean comparisons, try to find a better
12743         basis for the mask type than the boolean itself.
12745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12747         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12748         is calculated and how it can be overridden.
12749         * genmodes.c (max_bitsize_mode_any_mode): New variable.
12750         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12751         if defined.
12752         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12753         if nonzero.
12755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12756             Alan Hayward  <alan.hayward@arm.com>
12757             David Sherwood  <david.sherwood@arm.com>
12759         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12760         Remove the mode argument.
12761         (aarch64_simd_valid_immediate): Remove the mode and inverse
12762         arguments.
12763         * config/aarch64/iterators.md (bitsize): New iterator.
12764         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12765         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12766         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12767         aarch64_simd_valid_immediate.
12768         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12769         (aarch64_reg_or_bic_imm): Likewise.
12770         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12771         with an insn_type enum and msl with a modifier_type enum.
12772         Replace element_width with a scalar_mode.  Change the shift
12773         to unsigned int.  Add constructors for scalar_float_mode and
12774         scalar_int_mode elements.
12775         (aarch64_vect_float_const_representable_p): Delete.
12776         (aarch64_can_const_movi_rtx_p)
12777         (aarch64_simd_scalar_immediate_valid_for_move)
12778         (aarch64_simd_make_constant): Update call to
12779         aarch64_simd_valid_immediate.
12780         (aarch64_advsimd_valid_immediate_hs): New function.
12781         (aarch64_advsimd_valid_immediate): Likewise.
12782         (aarch64_simd_valid_immediate): Remove mode and inverse
12783         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
12784         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12785         and aarch64_float_const_representable_p on the result.
12786         (aarch64_output_simd_mov_immediate): Remove mode argument.
12787         Update call to aarch64_simd_valid_immediate and use of
12788         simd_immediate_info.
12789         (aarch64_output_scalar_simd_mov_immediate): Update call
12790         accordingly.
12792 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12793             Alan Hayward  <alan.hayward@arm.com>
12794             David Sherwood  <david.sherwood@arm.com>
12796         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12797         (mode_nunits): Likewise CONST_MODE_NUNITS.
12798         * machmode.def (ADJUST_NUNITS): Document.
12799         * genmodes.c (mode_data::need_nunits_adj): New field.
12800         (blank_mode): Update accordingly.
12801         (adj_nunits): New variable.
12802         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12803         parameter.
12804         (emit_mode_size_inline): Set need_bytesize_adj for all modes
12805         listed in adj_nunits.
12806         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12807         listed in adj_nunits.  Don't emit case statements for such modes.
12808         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12809         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
12810         nothing if adj_nunits is nonnull.
12811         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12812         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12813         (emit_mode_fbit): Update use of print_maybe_const_decl.
12814         (emit_move_size): Likewise.  Treat the array as non-const
12815         if adj_nunits.
12816         (emit_mode_adjustments): Handle adj_nunits.
12818 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12820         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12821         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12822         (VECTOR_MODES): Use it.
12823         (make_vector_modes): Take the prefix as an argument.
12825 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12826             Alan Hayward  <alan.hayward@arm.com>
12827             David Sherwood  <david.sherwood@arm.com>
12829         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12830         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12831         for MODE_VECTOR_BOOL.
12832         * machmode.def (VECTOR_BOOL_MODE): Document.
12833         * genmodes.c (VECTOR_BOOL_MODE): New macro.
12834         (make_vector_bool_mode): New function.
12835         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12836         MODE_VECTOR_BOOL.
12837         * lto-streamer-in.c (lto_input_mode_table): Likewise.
12838         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12839         Likewise.
12840         * stor-layout.c (int_mode_for_mode): Likewise.
12841         * tree.c (build_vector_type_for_mode): Likewise.
12842         * varasm.c (output_constant_pool_2): Likewise.
12843         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12844         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
12845         for MODE_VECTOR_BOOL.
12846         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12847         of mode class checks.
12848         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12849         instead of a list of mode class checks.
12850         (expand_vector_scalar_condition): Likewise.
12851         (type_for_widest_vector_mode): Handle BImode as an inner mode.
12853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12854             Alan Hayward  <alan.hayward@arm.com>
12855             David Sherwood  <david.sherwood@arm.com>
12857         * machmode.h (mode_size): Change from unsigned short to
12858         poly_uint16_pod.
12859         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12860         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12861         or if measurement_type is not polynomial.
12862         (fixed_size_mode::includes_p): Check for constant-sized modes.
12863         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12864         return a poly_uint16 rather than an unsigned short.
12865         (emit_mode_size): Change the type of mode_size from unsigned short
12866         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
12867         (emit_mode_adjustments): Cope with polynomial vector sizes.
12868         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12869         for GET_MODE_SIZE.
12870         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12871         for GET_MODE_SIZE.
12872         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12873         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12874         * caller-save.c (setup_save_areas): Likewise.
12875         (replace_reg_with_saved_mem): Likewise.
12876         * calls.c (emit_library_call_value_1): Likewise.
12877         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12878         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12879         (gen_lowpart_for_combine): Likewise.
12880         * convert.c (convert_to_integer_1): Likewise.
12881         * cse.c (equiv_constant, cse_insn): Likewise.
12882         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
12883         (cselib_subst_to_values): Likewise.
12884         * dce.c (word_dce_process_block): Likewise.
12885         * df-problems.c (df_word_lr_mark_ref): Likewise.
12886         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
12887         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
12888         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
12889         (rtl_for_decl_location): Likewise.
12890         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
12891         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
12892         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
12893         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
12894         (expand_expr_real_1): Likewise.
12895         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
12896         (pad_below): Likewise.
12897         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12898         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
12899         * ira.c (get_subreg_tracking_sizes): Likewise.
12900         * ira-build.c (ira_create_allocno_objects): Likewise.
12901         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
12902         (ira_sort_regnos_for_alter_reg): Likewise.
12903         * ira-costs.c (record_operand_costs): Likewise.
12904         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
12905         (resolve_simple_move): Likewise.
12906         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
12907         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
12908         (lra_constraints): Likewise.
12909         (CONST_POOL_OK_P): Reject variable-sized modes.
12910         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
12911         (add_pseudo_to_slot, lra_spill): Likewise.
12912         * omp-low.c (omp_clause_aligned_alignment): Likewise.
12913         * optabs-query.c (get_best_extraction_insn): Likewise.
12914         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12915         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
12916         (expand_mult_highpart, valid_multiword_target_p): Likewise.
12917         * recog.c (offsettable_address_addr_space_p): Likewise.
12918         * regcprop.c (maybe_mode_change): Likewise.
12919         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
12920         * regrename.c (build_def_use): Likewise.
12921         * regstat.c (dump_reg_info): Likewise.
12922         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
12923         (find_reloads, find_reloads_subreg_address): Likewise.
12924         * reload1.c (eliminate_regs_1): Likewise.
12925         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
12926         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
12927         (simplify_binary_operation_1, simplify_subreg): Likewise.
12928         * targhooks.c (default_function_arg_padding): Likewise.
12929         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
12930         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
12931         (verify_gimple_assign_ternary): Likewise.
12932         * tree-inline.c (estimate_move_cost): Likewise.
12933         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12934         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
12935         (get_address_cost_ainc): Likewise.
12936         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
12937         (vect_supportable_dr_alignment): Likewise.
12938         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12939         (vectorizable_reduction): Likewise.
12940         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
12941         (vectorizable_operation, vectorizable_load): Likewise.
12942         * tree.c (build_same_sized_truth_vector_type): Likewise.
12943         * valtrack.c (cleanup_auto_inc_dec): Likewise.
12944         * var-tracking.c (emit_note_insn_var_location): Likewise.
12945         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
12946         (ADDR_VEC_ALIGN): Likewise.
12948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12949             Alan Hayward  <alan.hayward@arm.com>
12950             David Sherwood  <david.sherwood@arm.com>
12952         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
12953         unsigned short.
12954         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12955         or if measurement_type is polynomial.
12956         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
12957         * combine.c (make_extraction): Likewise.
12958         * dse.c (find_shift_sequence): Likewise.
12959         * dwarf2out.c (mem_loc_descriptor): Likewise.
12960         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
12961         (extract_bit_field, extract_low_bits): Likewise.
12962         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
12963         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
12964         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
12965         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
12966         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12967         * reload.c (find_reloads): Likewise.
12968         * reload1.c (alter_reg): Likewise.
12969         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
12970         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
12971         * tree-if-conv.c (predicate_mem_writes): Likewise.
12972         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
12973         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
12974         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
12975         * valtrack.c (dead_debug_insert_temp): Likewise.
12976         * varasm.c (mergeable_constant_section): Likewise.
12977         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
12979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12980             Alan Hayward  <alan.hayward@arm.com>
12981             David Sherwood  <david.sherwood@arm.com>
12983         * expr.c (expand_assignment): Cope with polynomial mode sizes
12984         when assigning to a CONCAT.
12986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12987             Alan Hayward  <alan.hayward@arm.com>
12988             David Sherwood  <david.sherwood@arm.com>
12990         * machmode.h (mode_precision): Change from unsigned short to
12991         poly_uint16_pod.
12992         (mode_to_precision): Return a poly_uint16 rather than an unsigned
12993         short.
12994         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
12995         or if measurement_type is not polynomial.
12996         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
12997         in which the mode is already known to be a scalar_int_mode.
12998         * genmodes.c (emit_mode_precision): Change the type of mode_precision
12999         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13000         initializer.
13001         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13002         for GET_MODE_PRECISION.
13003         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13004         for GET_MODE_PRECISION.
13005         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13006         as polynomial.
13007         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13008         (expand_field_assignment, make_extraction): Likewise.
13009         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13010         (get_last_value): Likewise.
13011         * convert.c (convert_to_integer_1): Likewise.
13012         * cse.c (cse_insn): Likewise.
13013         * expr.c (expand_expr_real_1): Likewise.
13014         * lra-constraints.c (simplify_operand_subreg): Likewise.
13015         * optabs-query.c (can_atomic_load_p): Likewise.
13016         * optabs.c (expand_atomic_load): Likewise.
13017         (expand_atomic_store): Likewise.
13018         * ree.c (combine_reaching_defs): Likewise.
13019         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13020         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13021         * tree.h (type_has_mode_precision_p): Likewise.
13022         * ubsan.c (instrument_si_overflow): Likewise.
13024 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13025             Alan Hayward  <alan.hayward@arm.com>
13026             David Sherwood  <david.sherwood@arm.com>
13028         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13029         polynomial numbers of units.
13030         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13031         (valid_vector_subparts_p): New function.
13032         (build_vector_type): Remove temporary shim and take the number
13033         of units as a poly_uint64 rather than an int.
13034         (build_opaque_vector_type): Take the number of units as a
13035         poly_uint64 rather than an int.
13036         * tree.c (build_vector_from_ctor): Handle polynomial
13037         TYPE_VECTOR_SUBPARTS.
13038         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13039         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13040         (build_vector_from_val): If the number of units is variable,
13041         use build_vec_duplicate_cst for constant operands and
13042         VEC_DUPLICATE_EXPR otherwise.
13043         (make_vector_type): Remove temporary is_constant ().
13044         (build_vector_type, build_opaque_vector_type): Take the number of
13045         units as a poly_uint64 rather than an int.
13046         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13047         VECTOR_CST_NELTS.
13048         * cfgexpand.c (expand_debug_expr): Likewise.
13049         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13050         (store_constructor, expand_expr_real_1): Likewise.
13051         (const_scalar_mask_from_tree): Likewise.
13052         * fold-const-call.c (fold_const_reduction): Likewise.
13053         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13054         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13055         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13056         (fold_relational_const): Likewise.
13057         (native_interpret_vector): Likewise.  Change the size from an
13058         int to an unsigned int.
13059         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13060         TYPE_VECTOR_SUBPARTS.
13061         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13062         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13063         duplicating a non-constant operand into a variable-length vector.
13064         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13065         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13066         * ipa-icf.c (sem_variable::equals): Likewise.
13067         * match.pd: Likewise.
13068         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13069         * print-tree.c (print_node): Likewise.
13070         * stor-layout.c (layout_type): Likewise.
13071         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13072         * tree-cfg.c (verify_gimple_comparison): Likewise.
13073         (verify_gimple_assign_binary): Likewise.
13074         (verify_gimple_assign_ternary): Likewise.
13075         (verify_gimple_assign_single): Likewise.
13076         * tree-pretty-print.c (dump_generic_node): Likewise.
13077         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13078         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13079         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13080         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13081         (vect_shift_permute_load_chain): Likewise.
13082         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13083         (expand_vector_condition, optimize_vector_constructor): Likewise.
13084         (lower_vec_perm, get_compute_type): Likewise.
13085         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13086         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13087         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13088         (vect_recog_mask_conversion_pattern): Likewise.
13089         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13090         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13091         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13092         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13093         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13094         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13095         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13096         (supportable_widening_operation): Likewise.
13097         (supportable_narrowing_operation): Likewise.
13098         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13099         Likewise.
13100         * varasm.c (output_constant): Likewise.
13102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13103             Alan Hayward  <alan.hayward@arm.com>
13104             David Sherwood  <david.sherwood@arm.com>
13106         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13107         so that both the length == 3 and length != 3 cases set up their
13108         own permute vectors.  Add comments explaining why we know the
13109         number of elements is constant.
13110         (vect_permute_load_chain): Likewise.
13112 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13113             Alan Hayward  <alan.hayward@arm.com>
13114             David Sherwood  <david.sherwood@arm.com>
13116         * machmode.h (mode_nunits): Change from unsigned char to
13117         poly_uint16_pod.
13118         (ONLY_FIXED_SIZE_MODES): New macro.
13119         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13120         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13121         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13122         New typedefs.
13123         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13124         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13125         or if measurement_type is not polynomial.
13126         * genmodes.c (ZERO_COEFFS): New macro.
13127         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13128         poly_uint16.
13129         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13130         Use ZERO_COEFFS when emitting initializers.
13131         * data-streamer.h (bp_pack_poly_value): New function.
13132         (bp_unpack_poly_value): Likewise.
13133         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13134         for GET_MODE_NUNITS.
13135         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13136         for GET_MODE_NUNITS.
13137         * tree.c (make_vector_type): Remove temporary shim and make
13138         the real function take the number of units as a poly_uint64
13139         rather than an int.
13140         (build_vector_type_for_mode): Handle polynomial nunits.
13141         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13142         * emit-rtl.c (const_vec_series_p_1): Likewise.
13143         (gen_rtx_CONST_VECTOR): Likewise.
13144         * fold-const.c (test_vec_duplicate_folding): Likewise.
13145         * genrecog.c (validate_pattern): Likewise.
13146         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13147         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13148         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13149         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13150         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13151         * rtlanal.c (subreg_get_info): Likewise.
13152         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13153         (vect_grouped_load_supported): Likewise.
13154         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13155         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13156         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13157         (simplify_const_unary_operation, simplify_binary_operation_1)
13158         (simplify_const_binary_operation, simplify_ternary_operation)
13159         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13160         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13161         instead of CONST_VECTOR_NUNITS.
13162         * varasm.c (output_constant_pool_2): Likewise.
13163         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13164         explicit-encoded elements in the XVEC for variable-length vectors.
13166 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13168         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13170 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13171             Alan Hayward  <alan.hayward@arm.com>
13172             David Sherwood  <david.sherwood@arm.com>
13174         * coretypes.h (fixed_size_mode): Declare.
13175         (fixed_size_mode_pod): New typedef.
13176         * builtins.h (target_builtins::x_apply_args_mode)
13177         (target_builtins::x_apply_result_mode): Change type to
13178         fixed_size_mode_pod.
13179         * builtins.c (apply_args_size, apply_result_size, result_vector)
13180         (expand_builtin_apply_args_1, expand_builtin_apply)
13181         (expand_builtin_return): Update accordingly.
13183 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13185         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13186         * cselib.c (cselib_hash_rtx): Likewise.
13187         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13188         CONST_VECTOR encoding.
13190 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13191             Jeff Law  <law@redhat.com>
13193         PR target/83641
13194         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13195         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13196         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13197         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13199         PR target/83641
13200         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13201         explicitly probe *sp in a noreturn function if there were any callee
13202         register saves or frame pointer is needed.
13204 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13206         PR debug/83621
13207         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13208         BLKmode for ternary, binary or unary expressions.
13210         PR debug/83645
13211         * var-tracking.c (delete_vta_debug_insn): New inline function.
13212         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13213         insns from get_insns () to NULL instead of each bb separately.
13214         Use delete_vta_debug_insn.  No longer static.
13215         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13216         delete_vta_debug_insns callers.
13217         * rtl.h (delete_vta_debug_insns): Declare.
13218         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13219         instead of variable_tracking_main.
13221 2018-01-03  Martin Sebor  <msebor@redhat.com>
13223         PR tree-optimization/83603
13224         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13225         arguments past the endof the argument list in functions declared
13226         without a prototype.
13227         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13228         Avoid checking when arguments are null.
13230 2018-01-03  Martin Sebor  <msebor@redhat.com>
13232         PR c/83559
13233         * doc/extend.texi (attribute const): Fix a typo.
13234         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13235         issuing -Wsuggest-attribute for void functions.
13237 2018-01-03  Martin Sebor  <msebor@redhat.com>
13239         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13240         offset_int::from instead of wide_int::to_shwi.
13241         (maybe_diag_overlap): Remove assertion.
13242         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13243         * gimple-ssa-sprintf.c (format_directive): Same.
13244         (parse_directive): Same.
13245         (sprintf_dom_walker::compute_format_length): Same.
13246         (try_substitute_return_value): Same.
13248 2018-01-03  Jeff Law  <law@redhat.com>
13250         PR middle-end/83654
13251         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13252         non-constant residual for zero at runtime and avoid probing in
13253         that case.  Reorganize code for trailing problem to mirror handling
13254         of the residual.
13256 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13258         PR tree-optimization/83501
13259         * tree-ssa-strlen.c (get_string_cst): New.
13260         (handle_char_store): Call get_string_cst.
13262 2018-01-03  Martin Liska  <mliska@suse.cz>
13264         PR tree-optimization/83593
13265         * tree-ssa-strlen.c: Include tree-cfg.h.
13266         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13267         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13268         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13269         to false.
13270         (strlen_dom_walker::before_dom_children): Call
13271         gimple_purge_dead_eh_edges. Dump tranformation with details
13272         dump flags.
13273         (strlen_dom_walker::before_dom_children): Update call by adding
13274         new argument cleanup_eh.
13275         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13277 2018-01-03  Martin Liska  <mliska@suse.cz>
13279         PR ipa/83549
13280         * cif-code.def (VARIADIC_THUNK): New enum value.
13281         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13282         thunks.
13284 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13286         * sse.md (mov<mode>_internal): Tighten condition for when to use
13287         vmovdqu<ssescalarsize> for TI and OI modes.
13289 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13291         Update copyright years.
13293 2018-01-03  Martin Liska  <mliska@suse.cz>
13295         PR ipa/83594
13296         * ipa-visibility.c (function_and_variable_visibility): Skip
13297         functions with noipa attribure.
13299 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13301         * gcc.c (process_command): Update copyright notice dates.
13302         * gcov-dump.c (print_version): Ditto.
13303         * gcov.c (print_version): Ditto.
13304         * gcov-tool.c (print_version): Ditto.
13305         * gengtype.c (create_file): Ditto.
13306         * doc/cpp.texi: Bump @copying's copyright year.
13307         * doc/cppinternals.texi: Ditto.
13308         * doc/gcc.texi: Ditto.
13309         * doc/gccint.texi: Ditto.
13310         * doc/gcov.texi: Ditto.
13311         * doc/install.texi: Ditto.
13312         * doc/invoke.texi: Ditto.
13314 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13316         * vector-builder.h (vector_builder::m_full_nelts): Change from
13317         unsigned int to poly_uint64.
13318         (vector_builder::full_nelts): Update prototype accordingly.
13319         (vector_builder::new_vector): Likewise.
13320         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13321         (vector_builder::operator ==): Likewise.
13322         (vector_builder::finalize): Likewise.
13323         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13324         Take the number of elements as a poly_uint64 rather than an
13325         unsigned int.
13326         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13327         from unsigned int to poly_uint64.
13328         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13329         (vec_perm_indices::new_vector): Likewise.
13330         (vec_perm_indices::length): Likewise.
13331         (vec_perm_indices::nelts_per_input): Likewise.
13332         (vec_perm_indices::input_nelts): Likewise.
13333         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13334         number of elements per input as a poly_uint64 rather than an
13335         unsigned int.  Use the original encoding for variable-length
13336         vectors, rather than clamping each individual element.
13337         For the second and subsequent elements in each pattern,
13338         clamp the step and base before clamping their sum.
13339         (vec_perm_indices::series_p): Handle polynomial element counts.
13340         (vec_perm_indices::all_in_range_p): Likewise.
13341         (vec_perm_indices_to_tree): Likewise.
13342         (vec_perm_indices_to_rtx): Likewise.
13343         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13344         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13345         (tree_vector_builder::new_binary_operation): Handle polynomial
13346         element counts.  Return false if we need to know the number
13347         of elements at compile time.
13348         * fold-const.c (fold_vec_perm): Punt if the number of elements
13349         isn't known at compile time.
13351 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13353         * vec-perm-indices.h (vec_perm_builder): Change element type
13354         from HOST_WIDE_INT to poly_int64.
13355         (vec_perm_indices::element_type): Update accordingly.
13356         (vec_perm_indices::clamp): Handle polynomial element_types.
13357         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13358         (vec_perm_indices::all_in_range_p): Likewise.
13359         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13360         than shwi trees.
13361         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13362         polynomial vec_perm_indices element types.
13363         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13364         * fold-const.c (fold_vec_perm): Likewise.
13365         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13366         * tree-vect-generic.c (lower_vec_perm): Likewise.
13367         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13368         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13369         element type to HOST_WIDE_INT.
13371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13372             Alan Hayward  <alan.hayward@arm.com>
13373             David Sherwood  <david.sherwood@arm.com>
13375         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13376         rather than an int.  Use plus_constant.
13377         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13378         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13381             Alan Hayward  <alan.hayward@arm.com>
13382             David Sherwood  <david.sherwood@arm.com>
13384         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13385         a HOST_WIDE_INT to a poly_int64.
13387 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13388             Alan Hayward  <alan.hayward@arm.com>
13389             David Sherwood  <david.sherwood@arm.com>
13391         * calls.c (load_register_parameters): Cope with polynomial
13392         mode sizes.  Require a constant size for BLKmode parameters
13393         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13394         forces a parameter to be padded at the lsb end in order to
13395         fill a complete number of words, require the parameter size
13396         to be ordered wrt UNITS_PER_WORD.
13398 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13399             Alan Hayward  <alan.hayward@arm.com>
13400             David Sherwood  <david.sherwood@arm.com>
13402         * reload1.c (spill_stack_slot_width): Change element type
13403         from unsigned int to poly_uint64_pod.
13404         (alter_reg): Treat mode sizes as polynomial.
13406 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13407             Alan Hayward  <alan.hayward@arm.com>
13408             David Sherwood  <david.sherwood@arm.com>
13410         * reload.c (complex_word_subreg_p): New function.
13411         (reload_inner_reg_of_subreg, push_reload): Use it.
13413 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13414             Alan Hayward  <alan.hayward@arm.com>
13415             David Sherwood  <david.sherwood@arm.com>
13417         * lra-constraints.c (process_alt_operands): Reject matched
13418         operands whose sizes aren't ordered.
13419         (match_reload): Refer to this check here.
13421 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13422             Alan Hayward  <alan.hayward@arm.com>
13423             David Sherwood  <david.sherwood@arm.com>
13425         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13426         that the mode size is in the set {1, 2, 4, 8, 16}.
13428 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13429             Alan Hayward  <alan.hayward@arm.com>
13430             David Sherwood  <david.sherwood@arm.com>
13432         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13433         Use plus_constant instead of gen_rtx_PLUS.
13435 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13436             Alan Hayward  <alan.hayward@arm.com>
13437             David Sherwood  <david.sherwood@arm.com>
13439         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13440         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13441         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13442         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13443         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13444         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13445         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13446         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13447         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13448         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13449         a poly_int64.
13450         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13451         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13452         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13453         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13454         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13455         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13456         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13457         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13458         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13459         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13460         function.
13461         * expr.c (emit_move_resolve_push): Treat the input and result
13462         of PUSH_ROUNDING as a poly_int64.
13463         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13464         (emit_push_insn): Likewise.
13465         * lra-eliminations.c (mark_not_eliminable): Likewise.
13466         * recog.c (push_operand): Likewise.
13467         * reload1.c (elimination_effects): Likewise.
13468         * rtlanal.c (nonzero_bits1): Likewise.
13469         * calls.c (store_one_arg): Likewise.  Require the padding to be
13470         known at compile time.
13472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13473             Alan Hayward  <alan.hayward@arm.com>
13474             David Sherwood  <david.sherwood@arm.com>
13476         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13477         Use plus_constant instead of gen_rtx_PLUS.
13479 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13480             Alan Hayward  <alan.hayward@arm.com>
13481             David Sherwood  <david.sherwood@arm.com>
13483         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13484         rather than an int.
13486 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13487             Alan Hayward  <alan.hayward@arm.com>
13488             David Sherwood  <david.sherwood@arm.com>
13490         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13491         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13492         via stack temporaries.  Treat the mode size as polynomial too.
13494 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13495             Alan Hayward  <alan.hayward@arm.com>
13496             David Sherwood  <david.sherwood@arm.com>
13498         * expr.c (expand_expr_real_2): When handling conversions involving
13499         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13500         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13501         as a poly_uint64 too.
13503 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13504             Alan Hayward  <alan.hayward@arm.com>
13505             David Sherwood  <david.sherwood@arm.com>
13507         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13509 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13510             Alan Hayward  <alan.hayward@arm.com>
13511             David Sherwood  <david.sherwood@arm.com>
13513         * combine.c (can_change_dest_mode): Handle polynomial
13514         REGMODE_NATURAL_SIZE.
13515         * expmed.c (store_bit_field_1): Likewise.
13516         * expr.c (store_constructor): Likewise.
13517         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13518         and polynomial REGMODE_NATURAL_SIZE.
13519         (gen_lowpart_common): Likewise.
13520         * reginfo.c (record_subregs_of_mode): Likewise.
13521         * rtlanal.c (read_modify_subreg_p): Likewise.
13523 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13524             Alan Hayward  <alan.hayward@arm.com>
13525             David Sherwood  <david.sherwood@arm.com>
13527         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13528         numbers of elements.
13530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13531             Alan Hayward  <alan.hayward@arm.com>
13532             David Sherwood  <david.sherwood@arm.com>
13534         * match.pd: Cope with polynomial numbers of vector elements.
13536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13537             Alan Hayward  <alan.hayward@arm.com>
13538             David Sherwood  <david.sherwood@arm.com>
13540         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13541         in a POINTER_PLUS_EXPR.
13543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13544             Alan Hayward  <alan.hayward@arm.com>
13545             David Sherwood  <david.sherwood@arm.com>
13547         * omp-simd-clone.c (simd_clone_subparts): New function.
13548         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13549         (ipa_simd_modify_function_body): Likewise.
13551 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13552             Alan Hayward  <alan.hayward@arm.com>
13553             David Sherwood  <david.sherwood@arm.com>
13555         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13556         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13557         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13558         (expand_vector_condition, vector_element): Likewise.
13559         (subparts_gt): New function.
13560         (get_compute_type): Use subparts_gt.
13561         (count_type_subparts): Delete.
13562         (expand_vector_operations_1): Use subparts_gt instead of
13563         count_type_subparts.
13565 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13566             Alan Hayward  <alan.hayward@arm.com>
13567             David Sherwood  <david.sherwood@arm.com>
13569         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13570         (vect_compile_time_alias): ...this new function.  Do the calculation
13571         on poly_ints rather than trees.
13572         (vect_prune_runtime_alias_test_list): Update call accordingly.
13574 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13575             Alan Hayward  <alan.hayward@arm.com>
13576             David Sherwood  <david.sherwood@arm.com>
13578         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13579         numbers of units.
13580         (vect_schedule_slp_instance): Likewise.
13582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13583             Alan Hayward  <alan.hayward@arm.com>
13584             David Sherwood  <david.sherwood@arm.com>
13586         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13587         constant and extern definitions for variable-length vectors.
13588         (vect_get_constant_vectors): Note that the number of units
13589         is known to be constant.
13591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13592             Alan Hayward  <alan.hayward@arm.com>
13593             David Sherwood  <david.sherwood@arm.com>
13595         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13596         of units as polynomial.  Choose between WIDE and NARROW based
13597         on multiple_p.
13599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13600             Alan Hayward  <alan.hayward@arm.com>
13601             David Sherwood  <david.sherwood@arm.com>
13603         * tree-vect-stmts.c (simd_clone_subparts): New function.
13604         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13606 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13607             Alan Hayward  <alan.hayward@arm.com>
13608             David Sherwood  <david.sherwood@arm.com>
13610         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13611         vectors as polynomial.  Use build_index_vector for
13612         IFN_GOMP_SIMD_LANE.
13614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13615             Alan Hayward  <alan.hayward@arm.com>
13616             David Sherwood  <david.sherwood@arm.com>
13618         * tree-vect-stmts.c (get_load_store_type): Treat the number of
13619         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13620         for variable-length vectors.
13621         (vectorizable_mask_load_store): Treat the number of units as
13622         polynomial, asserting that it is constant if the condition has
13623         already been enforced.
13624         (vectorizable_store, vectorizable_load): Likewise.
13626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13627             Alan Hayward  <alan.hayward@arm.com>
13628             David Sherwood  <david.sherwood@arm.com>
13630         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13631         of units as polynomial.  Punt if we can't tell at compile time
13632         which vector contains the final result.
13634 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13635             Alan Hayward  <alan.hayward@arm.com>
13636             David Sherwood  <david.sherwood@arm.com>
13638         * tree-vect-loop.c (vectorizable_induction): Treat the number
13639         of units as polynomial.  Punt on SLP inductions.  Use an integer
13640         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
13641         cast of such a series for variable-length floating-point
13642         reductions.
13644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13645             Alan Hayward  <alan.hayward@arm.com>
13646             David Sherwood  <david.sherwood@arm.com>
13648         * tree.h (build_index_vector): Declare.
13649         * tree.c (build_index_vector): New function.
13650         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
13651         of units as polynomial, forcibly converting it to a constant if
13652         vectorizable_reduction has already enforced the condition.
13653         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
13654         to create a {1,2,3,...} vector.
13655         (vectorizable_reduction): Treat the number of units as polynomial.
13656         Choose vectype_in based on the largest scalar element size rather
13657         than the smallest number of units.  Enforce the restrictions
13658         relied on above.
13660 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13661             Alan Hayward  <alan.hayward@arm.com>
13662             David Sherwood  <david.sherwood@arm.com>
13664         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
13665         number of units as polynomial.
13667 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13668             Alan Hayward  <alan.hayward@arm.com>
13669             David Sherwood  <david.sherwood@arm.com>
13671         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
13672         * target.def (autovectorize_vector_sizes): Return the vector sizes
13673         by pointer, using vector_sizes rather than a bitmask.
13674         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
13675         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
13676         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
13677         Likewise.
13678         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
13679         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
13680         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
13681         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
13682         * omp-general.c (omp_max_vf): Likewise.
13683         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13684         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
13685         * tree-vect-loop.c (vect_analyze_loop): Likewise.
13686         * tree-vect-slp.c (vect_slp_bb): Likewise.
13687         * doc/tm.texi: Regenerate.
13688         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
13689         to a poly_uint64.
13690         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13691         the vector size as a poly_uint64 rather than an unsigned int.
13692         (current_vector_size): Change from an unsigned int to a poly_uint64.
13693         (get_vectype_for_scalar_type): Update accordingly.
13694         * tree.h (build_truth_vector_type): Take the size and number of
13695         units as a poly_uint64 rather than an unsigned int.
13696         (build_vector_type): Add a temporary overload that takes
13697         the number of units as a poly_uint64 rather than an unsigned int.
13698         * tree.c (make_vector_type): Likewise.
13699         (build_truth_vector_type): Take the number of units as a poly_uint64
13700         rather than an unsigned int.
13702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13703             Alan Hayward  <alan.hayward@arm.com>
13704             David Sherwood  <david.sherwood@arm.com>
13706         * target.def (get_mask_mode): Take the number of units and length
13707         as poly_uint64s rather than unsigned ints.
13708         * targhooks.h (default_get_mask_mode): Update accordingly.
13709         * targhooks.c (default_get_mask_mode): Likewise.
13710         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13711         * doc/tm.texi: Regenerate.
13713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13714             Alan Hayward  <alan.hayward@arm.com>
13715             David Sherwood  <david.sherwood@arm.com>
13717         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13718         * omp-general.c (omp_max_vf): Likewise.
13719         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13720         (expand_omp_simd): Handle polynomial safelen.
13721         * omp-low.c (omplow_simd_context): Add a default constructor.
13722         (omplow_simd_context::max_vf): Change from int to poly_uint64.
13723         (lower_rec_simd_input_clauses): Update accordingly.
13724         (lower_rec_input_clauses): Likewise.
13726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13727             Alan Hayward  <alan.hayward@arm.com>
13728             David Sherwood  <david.sherwood@arm.com>
13730         * tree-vectorizer.h (vect_nunits_for_cost): New function.
13731         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13732         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13733         (vect_analyze_slp_cost): Likewise.
13734         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13735         (vect_model_load_cost): Likewise.
13737 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13738             Alan Hayward  <alan.hayward@arm.com>
13739             David Sherwood  <david.sherwood@arm.com>
13741         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13742         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13743         from an unsigned int * to a poly_uint64_pod *.
13744         (calculate_unrolling_factor): New function.
13745         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
13747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13748             Alan Hayward  <alan.hayward@arm.com>
13749             David Sherwood  <david.sherwood@arm.com>
13751         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13752         from an unsigned int to a poly_uint64.
13753         (_loop_vec_info::slp_unrolling_factor): Likewise.
13754         (_loop_vec_info::vectorization_factor): Change from an int
13755         to a poly_uint64.
13756         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13757         (vect_get_num_vectors): New function.
13758         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13759         (vect_get_num_copies): Use vect_get_num_vectors.
13760         (vect_analyze_data_ref_dependences): Change max_vf from an int *
13761         to an unsigned int *.
13762         (vect_analyze_data_refs): Change min_vf from an int * to a
13763         poly_uint64 *.
13764         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13765         than an unsigned HOST_WIDE_INT.
13766         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13767         (vect_analyze_data_ref_dependence): Change max_vf from an int *
13768         to an unsigned int *.
13769         (vect_analyze_data_ref_dependences): Likewise.
13770         (vect_compute_data_ref_alignment): Handle polynomial vf.
13771         (vect_enhance_data_refs_alignment): Likewise.
13772         (vect_prune_runtime_alias_test_list): Likewise.
13773         (vect_shift_permute_load_chain): Likewise.
13774         (vect_supportable_dr_alignment): Likewise.
13775         (dependence_distance_ge_vf): Take the vectorization factor as a
13776         poly_uint64 rather than an unsigned HOST_WIDE_INT.
13777         (vect_analyze_data_refs): Change min_vf from an int * to a
13778         poly_uint64 *.
13779         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13780         vfm1 as a poly_uint64 rather than an int.  Make the same change
13781         for the returned bound_scalar.
13782         (vect_gen_vector_loop_niters): Handle polynomial vf.
13783         (vect_do_peeling): Likewise.  Update call to
13784         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13785         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13786         be constant.
13787         * tree-vect-loop.c (vect_determine_vectorization_factor)
13788         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13789         (vect_get_known_peeling_cost): Likewise.
13790         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13791         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13792         (vect_transform_loop): Likewise.  Use the lowest possible VF when
13793         updating the upper bounds of the loop.
13794         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
13795         rather than an int.
13796         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13797         polynomial unroll factors.
13798         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13799         (vect_make_slp_decision): Likewise.
13800         (vect_supported_load_permutation_p): Likewise, and polynomial
13801         vf too.
13802         (vect_analyze_slp_cost): Handle polynomial vf.
13803         (vect_slp_analyze_node_operations): Likewise.
13804         (vect_slp_analyze_bb_1): Likewise.
13805         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13806         than an unsigned HOST_WIDE_INT.
13807         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13808         (vectorizable_load): Handle polynomial vf.
13809         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13810         a poly_uint64.
13811         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13813 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13814             Alan Hayward  <alan.hayward@arm.com>
13815             David Sherwood  <david.sherwood@arm.com>
13817         * match.pd: Handle bit operations involving three constants
13818         and try to fold one pair.
13820 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13822         * tree-vect-loop-manip.c: Include gimple-fold.h.
13823         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13824         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
13825         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13826         Add a path that uses a step of VF instead of 1, but disable it
13827         for now.
13828         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13829         and niters_no_overflow parameters.  Update calls to
13830         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13831         Create a new SSA name if the latter choses to use a ste other
13832         than zero, and return it via niters_vector_mult_vf_var.
13833         * tree-vect-loop.c (vect_transform_loop): Update calls to
13834         vect_do_peeling, vect_gen_vector_loop_niters and
13835         slpeel_make_loop_iterate_ntimes.
13836         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13837         (vect_gen_vector_loop_niters): Update declarations after above changes.
13839 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
13841         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13842         128-bit round to integer instructions.
13843         (ceil<mode>2): Likewise.
13844         (btrunc<mode>2): Likewise.
13845         (round<mode>2): Likewise.
13847 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13849         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13850         unaligned VSX load/store on P8/P9.
13851         (expand_block_clear): Allow the use of unaligned VSX
13852         load/store on P8/P9.
13854 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13856         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13857         New function.
13858         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13859         swap associated with both a load and a store.
13861 2018-01-02  Andrew Waterman  <andrew@sifive.com>
13863         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13864         * config/riscv/riscv.md (clear_cache): Use it.
13866 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
13868         * web.c: Remove out-of-date comment.
13870 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13872         * expr.c (fixup_args_size_notes): Check that any existing
13873         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13874         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13875         (emit_single_push_insn): ...here.
13877 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13879         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13880         (const_vector_encoded_nelts): New function.
13881         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
13882         (const_vector_int_elt, const_vector_elt): Declare.
13883         * emit-rtl.c (const_vector_int_elt_1): New function.
13884         (const_vector_elt): Likewise.
13885         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
13886         of CONST_VECTOR_ELT.
13888 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13890         * expr.c: Include rtx-vector-builder.h.
13891         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
13892         directly on the tree encoding.
13893         (const_vector_from_tree): Likewise.
13894         * optabs.c: Include rtx-vector-builder.h.
13895         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
13896         sequence of "u" values.
13897         * vec-perm-indices.c: Include rtx-vector-builder.h.
13898         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
13899         directly on the vec_perm_indices encoding.
13901 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13903         * doc/rtl.texi (const_vector): Describe new encoding scheme.
13904         * Makefile.in (OBJS): Add rtx-vector-builder.o.
13905         * rtx-vector-builder.h: New file.
13906         * rtx-vector-builder.c: Likewise.
13907         * rtl.h (rtx_def::u2): Add a const_vector field.
13908         (CONST_VECTOR_NPATTERNS): New macro.
13909         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
13910         (CONST_VECTOR_DUPLICATE_P): Likewise.
13911         (CONST_VECTOR_STEPPED_P): Likewise.
13912         (CONST_VECTOR_ENCODED_ELT): Likewise.
13913         (const_vec_duplicate_p): Check for a duplicated vector encoding.
13914         (unwrap_const_vec_duplicate): Likewise.
13915         (const_vec_series_p): Check for a non-duplicated vector encoding.
13916         Say that the function only returns true for integer vectors.
13917         * emit-rtl.c: Include rtx-vector-builder.h.
13918         (gen_const_vec_duplicate_1): Delete.
13919         (gen_const_vector): Call gen_const_vec_duplicate instead of
13920         gen_const_vec_duplicate_1.
13921         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
13922         (gen_const_vec_duplicate): Use rtx_vector_builder.
13923         (gen_const_vec_series): Likewise.
13924         (gen_rtx_CONST_VECTOR): Likewise.
13925         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
13926         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13927         Build a new vector rather than modifying a CONST_VECTOR in-place.
13928         (handle_special_swappables): Update call accordingly.
13929         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
13930         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13931         Build a new vector rather than modifying a CONST_VECTOR in-place.
13932         (handle_special_swappables): Update call accordingly.
13934 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13936         * simplify-rtx.c (simplify_const_binary_operation): Use
13937         CONST_VECTOR_ELT instead of XVECEXP.
13939 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13941         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
13942         the selector elements to be different from the data elements
13943         if the selector is a VECTOR_CST.
13944         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
13945         ssizetype for the selector.
13947 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13949         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
13950         before testing each element individually.
13951         * tree-vect-generic.c (lower_vec_perm): Likewise.
13953 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13955         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
13956         * selftest-run-tests.c (selftest::run_tests): Call it.
13957         * vector-builder.h (vector_builder::operator ==): New function.
13958         (vector_builder::operator !=): Likewise.
13959         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
13960         (vec_perm_indices::all_from_input_p): New function.
13961         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13962         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
13963         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
13964         instead of reading the VECTOR_CST directly.  Detect whether both
13965         vector inputs are the same before constructing the vec_perm_indices,
13966         and update the number of inputs argument accordingly.  Use the
13967         utility functions added above.  Only construct sel2 if we need to.
13969 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13971         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
13972         the broadcast of the low byte.
13973         (expand_mult_highpart): Use an explicit encoding for the permutes.
13974         * optabs-query.c (can_mult_highpart_p): Likewise.
13975         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13976         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13977         (vectorizable_bswap): Likewise.
13978         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
13979         explicit encoding for the power-of-2 permutes.
13980         (vect_permute_store_chain): Likewise.
13981         (vect_grouped_load_supported): Likewise.
13982         (vect_permute_load_chain): Likewise.
13984 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13986         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
13987         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
13988         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
13989         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13990         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
13991         (vect_gen_perm_mask_any): Likewise.
13993 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13995         * int-vector-builder.h: New file.
13996         * vec-perm-indices.h: Include int-vector-builder.h.
13997         (vec_perm_indices): Redefine as an int_vector_builder.
13998         (auto_vec_perm_indices): Delete.
13999         (vec_perm_builder): Redefine as a stand-alone class.
14000         (vec_perm_indices::vec_perm_indices): New function.
14001         (vec_perm_indices::clamp): Likewise.
14002         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14003         (vec_perm_indices::new_vector): New function.
14004         (vec_perm_indices::new_expanded_vector): Update for new
14005         vec_perm_indices class.
14006         (vec_perm_indices::rotate_inputs): New function.
14007         (vec_perm_indices::all_in_range_p): Operate directly on the
14008         encoded form, without computing elided elements.
14009         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14010         encoding.  Update for new vec_perm_indices class.
14011         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14012         the given vec_perm_builder.
14013         (expand_vec_perm_var): Update vec_perm_builder constructor.
14014         (expand_mult_highpart): Use vec_perm_builder instead of
14015         auto_vec_perm_indices.
14016         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14017         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14018         or double series encoding as appropriate.
14019         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14020         vec_perm_indices instead of auto_vec_perm_indices.
14021         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14022         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14023         (vect_permute_store_chain): Likewise.
14024         (vect_grouped_load_supported): Likewise.
14025         (vect_permute_load_chain): Likewise.
14026         (vect_shift_permute_load_chain): Likewise.
14027         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14028         (vect_transform_slp_perm_load): Likewise.
14029         (vect_schedule_slp_instance): Likewise.
14030         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14031         (vectorizable_mask_load_store): Likewise.
14032         (vectorizable_bswap): Likewise.
14033         (vectorizable_store): Likewise.
14034         (vectorizable_load): Likewise.
14035         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14036         vec_perm_indices instead of auto_vec_perm_indices.  Use
14037         tree_to_vec_perm_builder to read the vector from a tree.
14038         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14039         vec_perm_builder instead of a vec_perm_indices.
14040         (have_whole_vector_shift): Use vec_perm_builder and
14041         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14042         truncation to calc_vec_perm_mask_for_shift.
14043         (vect_create_epilog_for_reduction): Likewise.
14044         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14045         from auto_vec_perm_indices to vec_perm_indices.
14046         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14047         instead of changing individual elements.
14048         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14049         the vector in d.perm.
14050         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14051         from auto_vec_perm_indices to vec_perm_indices.
14052         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14053         instead of changing individual elements.
14054         (arm_vectorize_vec_perm_const): Use new_vector to install
14055         the vector in d.perm.
14056         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14057         Update vec_perm_builder constructor.
14058         (rs6000_expand_interleave): Likewise.
14059         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14060         (rs6000_expand_interleave): Likewise.
14062 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14064         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14065         to qimode could truncate the indices.
14066         * optabs.c (expand_vec_perm_var): Likewise.
14068 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14070         * Makefile.in (OBJS): Add vec-perm-indices.o.
14071         * vec-perm-indices.h: New file.
14072         * vec-perm-indices.c: Likewise.
14073         * target.h (vec_perm_indices): Replace with a forward class
14074         declaration.
14075         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14076         * optabs.h: Include vec-perm-indices.h.
14077         (expand_vec_perm): Delete.
14078         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14079         (expand_vec_perm_const): Declare.
14080         * target.def (vec_perm_const_ok): Replace with...
14081         (vec_perm_const): ...this new hook.
14082         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14083         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14084         * doc/tm.texi: Regenerate.
14085         * optabs.def (vec_perm_const): Delete.
14086         * doc/md.texi (vec_perm_const): Likewise.
14087         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14088         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14089         expand_vec_perm for constant permutation vectors.  Assert that
14090         the mode of variable permutation vectors is the integer equivalent
14091         of the mode that is being permuted.
14092         * optabs-query.h (selector_fits_mode_p): Declare.
14093         * optabs-query.c: Include vec-perm-indices.h.
14094         (selector_fits_mode_p): New function.
14095         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14096         is defined, instead of checking whether the vec_perm_const_optab
14097         exists.  Use targetm.vectorize.vec_perm_const instead of
14098         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14099         fit in the vector mode before using a variable permute.
14100         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14101         vec_perm_indices instead of an rtx.
14102         (expand_vec_perm): Replace with...
14103         (expand_vec_perm_const): ...this new function.  Take the selector
14104         as a vec_perm_indices rather than an rtx.  Also take the mode of
14105         the selector.  Update call to shift_amt_for_vec_perm_mask.
14106         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14107         Use vec_perm_indices::new_expanded_vector to expand the original
14108         selector into bytes.  Check whether the indices fit in the vector
14109         mode before using a variable permute.
14110         (expand_vec_perm_var): Make global.
14111         (expand_mult_highpart): Use expand_vec_perm_const.
14112         * fold-const.c: Includes vec-perm-indices.h.
14113         * tree-ssa-forwprop.c: Likewise.
14114         * tree-vect-data-refs.c: Likewise.
14115         * tree-vect-generic.c: Likewise.
14116         * tree-vect-loop.c: Likewise.
14117         * tree-vect-slp.c: Likewise.
14118         * tree-vect-stmts.c: Likewise.
14119         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14120         Delete.
14121         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14122         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14123         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14124         (aarch64_vectorize_vec_perm_const): ...this new function.
14125         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14126         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14127         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14128         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14129         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14130         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14131         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14132         into...
14133         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14134         check for NEON modes.
14135         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14136         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14137         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14138         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14139         into...
14140         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14141         the old VEC_PERM_CONST conditions.
14142         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14143         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14144         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14145         (ia64_vectorize_vec_perm_const_ok): Merge into...
14146         (ia64_vectorize_vec_perm_const): ...this new function.
14147         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14148         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14149         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14150         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14151         * config/mips/mips.c (mips_expand_vec_perm_const)
14152         (mips_vectorize_vec_perm_const_ok): Merge into...
14153         (mips_vectorize_vec_perm_const): ...this new function.
14154         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14155         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14156         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14157         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14158         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14159         (rs6000_expand_vec_perm_const): Delete.
14160         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14161         Delete.
14162         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14163         (altivec_expand_vec_perm_const_le): Take each operand individually.
14164         Operate on constant selectors rather than rtxes.
14165         (altivec_expand_vec_perm_const): Likewise.  Update call to
14166         altivec_expand_vec_perm_const_le.
14167         (rs6000_expand_vec_perm_const): Delete.
14168         (rs6000_vectorize_vec_perm_const_ok): Delete.
14169         (rs6000_vectorize_vec_perm_const): New function.
14170         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14171         an element count and rtx array.
14172         (rs6000_expand_extract_even): Update call accordingly.
14173         (rs6000_expand_interleave): Likewise.
14174         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14175         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14176         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14177         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14178         (rs6000_expand_vec_perm_const): Delete.
14179         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14180         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14181         (altivec_expand_vec_perm_const_le): Take each operand individually.
14182         Operate on constant selectors rather than rtxes.
14183         (altivec_expand_vec_perm_const): Likewise.  Update call to
14184         altivec_expand_vec_perm_const_le.
14185         (rs6000_expand_vec_perm_const): Delete.
14186         (rs6000_vectorize_vec_perm_const_ok): Delete.
14187         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14188         reference to the SPE evmerge intructions.
14189         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14190         an element count and rtx array.
14191         (rs6000_expand_extract_even): Update call accordingly.
14192         (rs6000_expand_interleave): Likewise.
14193         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14194         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14195         new function.
14196         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14198 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14200         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14201         vector mode and that that mode matches the mode of the data
14202         being permuted.
14203         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14204         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14205         directly using expand_vec_perm_1 when forcing selectors into
14206         registers.
14207         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14209 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14211         * optabs-query.h (can_vec_perm_p): Delete.
14212         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14213         * optabs-query.c (can_vec_perm_p): Split into...
14214         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14215         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14216         particular selector is valid.
14217         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14218         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14219         (vect_grouped_load_supported): Likewise.
14220         (vect_shift_permute_load_chain): Likewise.
14221         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14222         (vect_transform_slp_perm_load): Likewise.
14223         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14224         (vectorizable_bswap): Likewise.
14225         (vect_gen_perm_mask_checked): Likewise.
14226         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14227         implementations of variable permutation vectors into account
14228         when deciding which selector to use.
14229         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14230         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14231         with a false third argument.
14232         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14233         to test whether the constant selector is valid and can_vec_perm_var_p
14234         to test whether a variable selector is valid.
14236 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14238         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14239         * optabs-query.c (can_vec_perm_p): Likewise.
14240         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14241         instead of vec_perm_indices.
14242         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14243         (vect_gen_perm_mask_checked): Likewise,
14244         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14245         (vect_gen_perm_mask_checked): Likewise,
14247 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14249         * optabs-query.h (qimode_for_vec_perm): Declare.
14250         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14251         (qimode_for_vec_perm): ...this new function.
14252         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14254 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14256         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14257         does not have a conditional at the top.
14259 2018-01-02  Richard Biener  <rguenther@suse.de>
14261         * ipa-inline.c (big_speedup_p): Fix expression.
14263 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14265         PR target/81616
14266         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14267         for generic 4->6.
14269 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14271         PR target/81616
14272         Generic tuning.
14273         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14274         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14275         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14276         cond_taken_branch_cost 3->4.
14278 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14280         PR tree-optimization/83581
14281         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14282         TODO_cleanup_cfg if any changes have been made.
14284         PR middle-end/83608
14285         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14286         convert_modes if target mode has the right side, but different mode
14287         class.
14289         PR middle-end/83609
14290         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14291         last argument when extracting from CONCAT.  If either from_real or
14292         from_imag is NULL, use expansion through memory.  If result is not
14293         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14294         the parts directly to inner mode, if even that fails, use expansion
14295         through memory.
14297         PR middle-end/83623
14298         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14299         check for bswap in mode rather than HImode and use that in expand_unop
14300         too.
14302 Copyright (C) 2018 Free Software Foundation, Inc.
14304 Copying and distribution of this file, with or without modification,
14305 are permitted in any medium without royalty provided the copyright
14306 notice and this notice are preserved.