[NDS32] new attribute no_prologue and new option -mret-in-naked-func.
[official-gcc.git] / gcc / ChangeLog
blob73c578165f37874d90130a55dbc4a7034513c06e
1 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4         (nds32_init_machine_status): Initialize machine->attr_naked_p and
5         machine->attr_no_prologue_p.
6         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8         (nds32_expand_epilogue): Consider attr_naked_p.
9         (nds32_expand_epilogue_v3pop): Likewise.
10         (nds32_can_use_return_insn): Likewise.
11         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
12         attr_no_prologue_p fields.
13         * config/nds32/nds32.opt (mret-in-naked-func): New option.
15 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
17         PR target/85918
18         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19         attributes.
20         * config/i386/sse.md
21         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
22         Rename to ...
23         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
24         ... this.
25         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
26         Rename to ...
27         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
28         ... this.
29         (*<floatsuffix>floatv2div2sf2): Rename to ...
30         (*float<floatunssuffix>v2div2sf2): ... this.
31         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
32         (float<floatunssuffix>v2div2sf2_mask): ... this.
33         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
34         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
35         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
36         to ...
37         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
38         ... this.
39         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
40         Rename to ...
41         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
42         ... this.
43         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
44         Rename to ...
45         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
46         ... this.
47         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
48         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
49         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
50         gen_ufix_truncv8dfv8si2.
51         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
52         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
53         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
54         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
55         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
56         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
57         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
58         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
60 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
62         PR target/85900
63         PR target/85345
64         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
66 2018-05-25  Jim Wilson  <jimw@sifive.com>
68         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
69         * config/riscv/riscv.c (struct machine_function): Add
70         interrupt_handler_p and attribute_checked_p fields.
71         (riscv_attribute_table): Add interrupt.
72         (riscv_interrupt_type_p): New.
73         (riscv_save_reg_p): Save extra regs for interrupt handler.
74         (riscv_use_save_libcall): Return false  for interrupt handler.
75         (riscv_first_stack_step): Add forward declaration.
76         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
77         for interrupt handler with large frame.  Use it for saved reg list.
78         (riscv_expand_prologue): Move flag_stack_usage_info support to
79         eliminate duplication.
80         (riscv_expand_epilogue): Generate mret for interrupt handler.
81         (riscv_epilogue_uses): New.
82         (riscv_can_use_return_insn): Return false for interrupt handler.
83         (riscv_function_ok_for_sibcall): Likewise.
84         (riscv_set_current_function): Add interrupt handler support.
85         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
86         * config/riscv/riscv.md (UNSPECV_MRET): New.
87         (GP_REGNUM): New.
88         (riscv_frflags, riscv_fsflags): Use tab after opcode.
89         (riscv_mret): New.
90         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
92 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
94         PR tree-optimization/85712
95         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
96         this candidate has already been replaced in-situ by a copy.
98 2018-05-25  Jason Merrill  <jason@redhat.com>
100         PR c++/80485 - inline function non-zero address.
101         * symtab.c (nonzero_address): Check DECL_COMDAT.
103 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
105         PR target/83628
106         * config/alpha/alpha.md (ashlsi3): New insn pattern.
107         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
108         extension of SImode operation.  Use const123_operand predicate.
109         (*saddsi_1): Remove.
110         (*saddl_se_1): Ditto.
111         (*ssubsi_1): Ditto.
112         (*ssubl_se_1): Ditto.
113         * config/alpha/predicates.md (const123_operand): New predicate.
114         * config/alpha/constraints.md (P): Use IN_RANGE.
116 2018-05-25  Richard Biener  <rguenther@suse.de>
118         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
119         defaulted to true.
120         (ref_maybe_used_by_stmt_p): Likewise.
121         (stmt_may_clobber_ref_p): Likewise.
122         (stmt_may_clobber_ref_p_1): Likewise.
123         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
124         and pass it along.
125         (ref_maybe_used_by_stmt_p): Likewise.
126         (stmt_may_clobber_ref_p): Likewise.
127         (stmt_may_clobber_ref_p_1): Likewise.
128         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
129         the alias oracle to disambiguate DRs with stmts DR analysis
130         couldn't handle.
131         (vect_analyze_data_refs): Do not give up on not analyzable
132         DRs for BB vectorization.  Remove code truncating the dataref
133         vector.
135 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
137         PR target/85832
138         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
139         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
140         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
142 2018-05-25  Richard Biener  <rguenther@suse.de>
144         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
145         function, combining stmt data ref gathering and fatal analysis
146         parts.
147         (vect_analyze_data_refs): Remove now redudnant code and simplify.
148         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
149         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
150         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
151         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
153 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
155         PR tree-optimization/85720
156         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
157         SCC if all partitions are builtins.
158         (version_loop_by_alias_check): New parameter.  Generate cancelable
159         runtime alias check if all partitions are builtins.
160         (distribute_loop): Update call to above function.
162 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
164         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
165         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
166         (parm_default_def_partition_arg): Ditto.
167         (set_parm_default_def_partition): Ditto.
168         (get_parm_default_def_partitions): Ditto and make it static.
169         (get_undefined_value_partitions): Ditto and make it static.
170         (remove_ssa_form): Refactor call to init_var_map here.
171         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
172         computation for loop region.
173         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
174         (register_default_def): Delete.
175         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
176         (parm_default_def_partition_arg): Ditto.
177         (set_parm_default_def_partition): Ditto.
178         (get_parm_default_def_partitions): Ditto and make it static.
179         (get_undefined_value_partitions): Ditto and make it static.
180         (coalesce_with_default, coalesce_with_default): Update comment.
181         (create_coalesce_list_for_region): New func factored out from
182         create_outofssa_var_map.
183         (populate_coalesce_list_for_outofssa): New func factored out from
184         create_outofssa_var_map and coalesce_ssa_name.
185         (create_outofssa_var_map): Delete.
186         (coalesce_ssa_name): Refactor to support live range computation.
187         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
188         (get_parm_default_def_partitions): Delete.
189         (get_undefined_value_partitions): Ditto.
190         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
191         computation for loop region.
192         (new_tree_live_info, loe_visit_block): Ditto.
193         (live_worklist, set_var_live_on_entry): Ditto.
194         (calculate_live_on_exit, verify_live_on_entry): Ditto.
195         * tree-ssa-live.h (struct _var_map): New fields.
196         (init_var_map): Change decl.
197         (region_contains_p): New.
199 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
201         * tree-ssa-live.h (live_merge_and_clear): Delete.
203 2018-05-25  Richard Biener  <rguenther@suse.de>
205         PR c++/85912
206         * tree-dump.c (dequeue_and_dump): Remove access to removed
207         operand 2 of a SWITCH_EXPR.
209 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
211         * doc/sourcebuild.texi (vect_double_cond_arith): Include
212         multiplication and division.
213         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
214         (cond_udiv@var{m}, cond_umod@var{m}): Document.
215         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
216         (cond_udiv_optab, cond_umod_optab): New optabs.
217         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
218         (IFN_COND_RDIV): New internal functions.
219         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
220         TRUNC_MOD_EXPR and RDIV_EXPR.
221         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
222         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
223         New unspecs.
224         (SVE_INT_BINARY): Include mult.
225         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
226         (optab, sve_int_op): Handle mult.
227         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
228         UNSPEC_COND_DIV.
229         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
230         for SVE_INT_BINARY_SD.
232 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
234         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
235         (optab, sve_int_op): Handle div and udiv.
236         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
237         for SVE_INT_BINARY_SD.
238         (*<optab><mode>3): New insn for the same.
240 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
242         * tree-vect-patterns.c: Include predict.h.
243         (vect_recog_divmod_pattern): Restrict check for division support
244         to when optimizing for size.
246 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
248         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
249         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
250         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
251         (gimple_match_op::set_op): Likewise.
252         (gimple_resimplify4): Declare.
253         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
254         (expr::gen_transform): Likewise.
255         (decision_tree::gen): Generate a simplification routine for 4 operands.
256         * gimple-match-head.c (gimple_simplify): Add an overload for
257         4 operands.  In the top-level function, handle up to 4 call
258         arguments and call gimple_resimplify4.
259         (gimple_resimplify4): New function.
260         (build_call_internal): Pass a fourth operand.
261         (maybe_push_to_seq): Likewise.
262         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
263         Fold VEC_COND_EXPRs of an operation and a default value into
264         an IFN_COND_* function if possible.
265         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
266         New unspecs.
267         (SVE_COND_FP_BINARY): Include them.
268         (optab, sve_fp_op): Handle them.
269         (SVE_INT_BINARY_REV): New code iterator.
270         (SVE_COND_FP_BINARY_REV): New int iterator.
271         (commutative): New int attribute.
272         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
273         Declare.
274         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
275         function.
276         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
277         (*cond_<optab><mode>): New patterns for reversed operands.
279 2018-05-25  Richard Biener  <rguenther@suse.de>
281         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
282         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
283         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
284         (STMT_VINFO_GROUPED_ACCESS): Adjust.
285         * tree-vect-data-refs.c (everywhere): Adjust users.
286         * tree-vect-loop.c (everywhere): Likewise.
287         * tree-vect-slp.c (everywhere): Likewise.
288         * tree-vect-stmts.c (everywhere): Likewise.
289         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
291 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
293         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
294         Rename to...
295         (gcc_cv_as_section_exclude): ... this.
296         Try Solaris as #exclude syntax.
297         * configure: Regenerate.
298         * config.in: Regenerate.
299         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
300         SECTION_EXCLUDE.
301         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
302         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
304         * varasm.c (default_elf_asm_named_section): Don't check if
305         HAVE_GAS_SECTION_EXCLUDE is defined.
307 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
309         * doc/md.texi: Update the documentation of the cond_* optabs
310         to mention the new final operand.  Fix GET_MODE_NUNITS call.
311         Describe the scalar case too.
312         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
313         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
314         instead of 2.
315         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
316         (get_conditional_internal_fn): Update comment.
317         * tree-vect-loop.c (vectorizable_reduction): Pass the original
318         accumulator value as a final argument to conditional functions.
319         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
320         a define_expand and add an "else" operand.  Assert for now that
321         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
322         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
323         (*cond_<optab><mode>): New patterns.
324         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
325         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
326         (UNSPEC_COND_EOR): Delete.
327         (optab): Remove associated mappings.
328         (SVE_INT_BINARY): New code iterator.
329         (sve_int_op): Remove int attribute and add "minus" to the code
330         attribute.
331         (SVE_COND_INT_OP): Delete.
332         (SVE_COND_FP_OP): Rename to...
333         (SVE_COND_FP_BINARY): ...this.
335 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
337         * optabs.c (can_reuse_operands_p): New function.
338         (maybe_legitimize_operands): Try to reuse the results for
339         earlier operands.
341 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
343         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
344         Add {q} suffix to insn mnemonic.
346 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
348         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
349         (msp430_warn_func_return): New.
351 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
353         * fold-const.c (tree_nonzero_bits): New function.
354         * fold-const.h (tree_nonzero_bits): Likewise.
355         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
356         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
358 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
360         PR target/85900
361         PR target/85345
362         * varasm.c (assemble_alias): Check ifunc_resolver only on
363         FUNCTION_DECL.
365 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
367         PR target/85903
368         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
369         when memory input operand is handled.
371 2018-05-24  Luis Machado  <luis.machado@linaro.org>
373         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
374         global.
375         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
377 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
379         * match.pd: Delay FMA folds until after vectorization.
381 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
383         PR target/83009
384         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
385         address check not strict.
387 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
389         * gimple-match.h (gimple_match_op): New class.
390         (mprts_hook): Replace parameters with a gimple_match_op *.
391         (maybe_build_generic_op): Likewise.
392         (gimple_simplified_result_is_gimple_val): Replace parameters with
393         a const gimple_match_op *.
394         (gimple_simplify): Replace code_helper * and tree * parameters with
395         a gimple_match_op * parameter.
396         (gimple_resimplify1): Replace code_helper *, tree and tree *
397         parameters with a gimple_match_op * parameter.
398         (gimple_resimplify2): Likewise.
399         (gimple_resimplify3): Likewise.
400         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
401         parameters with a gimple_match_op * parameter.
402         * gimple-match-head.c (gimple_simplify): Change prototypes of
403         auto-generated functions to take a gimple_match_op * instead of
404         separate code_helper * and tree * parameters.  Make the same
405         change in the top-level overload and update calls to the
406         gimple_resimplify routines.  Update calls to the auto-generated
407         functions and to maybe_push_res_to_seq in the publicly-facing
408         operation-specific gimple_simplify overloads.
409         (gimple_match_op::MAX_NUM_OPS): Define.
410         (gimple_resimplify1): Replace rcode and ops with a single res_op
411         parameter.  Update call to gimple_simplify.
412         (gimple_resimplify2): Likewise.
413         (gimple_resimplify3): Likewise.
414         (mprts_hook): Replace parameters with a gimple_match_op *.
415         (maybe_build_generic_op): Likewise.
416         (build_call_internal): Replace type, nargs and ops with
417         a gimple_match_op *.
418         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
419         with a single gimple_match_op *.  Update calls to mprts_hook,
420         build_call_internal and gimple_simplified_result_is_gimple_val.
421         Factor out code that is common to the tree_code and combined_fn cases.
422         * genmatch.c (expr::gen_transform): Replace tem_code and
423         tem_ops with a gimple_match_op called tem_op.  Update calls
424         to the gimple_resimplify functions and maybe_push_res_to_seq.
425         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
426         res_ops.  Update call to the gimple_resimplify functions.
427         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
428         (decision_tree::gen): Make the functions take a gimple_match_op *
429         called res_op instead of separate res_code and res_ops parameters.
430         Update call accordingly.
431         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
432         and ops with a single res_op parameter.  Update calls to
433         maybe_build_generic_op and maybe_push_res_to_seq.
434         (fold_stmt_1): Update calls to gimple_simplify and
435         replace_stmt_with_simplification.
436         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
437         and gimple_simplified_result_is_gimple_val.
438         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
439         gimple_simplify.
440         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
441         with a gimple_match_op *.
442         (vn_nary_build_or_lookup): Likewise.  Update call to
443         vn_nary_build_or_lookup_1.
444         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
445         gimple_match_op *.  Update calls to the gimple_resimplify routines
446         and to gimple_simplified_result_is_gimple_val.
447         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
448         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
449         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
450         (visit_nary_op): Likewise.
451         (visit_reference_op_load): Likewise.
453 2018-05-23  Luis Machado  <luis.machado@linaro.org>
455         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
456         modifier for printing the step amount.
458 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
460         PR target/78849
461         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
462         types.
464 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
466         * doc/sourcebuild.texi (Endianness): New subsubsection.
468 2018-05-23  Luis Machado  <luis.machado@linaro.org>
470         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
471         <prefetch_dynamic_strides>: New const bool field.
472         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
473         prefetch_dynamic_strides.
474         (exynosm1_prefetch_tune): Likewise.
475         (thunderxt88_prefetch_tune): Likewise.
476         (thunderx_prefetch_tune): Likewise.
477         (thunderx2t99_prefetch_tune): Likewise.
478         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
479         false.
480         (aarch64_override_options_internal): Update to set
481         PARAM_PREFETCH_DYNAMIC_STRIDES.
482         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
483         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
484         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
485         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
486         prefetch-dynamic-strides setting.
488 2018-05-23  Luis Machado  <luis.machado@linaro.org>
490         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
491         <minimum_stride>: New const int field.
492         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
493         minimum_stride field defaulting to -1.
494         (exynosm1_prefetch_tune): Likewise.
495         (thunderxt88_prefetch_tune): Likewise.
496         (thunderx_prefetch_tune): Likewise.
497         (thunderx2t99_prefetch_tune): Likewise.
498         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
499         <default_opt_level>: Set to 3.
500         (aarch64_override_options_internal): Update to set
501         PARAM_PREFETCH_MINIMUM_STRIDE.
502         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
503         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
504         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
505         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
506         stride is constant and is below the minimum stride threshold.
508 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
510         * config/arm/arm-cpus.in (mode26): Delete.
511         (armv4): Delete mode26 reference.
512         * config/arm/arm.c (arm_configure_build_target): Delete use of
513         isa_bit_mode26.
515 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
517         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
518         New insn pattern.
519         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
520         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
521         for non-SSE modes.
522         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
523         (floatunsdidf2): Ditto.
525 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
527         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
528         (fixuns_trunc<mode>si2_avx512f): Ditto.
529         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
530         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
531         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
533 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
535         PR rtl-optimization/79985
536         * df-scan.c (df_insn_refs_collect): Remove special case for
537         global registers and asm statements.
539 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
541         * extend.texi (Global Register Variables): Rewrite the bullet list.
542         Note that the register is available for allocation. Note that access
543         via inline asm must use constraints. Add note about async-signal
544         handlers. Remove paragraph about automagic register selection.
546 2018-05-23  Richard Biener  <rguenther@suse.de>
548         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
549         of fixed offset from memset VN.
551 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
553         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
554         first_interp field.
555         (alloc_cand_and_find_basis): Initialize first_interp field.
556         (slsr_process_mul): Modify first_interp field.
557         (slsr_process_add): Likewise.
558         (slsr_process_cast): Modify first_interp field for each new
559         interpretation.
560         (slsr_process_copy): Likewise.
561         (dump_candidate): Dump first_interp field.
562         (replace_mult_candidate): Process all interpretations, not just
563         subsequent ones.
564         (replace_rhs_if_not_dup): Likewise.
565         (replace_one_candidate): Likewise.
567 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
569         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
570         Add new boolean.
571         (aarch64_needs_frame_chain): New function.
572         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
574 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
576         PR target/84882
577         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
578         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
579         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
580         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
581         as true for strict-align.
582         (aarch64_can_inline_p): Perform checks even when callee has no
583         attributes to check for strict alignment.
584         * doc/extend.texi (AArch64 Function Attributes): Document
585         no-strict-align.
586         * doc/invoke.texi: (AArch64 Options): Likewise.
588 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
590         PR tree-optimization/85853
591         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
592         the handling of the root of the node to...
593         (vect_slp_analyze_node_operations_1): ...this new function,
594         and run the whole thing with the child nodes' def types
595         set according to their SLP node's def type.
597 2018-05-23  Richard Biener  <rguenther@suse.de>
599         PR middle-end/85874
600         * tree-data-ref.c (create_runtime_alias_checks): Defer
601         and ignore overflow warnings.
603 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
605         PR tree-optimization/85822
606         * tree-vrp.c (is_masked_range_test): Fix handling of negative
607         constants.
609 2018-05-23  Richard Biener  <rguenther@suse.de>
611         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
612         memset constants via native_interpret_expr.
614 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
616         PR target/85345
617         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
618         attribute.
619         (cgraph_node::create_alias): Likewise.
620         (cgraph_node::get_availability): Check ifunc_resolver instead
621         of looking up ifunc attribute.
622         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
623         * varasm.c (do_assemble_alias): Likewise.
624         (assemble_alias): Likewise.
625         (default_binds_local_p_3): Likewise.
626         * cgraph.h (cgraph_node): Add ifunc_resolver.
627         (cgraph_node::only_called_directly_or_aliased_p): Return false
628         for IFUNC resolver.
629         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
630         attribute.
631         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
632         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
633         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
634         instead of looking up ifunc attribute.
636 2018-05-22  Luis Machado  <luis.machado@linaro.org>
638         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
640 2018-05-22  Martin Sebor  <msebor@redhat.com>
642         PR middle-end/85359
643         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
644         only when expasion succeeds.
645         (expand_builtin_strcmp): Same.
646         (expand_builtin_strncmp): Same.
648 2018-05-22  Martin Sebor  <msebor@redhat.com>
650         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
652 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
653             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
655         * config/aarch64/aarch64-ldpstp.md: Replace uses of
656         aarch64_mem_pair_operand with memory_operand and delete operand swapping
657         code.
658         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
659         Add check for legitimate_address.
660         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
661         (aarch64_swap_ldrstr_operands): New.
662         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
663         Define prototype.
665 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
666             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
668         * config/aarch64/aarch64.md: New patterns to generate stp
669         and ldp.
670         (store_pair_sw, store_pair_dw): New patterns to generate stp for
671         single words and double words.
672         (load_pair_sw, load_pair_dw): Likewise.
673         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
674         Delete.
675         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
676         Delete.
677         * config/aarch64/aarch64-ldpstp.md: Modify peephole
678         for different mode ldpstp and add peephole for merged zero stores.
679         Likewise for loads.
680         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
681         Add size check.
682         (aarch64_gen_store_pair): Rename calls to match new patterns.
683         (aarch64_gen_load_pair): Rename calls to match new patterns.
684         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
685         (load_pair<DREG:mode><DREG2:mode>): ... This.
686         (store_pair<mode>): Rename to...
687         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
688         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
689         New mode iterators.
690         (V_INT_EQUIV): Handle SImode.
691         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
692         New predicate.
694 2018-05-22  Martin Sebor  <msebor@redhat.com>
696         PR c/85623
697         * calls.c (maybe_warn_nonstring_arg): Use string length to set
698         or ajust the presumed bound on an operation to avoid unnecessary
699         warnings.
701 2018-05-22  Martin Sebor  <msebor@redhat.com>
703         PR tree-optimization/85826
704         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
705         assuming that a DECL necesarily has a constant size.
707 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
709         PR middle-end/85862
710         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
712 2018-05-22  Richard Biener  <rguenther@suse.de>
714         PR tree-optimization/85834
715         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
716         non-constant and non-zero memset arguments.
718 2018-05-22  Martin Liska  <mliska@suse.cz>
720         PR ipa/85607
721         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
723 2018-05-22  Richard Biener  <rguenther@suse.de>
725         PR tree-optimization/85863
726         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
727         comparisons when vectype is specified.
728         (vectorizable_condition): Do not specify vectype for
729         vect_is_simple_cond when SLP vectorizing.
731 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
733         PR target/85657
734         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
735         define __ibm128 as long double.
736         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
737         as a distinct type when IEEE 128-bit support is enabled.
738         (init_float128_ieee): Fix up conversions between IFmode and IEEE
739         128-bit types to use the correct functions.
740         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
741         convert between 128-bit floating point types that have different
742         modes but the same representation, instead of using gen_lowpart to
743         makean alias.
744         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
745         KFmode.
746         (IFKF_reg): New attributes to give the register constraints for
747         IFmode and KFmode.
748         (extend<mode>tf2_internal): New insns to mark an explicit
749         conversion between 128-bit floating point types that have a
750         different mode but share the same representation.
752 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
754         PR tree-optimization/85814
755         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
756         a null return from get_strinfo when unsharing the next
757         strinfo in the chain.
759 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
761         PR gcc/84923
762         * varasm.c (weak_finish): Clean up weak_decls.
764 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
766         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
767         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
768         UNSPEC_UADALP values.
769         * config/aarch64/iterators.md (ABAL): New int iterator.
770         (ABDL2): Likewise.
771         (ADALP): Likewise.
772         (sur): Add mappings for the above.
773         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
774         New define_insn.
775         (aarch64_<sur>abal<mode>_4): Likewise.
776         (aarch64_<sur>adalp<mode>_3): Likewise.
777         (<sur>sadv16qi): New define_expand.
779 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
781         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
782         (*movdf_internal): Ditto.
783         (*rcpsf2_sse): Ditto.
784         (*rsqrtsf2_sse): Ditto.
785         (*sqrt<mode>2_sse): Ditto.
787 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
789         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
790         eor3q<mode>4.
791         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
792         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
793         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
794         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
795         vbcaxq_s64): New.
796         * config/aarch64/arm_neon.h: Likewise.
797         * config/aarch64/iterators.md (VQ_I): New.
799 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
801         * config.gcc: Add arc/t-multilib-linux to tmake_file for
802         arc*-*-linux*.
803         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
804         MULTILIB_DIRNAMES
806 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
808         * config/nds32/constraints.md (S): New constraint.
809         * config/nds32/nds32.md (call_internal): Use constraint S.
810         (call_value_internal): Likewise.
811         (sibcall_internal): Likewise.
812         (sibcall_value_internal): Likewise.
814 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
815             Chung-Ju Wu  <jasonwucj@gmail.com>
817         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
818         into consideration.
820 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
821             Chung-Ju Wu  <jasonwucj@gmail.com>
823         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
824         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
825         (nds32_rtx_costs_impl): Simplify.
826         (nds32_address_cost_impl): Simplify.
827         (nds32_init_rtx_costs): New function.
828         (nds32_rtx_costs_speed_prefer): Likewise.
829         (nds32_rtx_costs_size_prefer): Likewise.
830         (nds32_address_cost_speed_prefer): Likewise.
831         (nds32_address_cost_speed_fwprop): Likewise.
832         (nds32_address_cost_size_prefer): Likewise.
833         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
834         * config/nds32/nds32.c (nds32_option_override): Use
835         nds32_init_rtx_costs function.
837 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
839         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
840         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
841         (TARGET_PIPELINE_N8): Likewise.
842         (TARGET_PIPELINE_N10): Likewise.
843         (TARGET_PIPELINE_N13): Likewise.
844         (TARGET_PIPELINE_GRAYWOLF): Likewise.
846 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
848         * config/nds32/nds32-fpu.md: Update copyright year.
850 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
852         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
854 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
856         * config/nds32/nds32.c
857         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
858         * config/nds32/nds32.opt (minline-asm-r15): New option.
860 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
862         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
863         MASK_HW_ABS.
864         * config/nds32/nds32.md (abssi2): New pattern.
866 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
868         * config/i386/i386.md (rex64namesuffix): New mode attribute.
869         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
870         Merge insn pattern from sse_cvtsi2ss<round_name> and
871         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
872         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
873         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
874         using SWI48 mode iterator.
875         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
876         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
877         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
878         pattern from sse_cvttss2si<round_saeonly_name>
879         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
880         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
881         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
882         using SWI48 mode iterator.
883         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
884         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
885         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
886         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
887         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
888         using SWI48 mode iterator.
889         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
890         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
891         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
892         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
893         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
894         SWI48 mode iterator.
895         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
896         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
897         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
898         pattern from sse_cvttsd2si<round_saeonly_name>
899         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
901 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
903         * config/nds32/nds32-md-auxiliary.c
904         (nds32_valid_smw_lwm_base_p): Refine.
905         (nds32_output_smw_single_word): Refine.
906         (nds32_output_smw_double_word): New.
907         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
909 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
911         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
912         (nds32_output_stack_pop): Refine.
913         (nds32_expand_unaligned_load): Refine.
914         (nds32_expand_unaligned_store): Refine.
916 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
917             Chung-Ju Wu  <jasonwucj@gmail.com>
919         * config/nds32/constants.md: Add TP_REGNUM constant.
920         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
921         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
922         UNSPEC_ADD32.
923         * config/nds32/nds32-doubleword.md: Consider flag_pic.
924         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
925         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
926         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
927         and PIC code generation.
928         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
929         code generation.
930         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
931         optimization.
932         * config/nds32/nds32.md: Support TLS and PIC.
933         * config/nds32/nds32.c: Support TLS and PIC.
934         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
935         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
936         predicate.
938 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
940         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
941         mode with E_ prefix.
943 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
944             Chung-Ju Wu  <jasonwucj@gmail.com>
946         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
947         * config/nds32/nds32-md-auxiliary.c
948         (symbolic_reference_mentioned_p): New.
949         (nds32_legitimize_ict_address): New.
950         (nds32_expand_ict_move): New.
951         (nds32_indirect_call_referenced_p): New.
952         (nds32_symbol_binds_local_p): Delete.
953         (nds32_long_call_p): Modify.
954         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
955         * config/nds32/nds32-protos.h
956         (symbolic_reference_mentioned_p): Declare.
957         (nds32_legitimize_ict_address): Declare.
958         (nds32_expand_ict_move): Declare.
959         (nds32_indirect_call_referenced_p): Declare.
960         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
961         (nds32_relax_group): Use nds32_ict_const_p as condition.
962         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
963         (nds32_asm_file_start): Output ict_model directive in asm code.
964         (nds32_legitimate_address_p): Consider indirect call.
965         (nds32_print_operand): Consider indirect call.
966         (nds32_print_operand_address): Consider indirect call.
967         (nds32_insert_attributes): Handle "indirect_call" attribute.
968         (TARGET_LEGITIMATE_ADDRESS_P): Define.
969         (TARGET_LEGITIMATE_CONSTANT_P): Define.
970         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
971         (TARGET_DELEGITIMIZE_ADDRESS): Define.
972         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
973         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
974         (TARGET_ICT_MODEL_SMALL): Define.
975         (TARGET_ICT_MODEL_LARGE): Define.
976         * config/nds32/nds32.md (movsi): Consider ict model.
977         (call, call_value): Consider ict model.
978         (sibcall, sibcall_value): Consider ict model.
979         * config/nds32/nds32.opt (mict-model): New option.
980         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
981         model.
983 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
984             Monk Chiang  <sh.chiang04@gmail.com>
985             Jim Wilson <jimw@sifive.com>
987         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
988         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
989         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
990         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
991         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
992         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
993         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
994         compute save_libcall_adjustment properly.
995         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
996         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
997         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
998         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
999         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1000         (ABI_SPEC): Handle mabi=ilp32e.
1001         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1002         (RVE): Add RVE mask.
1003         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1004         <-march>: Add rv32e as an example.
1006 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1008         PR c++/82899
1009         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1010         (intra_create_variable_infos): Handle C++ constructors.
1012 2018-05-18  Martin Liska  <mliska@suse.cz>
1014         * passes.def: Remove a redundant pass.
1016 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1018         PR bootstrap/85838
1019         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1021 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1023         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1024         (ARMv4): Update.
1025         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1026         (ARMv6m): Update.
1027         (armv2, armv2a, armv3, armv3m): Delete architectures.
1028         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1029         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1030         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1031         Delete cpus.
1032         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1033         (*mulsidi3adddi): Likewise.
1034         (mulsidi3): Likewise.
1035         (*mulsidi3_nov6): Likewise.
1036         (umulsidi3): Likewise.
1037         (umulsidi3_nov6): Likewise.
1038         (umaddsidi4): Likewise.
1039         (*umulsidi3adddi): Likewise.
1040         (smulsi3_highpart): Likewise.
1041         (*smulsi3_highpart_nov6): Likewise.
1042         (umulsi3_highpart): Likewise.
1043         (*umulsi3_highpart_nov6): Likewise.
1044         * config/arm/arm.h (arm_arch3m): Delete.
1045         * config/arm/arm.c (arm_arch3m): Delete.
1046         (arm_option_override_internal): Update armv3-related comment.
1047         (arm_configure_build_target): Delete use of isa_bit_mode32.
1048         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1049         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1050         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1051         (mulsa3): Likewise.
1052         (mulusa3): Likewise.
1053         * config/arm/arm-protos.h (arm_arch3m): Delete.
1054         * config/arm/arm-tables.opt: Regenerate.
1055         * config/arm/arm-tune.md: Likewise.
1056         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1057         deleted architectures.
1059 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1061         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1062         (armv5t, armv5te): New features.
1063         (ARMv5, ARMv5e): Delete fgroups.
1064         (ARMv5t, ARMv5te): Adjust for above changes.
1065         (ARMv6m): Likewise.
1066         (armv5, armv5e): Delete arches.
1067         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1068         arm_arch5.
1069         (*call_reg_arm): Likewise.
1070         (*call_value_reg_armv5): Likewise.
1071         (*call_value_reg_arm): Likewise.
1072         (*call_symbol): Likewise.
1073         (*call_value_symbol): Likewise.
1074         (*sibcall_insn): Likewise.
1075         (*sibcall_value_insn): Likewise.
1076         (clzsi2): Likewise.
1077         (prefetch): Likewise.
1078         (define_split and define_peephole2 dependent on arm_arch5):
1079         Likewise.
1080         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1081         arm_arch5e.
1082         (TARGET_ARM_QBIT): Likewise.
1083         (TARGET_DSP_MULTIPLY): Likewise.
1084         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1085         (arm_arch5, arm_arch5e): Delete.
1086         (arm_arch5t, arm_arch5te): Declare.
1087         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1088         (arm_arch5t): Declare.
1089         (arm_option_reconfigure_globals): Update for the above.
1090         (arm_options_perform_arch_sanity_checks): Update comment, replace
1091         use of arm_arch5 with arm_arch5t.
1092         (use_return_insn): Likewise.
1093         (arm_emit_call_insn): Likewise.
1094         (output_return_instruction): Likewise.
1095         (arm_final_prescan_insn): Likewise.
1096         (arm_coproc_builtin_available): Likewise.
1097         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1098         arm_arch5e with arm_arch5t and arm_arch5te.
1099         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1100         (arm_arch5t, arm_arch5te): Declare.
1101         * config/arm/arm-tables.opt: Regenerate.
1102         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1103         * config/arm/t-multilib: Likewise.
1104         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1105         instead of arm_arch5.
1106         (*call_reg_thumb1): Likewise.
1107         (*call_value_reg_thumb1_v5): Likewise.
1108         (*call_value_reg_thumb1): Likewise.
1109         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1110         unreachable path.
1111         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1113 2018-05-18  Martin Liska  <mliska@suse.cz>
1115         PR gcov-profile/84846
1116         * doc/gcov.texi: Document -t option of gcov tool.
1118 2018-05-18  Martin Liska  <mliska@suse.cz>
1120         PR gcov-profile/84846
1121         * gcov.c (print_usage): Add new -t option.
1122         (process_args): Handle the option.
1123         (generate_results): Use stdout as output when requested by
1124         the option.
1126 2018-05-18  Martin Liska  <mliska@suse.cz>
1128         PR gcov-profile/84846
1129         * coverage.c (coverage_init): Write PWD to .gcno file.
1130         * doc/gcov.texi: Document how working directory is printed.
1131         * gcov-dump.c (dump_gcov_file): Print PWD.
1132         * gcov.c (output_intermediate_file): Likewise.
1133         (read_graph_file): Read PWD string.
1134         (output_lines): Print PWD.
1136 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1138         PR middle-end/85817
1139         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1140         for retval and return false if all args to phi are zero.        
1142 2018-05-18  Richard Biener  <rguenther@suse.de>
1144         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1145         method.
1146         (evrp_dom_walker::before_dom_children): Call it.
1148 2018-05-18  Richard Biener  <rguenther@suse.de>
1150         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1151         results when processing array refs with variable index.
1153 2018-05-18  Toon Moene  <toon@moene.org>
1155         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1156         directly after that of -floop-interchange. Indicate that both
1157         options are enabled by default when specifying -O3. 
1159 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1161         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1162         iterator.  Delete separate integer-mode vec_set<mode> expander.
1163         (aarch64_simd_vec_setv2di): Delete.
1164         (vec_setv2di): Delete.
1165         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1166         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1167         the "w, r" alternative.
1169 2018-05-18  Martin Liska  <mliska@suse.cz>
1171         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1172         * tree-pass.h (make_pass_lower_switch_O0): New function.
1173         * tree-switch-conversion.c (node_has_low_bound): Remove.
1174         (node_has_high_bound): Likewise.
1175         (node_is_bounded): Likewise.
1176         (class pass_lower_switch): Make it a template type and create
1177         two instances.
1178         (pass_lower_switch::execute): Add template argument.
1179         (make_pass_lower_switch): New function.
1180         (make_pass_lower_switch_O0): New function.
1181         (do_jump_if_equal): Remove.
1182         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1183         all the hard work to tree optimization passes.
1185 2018-05-18  Martin Liska  <mliska@suse.cz>
1187         * dbgcnt.c (limit_low): Renamed from limit.
1188         (limit_high): New variable.
1189         (dbg_cnt_is_enabled): Check for upper limit.
1190         (dbg_cnt): Adjust dumping.
1191         (dbg_cnt_set_limit_by_index): Add new argument for high
1192         value.
1193         (dbg_cnt_set_limit_by_name): Likewise.
1194         (dbg_cnt_process_single_pair): Parse new format.
1195         (dbg_cnt_process_opt): Use strtok.
1196         (dbg_cnt_list_all_counters): Remove 'value' and add
1197         'limit_high'.
1198         * doc/invoke.texi: Document changes.
1200 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1202         * doc/sourcebuild.texi (scalar_all_fma): Document.
1203         * tree.def (FMA_EXPR): Delete.
1204         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1205         * internal-fn.c (ternary_direct): New macro.
1206         (expand_ternary_optab_fn): Likewise.
1207         (direct_ternary_optab_supported_p): Likewise.
1208         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1209         * builtins.c (fold_builtin_fma): Delete.
1210         (fold_builtin_3): Don't call it.
1211         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1212         * expr.c (expand_expr_real_2): Likewise.
1213         * fold-const.c (operand_equal_p): Likewise.
1214         (fold_ternary_loc): Likewise.
1215         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1216         * gimple.c (DEFTREECODE): Likewise.
1217         * gimplify.c (gimplify_expr): Likewise.
1218         * optabs-tree.c (optab_for_tree_code): Likewise.
1219         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1220         * tree-eh.c (operation_could_trap_p): Likewise.
1221         (stmt_could_throw_1_p): Likewise.
1222         * tree-inline.c (estimate_operator_cost): Likewise.
1223         * tree-pretty-print.c (dump_generic_node): Likewise.
1224         (op_code_prio): Likewise.
1225         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1226         * tree-ssa-operands.c (get_expr_operands): Likewise.
1227         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1228         * fold-const-call.h (fold_fma): Delete.
1229         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1230         CFN_FNMA and CFN_FNMS.
1231         (fold_fma): Delete.
1232         * genmatch.c (combined_fn): New enum.
1233         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1234         (commutative_op): New function.
1235         (commutate): Use it.  Handle more than 2 operands.
1236         (dt_operand::gen_gimple_expr): Use commutative_op.
1237         (parser::parse_expr): Allow :c to be used with non-binary
1238         operators if the commutative operand is known.
1239         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1240         CFN_FMS, CFN_FNMA and CFN_FNMS.
1241         (backprop::process_assign_use): Remove FMA_EXPR handling.
1242         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1243         (gen_hsa_fma): New function.
1244         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1245         IFN_FNMA and IFN_FNMS.
1246         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1247         * gimple-fold.h (follow_all_ssa_edges): Declare.
1248         * gimple-fold.c (follow_all_ssa_edges): New function.
1249         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1250         gimple_build interface and use follow_all_ssa_edges to fold the result.
1251         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1252         instead of checking for optabs directly.
1253         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1254         rather than FMA_EXPRs.
1255         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1256         call to IFN_FMA instead of an FMA_EXPR.
1258 2018-05-17  Jim Wilson  <jimw@sifive.com>
1260         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1261         sign extended promoted subreg, and the range does not have the sign bit
1262         set, then do a sign extend.
1264         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1265         test, check for sign extended subreg and/or constant operands, and
1266         do a sign extend in that case.
1268 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1270         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1271         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1272         Add untyped.
1273         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1274         Change logics_shift_reg to logics_shift_imm.
1275         (thunderx2t99_fp_loadpair_basic): Delete.
1276         (thunderx2t99_fp_storepair_basic): Delete.
1277         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1278         (thunderx2t99_asimd_polynomial): Delete.
1279         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1280         and neon_fp_mul_d_scalar_q.
1281         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1282         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1283         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1284         (thunderx2t99_asimd_lut): Add missing tbl types.
1285         (thunderx2t99_asimd_ext): Delete.
1286         (thunderx2t99_asimd_load1_1_mult): Delete.
1287         (thunderx2t99_asimd_load1_2_mult): Delete.
1288         (thunderx2t99_asimd_load1_ldp): New.
1289         (thunderx2t99_asimd_load1): New.
1290         (thunderx2t99_asimd_load2): Add missing *load2* types.
1291         (thunderx2t99_asimd_load3): New.
1292         (thunderx2t99_asimd_load4): New.
1293         (thunderx2t99_asimd_store1_1_mult): Delete.
1294         (thunderx2t99_asimd_store1_2_mult): Delete.
1295         (thunderx2t99_asimd_store2_mult): Delete.
1296         (thunderx2t99_asimd_store2_onelane): Delete.
1297         (thunderx2t99_asimd_store_stp): New.
1298         (thunderx2t99_asimd_store1): New.
1299         (thunderx2t99_asimd_store2): New.
1300         (thunderx2t99_asimd_store3): New.
1301         (thunderx2t99_asimd_store4): New.
1303 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1305         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1306         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1308 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1309             Segher Boessenkool  <segher@kernel.crashing.org>
1311         PR target/85698
1312         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1313         operand.
1315 2018-05-17  Richard Biener  <rguenther@suse.de>
1317         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1318         for pruning loop and prune defs feeding only already visited PHIs.
1320 2018-05-17  Richard Biener  <rguenther@suse.de>
1322         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1324 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1325             Richard Biener  <rguenther@suse.de>
1327         PR tree-optimization/85793
1328         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1329         for VMAT_ELEMENTWISE.
1331 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1333         * internal-fn.h (lookup_internal_fn): Declare
1334         * internal-fn.c (lookup_internal_fn): New function.
1335         * gimple.c (gimple_build_call_from_tree): Handle calls to
1336         internal functions.
1337         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1338         internal function names.
1339         * tree-pretty-print.c (dump_generic_node): Likewise.
1340         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1342 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1344         * gimple-fold.h (gimple_build): Make the function forms take
1345         combined_fn rather than built_in_function.
1346         (gimple_simplify): Likewise.
1347         * gimple-match-head.c (gimple_simplify): Likewise.
1348         * gimple-fold.c (gimple_build): Likewise.
1349         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1350         rather than gimple_build_call_internal.
1351         (get_initial_defs_for_reduction): Likewise.
1352         (vect_create_epilog_for_reduction): Likewise.
1353         (vectorizable_live_operation): Likewise.
1355 2018-05-17  Martin Liska  <mliska@suse.cz>
1357         * gimple-ssa-sprintf.c (format_directive): Do not use
1358         space in between 'G_' and '('.
1360 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1362         PR target/85323
1363         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1364         even if the mask is not all ones.
1366         PR target/85323
1367         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1368         vector.
1369         (ix86_gimple_fold_builtin): Likewise.
1371         PR target/85323
1372         * config/i386/i386.c: Include tree-vector-builder.h.
1373         (ix86_vector_shift_count): New function.
1374         (ix86_fold_builtin): Fold shift builtins by scalar count.
1375         (ix86_gimple_fold_builtin): Likewise.
1377         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1378         _mm512_setzero): New intrinsics.
1380 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1381             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1383         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1384         code generation for cases where splatting a value is not useful.
1385         * simplify-rtx.c (simplify_ternary_operation): Simplify
1386         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1387         mode to a vec_concat.
1389 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1391         * config.gcc: Support "goldmont-plus".
1392         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1393         "goldmont-plus".
1394         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1395         PROCESSOR_GOLDMONT_PLUS.
1396         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1397         (processor_target_table): Add "goldmont-plus".
1398         (PTA_GOLDMONT_PLUS): Define.
1399         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1400         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1401         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1402         (fold_builtin_cpu): Add "goldmont-plus".
1403         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1404         (ix86_option_override_internal): Add "goldmont-plus".
1405         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1406         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1407         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1408         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1410 2018-05-17  Richard Biener  <rguenther@suse.de>
1412         PR tree-optimization/85757
1413         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1414         remove defs that only feed that PHI from further processing.
1416 2018-05-16  Jim Wilson  <jimw@sifive.com>
1418         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1419         asterisk to name.
1420         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1422 2018-05-16  Mark Wielaard  <mark@klomp.org>
1424         * dwarf2out.c (count_index_strings): New function.
1425         (output_indirect_strings): Call count_index_strings and generate
1426         header for dwarf_version >= 5.
1428 2018-05-16  Mark Wielaard  <mark@klomp.org>
1430         * dwarf2out.c (dwarf_FORM): New function.
1431         (set_indirect_string): Use dwarf_FORM.
1432         (reset_indirect_string): Likewise.
1433         (size_of_die): Likewise.
1434         (value_format): Likewise.
1435         (output_die): Likewise.
1436         (add_skeleton_AT_string): Likewise.
1437         (output_macinfo_op): Likewise.
1438         (index_string): Likewise.
1439         (output_index_string_offset): Likewise.
1440         (output_index_string): Likewise.
1441         (count_index_strings): Likewise.
1443 2018-05-16  Carl Love  <cel@us.ibm.com>
1445         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1446         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1448 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1450         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1451         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1453 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1455         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1456         (fnma<mode>4): Likewise.
1457         (fms<mode>4): Likewise.
1458         (fnms<mode>4): Likewise.
1459         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1460         (aarch64_fnma<mode>4): Likewise.
1461         (aarch64_fms<mode>4): Likewise.
1462         (aarch64_fnms<mode>4): Likewise.
1463         (aarch64_fnmadd<mode>4): Likewise.
1465 2018-05-16  Jason Merrill  <jason@redhat.com>
1467         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1469 2018-05-16  Richard Biener  <rguenther@suse.de>
1471         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1472         (dump_stmt_cost): Declare.
1473         (add_stmt_cost): Dump cost we add.
1474         (add_stmt_costs): New function.
1475         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1476         No longer exported.
1477         (vect_analyze_stmt): Adjust prototype.
1478         (vectorizable_condition): Likewise.
1479         (vectorizable_live_operation): Likewise.
1480         (vectorizable_reduction): Likewise.
1481         (vectorizable_induction): Likewise.
1482         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1483         cost vector to pass to vectorizable_ and record afterwards.
1484         (vect_model_reduction_cost): Take cost vector argument and adjust.
1485         (vect_model_induction_cost): Likewise.
1486         (vectorizable_reduction): Likewise.
1487         (vectorizable_induction): Likewise.
1488         (vectorizable_live_operation): Likewise.
1489         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1490         SLP_TREE_NUMBER_OF_VEC_STMTS.
1491         (vect_analyze_slp_cost_1): Remove.
1492         (vect_analyze_slp_cost): Likewise.
1493         (vect_slp_analyze_node_operations): Take visited args and
1494         a target cost vector.  Avoid processing already visited stmt sets.
1495         (vect_slp_analyze_operations): Use a local cost vector to gather
1496         costs and register those of non-discarded instances.
1497         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1498         (vect_schedule_slp_instance): Remove copying of
1499         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1500         zero.
1501         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1502         adding cost.  Record cost entry location.
1503         (vect_prologue_cost_for_slp_op): Function to compute cost of
1504         a constant or invariant generated for SLP vect in the prologue,
1505         split out from vect_analyze_slp_cost_1.
1506         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1507         (vect_model_promotion_demotion_cost): Likewise.
1508         (vect_model_store_cost): Likewise, make static.
1509         (vect_model_load_cost): Likewise.
1510         (vectorizable_bswap): Add cost vector arg and adjust.
1511         (vectorizable_call): Likewise.
1512         (vectorizable_simd_clone_call): Likewise.
1513         (vectorizable_conversion): Likewise.
1514         (vectorizable_assignment): Likewise.
1515         (vectorizable_shift): Likewise.
1516         (vectorizable_operation): Likewise.
1517         (vectorizable_store): Likewise.
1518         (vectorizable_load): Likewise.
1519         (vectorizable_condition): Likewise.
1520         (vectorizable_comparison): Likewise.
1521         (can_vectorize_live_stmts): Likewise.
1522         (vect_analyze_stmt): Likewise.
1523         (vect_transform_stmt): Adjust calls to vectorizable_*.
1524         * tree-vectorizer.c: Include gimple-pretty-print.h.
1525         (dump_stmt_cost): New function.
1527 2018-05-16  Richard Biener  <rguenther@suse.de>
1529         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1530         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1531         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1532         (check_name): New callback.
1533         (dse_classify_store): Track cycles via a visited bitmap of PHI
1534         defs and simplify handling of in-loop and across loop dead stores
1535         and properly fail for loop-variant refs.  Handle byte-tracking with
1536         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1537         limiting the walk.
1539 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1541         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1542         (vect_get_mask_type_for_stmt): Likewise.
1543         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1544         split out from...
1545         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1546         to determine the statement's vector type and the vector type that
1547         should be used for calculating nunits.  Deal with cases in which
1548         the type has to be deferred.
1549         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1550         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1551         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1552         (vect_determine_vf_for_stmt): New functions, split out from...
1553         (vect_determine_vectorization_factor): ...here.
1554         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1555         (vect_get_mask_type_for_stmt): New functions, split out from
1556         vect_determine_vectorization_factor.
1558 2018-05-16  Richard Biener  <rguenther@suse.de>
1560         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1561         verify the [VEC_]COND_EXPR embedded comparison.
1563 2018-05-15  Martin Sebor  <msebor@redhat.com>
1565         PR tree-optimization/85753
1566         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1567         RECORD_TYPE in addition to ARRAY_TYPE.
1569 2018-05-15  Martin Sebor  <msebor@redhat.com>
1571         PR middle-end/85643
1572         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1574 2018-05-15  Richard Biener  <rguenther@suse.de>
1576         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1577         add by_clobber_p one.  Change algorithm to collect all defs
1578         representing uses we need to walk and try reducing them to
1579         a single one before failing.
1580         (dse_dom_walker::dse_optimize_stmt): Adjust.
1582 2018-05-13  Mark Wielaard  <mark@klomp.org>
1584         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1585         (size_of_loc_descr): Likewise.
1586         (output_loc_operands): Likewise.
1587         (output_loc_operands_raw): Likewise.
1588         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1589         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1590         (hash_loc_operands): Likewise.
1591         (compare_loc_operands): Likewise.
1593 2018-05-14  Mark Wielaard  <mark@klomp.org>
1595         * dwarf2out.c (count_index_addrs): New function.
1596         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1598 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1600         PR tree-optimization/83648
1601         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1602         return value as malloc candidate.
1604 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1606         PR ipa/85734
1607         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1608         as true in call to suggest_attribute.
1610 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1612         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1613         -mreadonly-in-sdata.
1615 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1617         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1618         New pattern.
1619         (aarch64_crypto_aesd_fused): Likewise.
1621 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1623         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1624         (movsi_aarch64): Likewise.
1625         (load_pairsi): Likewise.
1626         (load_pairdi): Likewise.
1627         (store_pairsi): Likewise.
1628         (store_pairdi): Likewise.
1629         (load_pairsf): Likewise.
1630         (load_pairdf): Likewise.
1631         (store_pairsf): Likewise.
1632         (store_pairdf): Likewise.
1633         (zero_extend): Likewise.
1634         (trunc): Swap alternatives.
1635         (fcvt_target): Add '?' to prefer w over r.
1637 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1639         PR target/85756
1640         * config/i386/i386.md: Disallow non-commutative arithmetics in
1641         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1642         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1643         in the peephole2 before it.
1645 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1647         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1648         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1649         (ix86_handle_option): Handle -mcldemote.
1650         * config.gcc: New header.
1651         * config/i386/cldemoteintrin.h: New file.
1652         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1653         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1654         -mcldemote.
1655         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1656         OPTION_MASK_ISA_CLDEMOTE.
1657         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1658         (ix86_valid_target_attribute_inner_p): Ditto.
1659         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1660         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1661         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1662         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1663         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1664         (cldemote): New.
1665         * config/i386/i386.opt: Add -mcldemote.
1666         * config/i386/x86intrin.h: New header.
1667         * doc/invoke.texi: Add -mcldemote.
1669 2018-05-14  Richard Biener  <rguenther@suse.de>
1671         * doc/match-and-simplify.texi: Adjust :s documentation.
1673 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1675         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1676         intended memcpy size.
1677         (REORDER_45): Likewise.
1679 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1681         * sort.cc: New file.
1682         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1683         * vec.c (qsort_chk): Use gcc_qsort.
1684         * Makefile.in (OBJS-libcommon): Add sort.o.
1685         (build/sort.o): New target.  Use it...
1686         (BUILD_RTL): ... here, and...
1687         (build/gencfn-macros): ... here, and...
1688         (build/genmatch): ... here.
1690 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1691             Chung-Ju Wu  <jasonwucj@gmail.com>
1693         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1694         * config/nds32/nds32-graywolf.md: New file.
1695         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1696         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1697         pipeline.
1698         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1699         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1700         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1701         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1702         * config/nds32/pipelines.md: Include n15 settings.
1704 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1705             Chung-Ju Wu  <jasonwucj@gmail.com>
1707         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1708         * config/nds32/nds32-n13.md: New file.
1709         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1710         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1711         pipeline.
1712         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1713         * config/nds32/nds32.md (pipeline_model): Add n13.
1714         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1715         * config/nds32/pipelines.md: Include n13 settings.
1717 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1718             Chung-Ju Wu  <jasonwucj@gmail.com>
1720         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1721         * config/nds32/nds32-n10.md: New file.
1722         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1723         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1724         pipeline.
1725         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1726         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1727         * config/nds32/nds32.md (pipeline_model): Add n10.
1728         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1729         * config/nds32/pipelines.md: Include n10 settings.
1731 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1732             Kito Cheng  <kito.cheng@gmail.com>
1733             Chung-Ju Wu  <jasonwucj@gmail.com>
1735         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1736         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1737         Add enum values for DSP extension instructions.
1738         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1739         New constraints.
1740         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1741         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1742         New code iterators.
1743         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1744         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1745         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1746         * config/nds32/nds32-intrinsic.md: Likewise.
1747         * config/nds32/nds32_intrinsic.h: Likewise.
1748         * config/nds32/nds32-md-auxiliary.c: Likewise.
1749         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1750         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1751         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1752         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1753         * config/nds32/nds32-protos.h: New declarations for DSP extension.
1754         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1755         TYPE_DMAC in switch statement.
1756         * config/nds32/nds32.c: New checking and implementation for DSP
1757         extension instructions.
1758         * config/nds32/nds32.h: Likewise.
1759         * config/nds32/nds32.md: Likewise.
1760         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
1761         * config/nds32/predicates.md: Implement new predicates for DSP
1762         extension.
1764 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1766         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
1767         Reformat alternatives and attributes so it is easier to identify
1768         which constraints/attributes go with which instruction.
1769         (mov<mode>_hardfloat32, FMOVE64): Likewise.
1770         (mov<mode>_softfloat32, FMOVE64): Likewise.
1771         (mov<mode>_hardfloat64, FMOVE64): Likewise.
1772         (mov<mode>_softfloat64, FMOVE64): Likewise.
1774 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1776         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1777         subsection.
1778         (Basic PowerPC Built-in Functions): The new name of the
1779         subsection previously known as "PowerPC Built-in Functions".
1780         (Basic PowerPC Built-in Functions Available on all Configurations):
1781         New subsubsection.
1782         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
1783         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
1784         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
1785         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
1787 2018-05-11  Martin Jambor  <mjambor@suse.cz>
1789         PR ipa/85655
1790         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
1791         single const.
1793 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1795         PR target/85733
1796         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
1798 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
1800         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
1801         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
1802         (ix86_handle_option): Handle -mwaitpkg.
1803         * config.gcc: New header.
1804         * config/i386/cpuid.h (bit_WAITPKG): New bit.
1805         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1806         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1807         function type.
1808         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1809         OPTION_MASK_ISA_WAITPKG.
1810         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1811         (ix86_option_override_internal): Add PTA_WAITPKG.
1812         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1813         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1814         IX86_BUILTIN_TPAUSE.
1815         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1816         __builtin_ia32_umwait and __builtin_ia32_tpause.
1817         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1818         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1819         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1820         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1821         UNSPECV_TPAUSE): New.
1822         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1823         * config/i386/i386.opt: Add -mwaitpkg.
1824         * config/i386/waitpkgintrin.h: New file.
1825         * config/i386/x86intrin.h: New header.
1826         * doc/invoke.texi: Add -mwaitpkg.
1828 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1830         PR target/85606
1831         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1832         equivalent.
1833         (cortex-m0): Use armv6s-m isa.
1834         (cortex-m0plus): Likewise.
1835         (cortex-m1): Likewise.
1836         (cortex-m0.small-multiply): Likewise.
1837         (cortex-m0plus.small-multiply): Likewise.
1838         (cortex-m1.small-multiply): Likewise.
1840 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1841             Jakub Jelinek  <jakub@redhat.com>
1843         PR tree-optimization/85692
1844         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1845         source permute as well.
1847 2018-05-11  Martin Liska  <mliska@suse.cz>
1849         PR sanitizer/85556
1850         * doc/extend.texi: Document LLVM style format for no_sanitize
1851         attribute.
1853 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1855         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1856         mode_supports_vsx_dform_quad to mode_supports_dq_form.
1857         (mode_supports_vsx_dform_quad): Likewise.
1858         (mode_supports_vmx_dform): Move these functions to be next to the
1859         other mode_supports functions.
1860         (mode_supports_dq_form): Likewise.
1861         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1862         mode_supports_dq_form.
1863         (reg_offset_addressing_ok_p): Likewise.
1864         (offsettable_ok_by_alignment): Likewise.
1865         (rs6000_legitimate_offset_address_p): Likewise.
1866         (legitimate_lo_sum_address_p): Likewise.
1867         (rs6000_legitimize_address): Likewise.
1868         (rs6000_legitimize_reload_address): Likewise.
1869         (rs6000_secondary_reload_inner): Likewise.
1870         (rs6000_preferred_reload_class): Likewise.
1871         (rs6000_output_move_128bit): Likewise.
1873 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1875         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1876         Generate SImode target register for null target.
1877         <case IX86_BUILTIN_XGETBV>: Ditto.
1878         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1879         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1881 2018-05-10  Carl Love  <cel@us.ibm.com>
1883         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1884         dcbtt and dcbtstt if operands[2] is 0.
1886 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1888         PR target/85693
1889         * config/i386/sse.md (usadv64qi): New expander.
1891 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
1893         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1894         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1895         -maltivec=be support.
1896         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1897         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1898         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1899         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1900         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1901         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1902         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1903         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1904         altivec_vsumsws): Adjust.
1905         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1906         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1907         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1908         support.
1909         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1910         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1911         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1912         (altivec_lve<VI_char>x): Delete expand.
1913         (*altivec_lve<VI_char>x_internal): Rename to...
1914         (altivec_lve<VI_char>x): ... this.
1915         (altivec_lvxl_<mode>): Delete expand.
1916         (*altivec_lvxl_<mode>_internal): Rename to ...
1917         (altivec_lvxl_<mode>): ... this.
1918         (altivec_stvxl_<mode>): Delete expand.
1919         (*altivec_stvxl_<mode>_internal): Rename to ...
1920         (altivec_stvxl_<mode>): ... this.
1921         (altivec_stve<VI_char>x): Delete expand.
1922         (*altivec_stve<VI_char>x_internal): Rename to ...
1923         (altivec_stve<VI_char>x): ... this.
1924         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1925         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1926         reduc_plus_scal_<mode>): Adjust.
1927         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1928         comment.
1929         (rs6000_cpu_cpp_builtins): Adjust.
1930         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1931         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1932         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1933         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1934         -maltivec=be support.
1935         (rs6000_split_vec_extract_var): Adjust.
1936         (rs6000_split_v4si_init): Adjust.
1937         (swap_selector_for_mode): Delete.
1938         (altivec_expand_lvx_be, altivec_expand_stvx_be,
1939         altivec_expand_stvex_be): Delete.
1940         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1941         -maltivec=be support.
1942         (rs6000_gimple_fold_builtin): Ditto.
1943         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1944         Adjust.
1945         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1946         (TARGET_DIRECT_MOVE_64BIT): Adjust.
1947         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1948         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1949         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1950         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1951         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1952         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1953         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1954         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1955         anonymous split): Adjust.
1956         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1957         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1959 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
1961         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1962         when --with-gxx-include-dir is also specified.
1963         * configure: Regenerate.
1965 2018-05-09  Jim Wilson  <jimw@sifive.com>
1967         PR target/84797
1968         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1969         * config/riscv/t-withmultilib: New.
1970         * config/riscv/withmultilib.h: New.
1971         * doc/install.texi: Document RISC-V --with-multilib-list support.
1973 2018-05-09  Richard Biener  <rguenther@suse.de>
1975         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1976         vector.
1977         (vect_bb_vectorization_profitable_p): Adjust.  Compute
1978         actual scalar cost using the cost vector and the add_stmt_cost
1979         machinery.
1981 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1983         PR rtl-optimization/85645
1984         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1985         in the REG_CFA_REGISTER note for LR, don't leave it empty.
1987 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1989         PR rtl-optimization/85645
1990         * shrink-wrap.c (spread_components): Return a boolean saying if
1991         anything was changed.
1992         (try_shrink_wrapping_separate): Iterate spread_components until
1993         nothing changes anymore.
1995 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1997         PR rtl-optimization/85645
1998         * regrename.c (build_def_use): Also kill the chains that include the
1999         destination of a REG_CFA_REGISTER note.
2001 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2003         PR rtl-optimization/85645
2004         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2005         insn that has a REG_CFA_REGISTER note.
2007 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2009         * cfgexpand.c (expand_clobber): New function.
2010         (expand_gimple_stmt_1): Use it.
2011         * tree-vect-stmts.c (vect_clobber_variable): New function,
2012         split out from...
2013         (vectorizable_simd_clone_call): ...here.
2014         (vectorizable_store): Emit a clobber either side of an
2015         IFN_STORE_LANES sequence.
2016         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2018 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2020         PR target/85626
2021         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2022         (define_insn "trap_if_false"): Add exit after trap.
2024 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2026         PR rtl-optimization/85638
2027         * bb-reorder.c: Include common/common-target.h.
2028         (create_forwarder_block): New function extracted from...
2029         (fix_up_crossing_landing_pad): ...here.  Rename into...
2030         (dw2_fix_up_crossing_landing_pad): ...this.
2031         (sjlj_fix_up_crossing_landing_pad): New function.
2032         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2033         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2034         from both partitions and exit the loop after one iteration.
2036 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2038         Revert:
2039         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2040         subsection.
2041         (Basic PowerPC Built-in Functions): The new name of the
2042         subsection previously known as "PowerPC Built-in Functions".
2043         (Basic PowerPC Built-in Functions Available on all Configurations):
2044         New subsubsection.
2045         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2046         subsubsection.
2047         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2048         subsubsection.
2049         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2050         subsubsection.
2051         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2052         subsubsection.
2054 2018-05-08  Jim Wilson  <jimw@sifive.com>
2056         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2057         (LD_EMUL_SUFFIX): New.
2058         (LINK_SPEC): Use it.
2060 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2062         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2063         subsection.
2064         (Basic PowerPC Built-in Functions): The new name of the
2065         subsection previously known as "PowerPC Built-in Functions".
2066         (Basic PowerPC Built-in Functions Available on all Configurations):
2067         New subsubsection.
2068         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2069         subsubsection.
2070         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2071         subsubsection.
2072         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2073         subsubsection.
2074         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2075         subsubsection.
2077 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2079         PR target/85683
2080         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2081         after cmpelim optimization.
2083 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2085         * config.gcc: Support "goldmont".
2086         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2087         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2088         PROCESSOR_GOLDMONT.
2089         * config/i386/i386.c (m_GOLDMONT): Define.
2090         (processor_target_table): Add "goldmont".
2091         (PTA_GOLDMONT): Define.
2092         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2093         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2094         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2095         (fold_builtin_cpu): Add "goldmont".
2096         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2097         (ix86_option_override_internal): Add "goldmont".
2098         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2099         (processor_type): Add PROCESSOR_GOLDMONT.
2100         * config/i386/i386.md: Add CPU "glm".
2101         * config/i386/glm.md: New file.
2102         * config/i386/x86-tune.def: Add m_GOLDMONT.
2103         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2105 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2107         PR target/85572
2108         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2109         E_V4DImode.
2110         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2111         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2112         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2114         PR target/85317
2115         * config/i386/i386.c (ix86_fold_builtin): Handle
2116         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2118         PR target/85480
2119         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2120         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2122 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2124         PR target/85658
2125         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2126         (check_arch): Likewise.
2127         (check_fpu): Return the result rather than printing it.
2128         (end arch): Fix operator precedence.
2129         (end cpu): Likewise.
2130         (END): Print the result from check_fpu.
2132 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2133             Alan Hayward  <alan.hayward@arm.com>
2134             David Sherwood  <david.sherwood@arm.com>
2136         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2137         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2138         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2139         (*fcmuo<mode>_and): New patterns.
2141 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2143         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2144         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2145         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2146         (cmp_op, sve_imm_con): New code attributes.
2147         (SVE_COND_INT_CMP, imm_con): Delete.
2148         (cmp_op): Remove above unspecs from int attribute.
2149         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2150         to...
2151         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2152         comparison-specific unspecs.
2153         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2154         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2155         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2156         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2157         (*vec_fcm<cmp_op><mode>): Rename to...
2158         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2159         (*vec_fcmuo<mode>): Rename to...
2160         (*fcmuo<mode>): ...this and adjust likewise.
2161         (*pred_fcm<cmp_op><mode>): New pattern.
2162         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2163         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2164         functions.
2165         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2166         and UNORDERED.
2167         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2168         (aarch64_emit_sve_predicated_cond): New function.
2169         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2170         (aarch64_emit_unspec_cond_or): Replace with...
2171         (aarch64_emit_sve_or_conds): ...this new function.  Use
2172         aarch64_emit_sve_ptrue_op for the individual comparisons and
2173         aarch64_emit_binop to OR them together.
2174         (aarch64_emit_inverted_unspec_cond): Replace with...
2175         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2176         aarch64_emit_sve_ptrue_op for the comparison and
2177         aarch64_emit_unop to invert the result.
2178         (aarch64_expand_sve_vec_cmp_float): Update after the above
2179         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2181 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2183         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2184         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2185         (Backwards Compatibility): Likewise.
2187 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2189         PR bootstrap/85681
2190         Revert:
2191         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2193         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2194         <prefetch_dynamic_strides>: New const bool field.
2195         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2196         prefetch_dynamic_strides.
2197         (exynosm1_prefetch_tune): Likewise.
2198         (thunderxt88_prefetch_tune): Likewise.
2199         (thunderx_prefetch_tune): Likewise.
2200         (thunderx2t99_prefetch_tune): Likewise.
2201         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2202         (aarch64_override_options_internal): Update to set
2203         PARAM_PREFETCH_DYNAMIC_STRIDES.
2204         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2205         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2206         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2207         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2208         prefetch-dynamic-strides setting.
2210         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2212         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2213         <minimum_stride>: New const int field.
2214         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2215         minimum_stride field.
2216         (exynosm1_prefetch_tune): Likewise.
2217         (thunderxt88_prefetch_tune): Likewise.
2218         (thunderx_prefetch_tune): Likewise.
2219         (thunderx2t99_prefetch_tune): Likewise.
2220         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2221         (aarch64_override_options_internal): Update to set
2222         PARAM_PREFETCH_MINIMUM_STRIDE.
2223         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2224         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2225         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2226         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2227         stride is constant and is below the minimum stride threshold.
2229 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2231         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2232         to 512.
2234 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2236         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2237         <prefetch_dynamic_strides>: New const bool field.
2238         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2239         prefetch_dynamic_strides.
2240         (exynosm1_prefetch_tune): Likewise.
2241         (thunderxt88_prefetch_tune): Likewise.
2242         (thunderx_prefetch_tune): Likewise.
2243         (thunderx2t99_prefetch_tune): Likewise.
2244         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2245         (aarch64_override_options_internal): Update to set
2246         PARAM_PREFETCH_DYNAMIC_STRIDES.
2247         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2248         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2249         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2250         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2251         prefetch-dynamic-strides setting.
2253 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2255         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2256         <minimum_stride>: New const int field.
2257         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2258         minimum_stride field.
2259         (exynosm1_prefetch_tune): Likewise.
2260         (thunderxt88_prefetch_tune): Likewise.
2261         (thunderx_prefetch_tune): Likewise.
2262         (thunderx2t99_prefetch_tune): Likewise.
2263         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2264         (aarch64_override_options_internal): Update to set
2265         PARAM_PREFETCH_MINIMUM_STRIDE.
2266         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2267         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2268         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2269         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2270         stride is constant and is below the minimum stride threshold.
2272 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2274         PR c++/85659
2275         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2276         the type is addressable.  Don't force op into register if it has
2277         BLKmode.
2279 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2281         PR other/77609
2282         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2283         any section for which we don't know a specific type it should have,
2284         regardless of name.  Previously this was done only for the exact
2285         names ".init_array", ".fini_array", and ".preinit_array".
2286         (default_elf_asm_named_section): Add comment about
2287         relationship with default_section_type_flags and SECTION_NOTYPE.
2288         (get_section): Don't consider it a type conflict if one side has
2289         SECTION_NOTYPE and the other doesn't, as long as neither has the
2290         SECTION_BSS et al used in the default_section_type_flags logic.
2292 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2294         PR target/85653
2295         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2296         (workaround_barsyncs): New function.
2297         (nvptx_reorg): Use workaround_barsyncs.
2298         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2299         (define_expand "nvptx_membar_cta"): New define_expand.
2300         (define_insn "*nvptx_membar_cta"): New insn.
2302 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2304         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2305         To improve optimization opportunities.
2306         * builtin-types.def: The new needed builtin types for the above.
2308 2018-05-04  Richard Biener  <rguenther@suse.de>
2310         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2311         * gimple-ssa-store-merging.c
2312         (imm_store_chain_info::output_merged_store): Remove redundant create,
2313         release split_store vector contents on failure.
2314         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2315         scalar stmt vector on cache hit.
2317 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2319         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2320         Xilinx FP support.
2321         * config.gcc (powerpc-xilinx-eabi*): Remove.
2322         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2323         support.
2324         (fusion_addis_mem_combo_load): Ditto.
2325         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2326         FP support.
2327         (rs6000_cpu_cpp_builtins): Ditto.
2328         * config/rs6000/rs6000-linux.c
2329         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2330         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2331         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2332         support.
2333         (rs6000_setup_reg_addr_masks): Ditto.
2334         (rs6000_init_hard_regno_mode_ok): Ditto.
2335         (rs6000_option_override_internal): Ditto.
2336         (legitimate_lo_sum_address_p): Ditto.
2337         (rs6000_legitimize_address): Ditto.
2338         (rs6000_legitimize_reload_address): Ditto.
2339         (rs6000_legitimate_address_p): Ditto.
2340         (abi_v4_pass_in_fpr): Ditto.
2341         (setup_incoming_varargs): Ditto.
2342         (rs6000_gimplify_va_arg): Ditto.
2343         (rs6000_split_multireg_move): Ditto.
2344         (rs6000_savres_strategy): Ditto.
2345         (rs6000_emit_prologue_components): Ditto.
2346         (rs6000_emit_epilogue_components): Ditto.
2347         (rs6000_emit_prologue): Ditto.
2348         (rs6000_emit_epilogue): Ditto.
2349         (rs6000_elf_file_end): Ditto.
2350         (rs6000_function_value): Ditto.
2351         (rs6000_libcall_value): Ditto.
2352         * config/rs6000/rs6000.h: Ditto.
2353         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2354         (TARGET_MINMAX): ... this.  New.
2355         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2356         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2357         (*movsi_internal1_single): Delete.
2358         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2359         mfpu=, mxilinx-fpu): Delete.
2360         * config/rs6000/singlefp.h: Delete.
2361         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2362         * config/rs6000/t-rs6000: Ditto.
2363         * config/rs6000/t-xilinx: Delete.
2364         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2365         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2366         (VStype_simple): Delete.
2367         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2368         * config/rs6000/xfpu.h: Delete.
2369         * config/rs6000/xfpu.md: Delete.
2370         * config/rs6000/xilinx.h: Delete.
2371         * config/rs6000/xilinx.opt: Delete.
2372         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2373         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2375 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2377         PR libgomp/85639
2378         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2379         if ignore == 0.
2381 2018-05-04  Richard Biener  <rguenther@suse.de>
2383         PR middle-end/85627
2384         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2385         (expand_complex_div_wide): Likewise.
2386         (expand_complex_operations_1): Likewise.
2387         (expand_complex_libcall): Preserve EH info of the original stmt.
2388         (tree_lower_complex): Handle removed blocks.
2389         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2390         on complex multiplication and division libcall builtins.
2392 2018-05-04  Richard Biener  <rguenther@suse.de>
2394         PR middle-end/85574
2395         * fold-const.c (negate_expr_p): Restrict negation of operand
2396         zero of a division to when we know that can happen without
2397         overflow.
2398         (fold_negate_expr_1): Likewise.
2400 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2402         PR libstdc++/85466
2403         * real.h (real_nextafter): Declare.
2404         * real.c (real_nextafter): New function.
2405         * fold-const-call.c (fold_const_nextafter): New function.
2406         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2407         CASE_CFN_NEXTTOWARD.
2408         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2409         even when arg1_mode is different from arg0_mode.
2411 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2413         * doc/extend.texi (Deprecated Features): Remove
2414         -ffriend-injection.
2415         (Backwards Compatibility): Likewise.
2416         * doc/invoke.texi (C++ Language Options): Likewise.
2417         (C++ Dialect Options): Likewise.
2419 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2421         PR target/85530
2422         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2423         _mm512_mask_mullox_epi64): New intrinsics.
2425 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2427         PR testsuite/85106
2428         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2429         dump files): Add offload-tree.
2431 2018-05-03  Richard Biener  <rguenther@suse.de>
2433         PR tree-optimization/85615
2434         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2435         to loops not nested in BBs loop father to avoid creating multi-entry
2436         loops.
2438 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2440         PR tree-optimization/70291
2441         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2442         arguments.  Change return type to tree.  Emit libcall as a new
2443         statement rather than replacing existing one when inplace_p is true.
2444         (expand_complex_multiplication_components): New function.
2445         (expand_complex_multiplication): Expand floating-point complex
2446         multiplication using the above.
2447         (expand_complex_division): Rename inner_type parameter to type.
2448         Update expand_complex_libcall call-site.
2449         (expand_complex_operations_1): Update expand_complex_multiplication
2450         and expand_complex_division call-sites.
2452 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2454         PR target/85582
2455         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2456         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2457         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2458         the highest significant bit of the shift count mask is clear.  In
2459         check whether and[sq]i3 is needed verify that all significant bits
2460         of the shift count other than the highest are set.
2462 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2464         PR libgomp/82428
2465         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2466         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2467         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2468         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2469         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2470         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2471         __builtin_goacc_parlevel_size.
2473 2018-05-02  Richard Biener  <rguenther@suse.de>
2475         PR tree-optimization/85597
2476         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2477         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2478         directly.
2480 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2482         PR testsuite/85106
2483         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2484         dump files): Add ltrans-tree.
2486 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2488         PR testsuite/85106
2489         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2490         dump files): Add wpa-ipa.
2492 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2494         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2495         powerpc*-*-linux*paired* target.
2496         * config/rs6000/750cl.h: Delete.
2497         * config/rs6000/paired.h: Delete.
2498         * config/rs6000/paired.md: Delete.
2499         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2500         float support.
2501         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2502         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2503         comment.  Remove paired float support.
2504         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2505         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2506         VECTOR_PAIRED.
2507         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2508         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2509         declarations.
2510         * config/rs6000/rs6000.c: Remove paired float support.
2511         (paired_expand_vector_init, paired_expand_vector_move,
2512         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2513         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2514         paired_expand_builtin, paired_expand_predicate_builtin,
2515         paired_init_builtins): Delete.
2516         * config/rs6000/rs6000.h: Remove paired float support.
2517         * config/rs6000/rs6000.md: Remove paired float support.
2518         (move_from_CR_ov_bit): Delete.
2519         * config/rs6000/rs6000.opt (mpaired): Delete.
2520         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2521         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2523 2018-05-02  Richard Biener  <rguenther@suse.de>
2525         PR middle-end/85567
2526         * gimplify.c (gimplify_save_expr): When in SSA form allow
2527         SAVE_EXPRs to compute to SSA vars.
2529 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2531         PR target/85582
2532         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2533         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2534         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2535         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2537 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2539         PR tree-optimization/85586
2540         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2541         exit early for statements in the same group if the accesses are
2542         not strided.
2544 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2546         PR lto/85451
2547         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2548         error message.
2550 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2552         PR tree-optimization/85143
2553         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2555 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2557         PR lto/85451
2558         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2559         not found" error message.
2561 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2563         PR other/83786
2564         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2565         * vec.c (test_ordered_remove_if): New function.
2566         (vec_c_tests): Call test_ordered_remove_if.
2567         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2568         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2569         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2570         VEC_ORDERED_REMOVE_IF.
2572 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2574         PR tree-optimization/82665
2575         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2576         pointer subtraction where arguments come from a memchr call.
2578 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2580         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2581         --push-state --as-needed and --pop-state instead of --as-needed and
2582         --no-as-needed if ld supports it.
2583         * configure: Regenerated.
2585         PR web/85578
2586         * doc/install.texi2html: Replace _002d with - and _002a with * in
2587         generated html files using sed.
2589 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2591         PR c++/85523
2592         * gcc-rich-location.c (blank_line_before_p): New function.
2593         (use_new_line): New function.
2594         (gcc_rich_location::add_fixit_insert_formatted): New function.
2595         * gcc-rich-location.h
2596         (gcc_rich_location::add_fixit_insert_formatted): New function.
2598 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2600         * selftest.c (assert_streq): Rename "expected" and "actual" to
2601         "val1" and "val2".  Extend NULL-handling to cover both inputs
2602         symmetrically, while still requiring both to be non-NULL for a pass.
2603         * selftest.h (assert_streq): Rename "expected" and "actual" to
2604         "val1" and "val2".
2605         (ASSERT_EQ): Likewise.
2606         (ASSERT_EQ_AT): Likewise.
2607         (ASSERT_KNOWN_EQ): Likewise.
2608         (ASSERT_KNOWN_EQ_AT): Likewise.
2609         (ASSERT_NE): Likewise.
2610         (ASSERT_MAYBE_NE): Likewise.
2611         (ASSERT_MAYBE_NE_AT): Likewise.
2612         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2613         the assertion to pass.
2614         (ASSERT_STREQ_AT): Likewise.
2616 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2618         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2619         interaction with -pie.
2621 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2623         * selftest.h: Fix alphabetization of per-source-file selftest
2624         declarations.
2626 2018-04-30  Jason Merrill  <jason@redhat.com>
2628         PR c++/61982 - dead stores to destroyed objects.
2629         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2630         of clobber.
2632 2018-04-30  Jason Merrill  <jason@redhat.com>
2634         * tree.c (build_clobber): New.
2635         * tree.h: Declare it.
2636         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2638 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2640         * diagnostic-show-locus.c (layout::layout): Update for
2641         location_get_source_line returning a char_span.
2642         (struct char_span): Move to input.h.
2643         (struct correction): Update for fields in char_span becoming
2644         private.
2645         (struct source_line): Update for location_get_source_line
2646         returning a char_span.
2647         (layout::print_line): Likewise.
2648         * edit-context.c (edited_file::print_content): Likewise.
2649         (edited_file::print_diff_hunk): Likewise.
2650         (edited_file::print_run_of_changed_lines): Likewise.
2651         (edited_file::get_num_lines): Likewise.
2652         (edited_line::edited_line): Likewise.
2653         * final.c (asm_show_source): Likewise.
2654         * input.c (location_get_source_line): Convert return type
2655         from const char * to char_span, losing the final "line_len"
2656         param.
2657         (dump_location_info): Update for the above.
2658         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2659         when handling the literal within the line.
2660         (test_reading_source_line): Update for location_get_source_line
2661         returning a char_span.
2662         * input.h (class char_span): Move here from
2663         diagnostic-show-locus.c, converting from a struct to a class.
2664         Make data members private.
2665         (char_span::operator bool): New.
2666         (char_span::length): New.
2667         (char_span::get_buffer): New.
2668         (char_span::operator[]): New.
2669         (char_span::subspan): Make const.
2670         (char_span::xstrdup): New.
2671         (location_get_source_line): Convert return type from const char *
2672         to char_span, losing the final "line_size" param.
2674 2018-04-30  Jan Hubicka  <jh@suse.cz>
2676         * lto-wrapper.c (ltrans_priorities): New static var.
2677         (cmp_priority): New.
2678         (run_gcc): Read priorities and if doing parallel build order
2679         the Makefile by them.
2681 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2683         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2685 2018-04-30  Richard Biener  <rguenther@suse.de>
2687         * tree-cfg.c (verify_address): Remove base argument, add
2688         flag whether to check TREE_ADDRESSABLE and do that.
2689         (verify_expr): Remove.
2690         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2691         (verify_gimple_assign_single): Likewise.
2692         (verify_gimple_switch): Likewise.
2693         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2694         piece from verify_expr.
2695         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2697 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2699         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2701 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2703         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2704         (small_data_pattern): Likewise.
2705         (arc_rewrite_small_data): Likewise.
2706         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2707         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2708         (get_symbol_alignment): New function.
2709         (legitimate_small_data_address_p): Likewise.
2710         (legitimate_scaled_address): Update, call
2711         legitimate_small_data_address_p.
2712         (output_sdata): New static variable.
2713         (arc_print_operand): Update how we handle small data operands.
2714         (arc_print_operand_address): Likewise.
2715         (arc_legitimate_address_p): Update, use
2716         legitimate_small_data_address_p.
2717         (arc_rewrite_small_data_p): Remove.
2718         (arc_rewrite_small_data_1): Likewise.
2719         (arc_rewrite_small_data): Likewise.
2720         (small_data_pattern): Likewise.
2721         (compact_sda_memory_operand): Update to use
2722         legitimate_small_data_address_p and get_symbol_alignment.
2723         (prepare_move_operands): Don't rewite sdata pattern.
2724         (prepare_extend_operands): Remove.
2725         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2726         pattern.
2727         (zero_extendqisi2): Likewise.
2728         (zero_extendhisi2): Likewise.
2729         (extendqihi2): Likewise.
2730         (extendqisi2): Likewise.
2731         (extendhisi2): Likewise.
2732         (addsi3): Likewise.
2733         (subsi3): Likewise.
2734         (andsi3): Likewise.
2735         * config/arc/constraints.md (Usd): Change it to memory constraint.
2737 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2739         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2740         as source of std instructions.
2741         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2742         allow 6-bit constants as source for store instructions.
2743         (movdi_insn): Update instruction pattern to allow 6-bit constants
2744         as source for store instructions.
2746 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2748         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2750 2018-04-30  Nathan Sidwell  <nathan@acm.org>
2751             Sandra Loosemore <sandra@codesourcery.com>
2753         * dumpfile.c (dump_open): Allow '-' for stdout.
2754         * doc/invoke.texi (Developer Options): Document dump filename
2755         determination early.  Document stdin/stdout selection.
2757 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
2759         Microblaze Target: PIC data text relative
2761         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
2762         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
2763         Add declaration.
2764         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
2765         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
2766         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
2767         New addressing mode for data-text relative position indepenedent code.
2768         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
2769         'ADDRESS_SYMBOLIC_TXT_REL'.
2770         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
2771         (microblaze_legitimate_pic_operand): Exclude function calls from
2772         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
2773         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
2774         addresses cases.
2775         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2776         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2777         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
2778         for 'address + offset'.
2779         (microblaze_expand_prologue): Add new function prologue call for
2780         'r20' assignation.
2781         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
2782         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
2783         table in case of TARGET_PIC_DATA_TEXT_REL.
2784         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
2785         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
2786         Add new macros 'UNSPEC_TEXT',
2787         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
2788         + exclude function calls from 'UNSPEC_PLT' in case of data text
2789         relative mode.
2790         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2791         new target hook for generating address diff vector tables in case of
2792         flag_pic.
2793         * doc/tm.texi : Regenerate.
2794         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
2795         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
2796         of addr diff vector generation.
2797         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2798         target hook definition.
2799         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
2800         Add default function for generate_pic_addr_diff_vec -> flag_pic.
2801         * doc/invoke.texi (Add new pic option): Add new microblaze pic
2802         option for data text relative.
2804 2018-04-30  Richard Biener  <rguenther@suse.de>
2806         * tree-chrec.h (evolution_function_is_constant_p): Remove
2807         redundant check.
2808         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2810 2018-04-30  Richard Biener  <rguenther@suse.de>
2812         PR bootstrap/85571
2813         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2815 2018-04-30  Richard Biener  <rguenther@suse.de>
2817         PR tree-optimization/28364
2818         PR tree-optimization/85275
2819         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2820         copying first exit test.
2822 2018-04-28  Mark Wielaard  <mark@klomp.org>
2824         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2825         dwarf_version >= 5.
2826         (dwarf_AT): Handle DW_AT_addr_base.
2827         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2829 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
2831         PR target/84431
2832         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2833         (*ashl<dwi>3_doubleword_mask_1): Ditto.
2834         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2835         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2837 2018-04-28  Richard Biener  <rguenther@suse.de>
2839         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2840         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2841         to reflect use.  Only add interesting stmts.
2843 2018-04-27  Martin Jambor  <mjambor@suse.cz>
2845         PR ipa/85549
2846         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2847         the jump function allows for passing through aggregate values.
2849 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
2851         * input.h (in_system_header_at): Convert from macro to inline
2852         function.
2853         (from_macro_expansion_at): Likewise.
2854         (from_macro_definition_at): Likewise.
2856 2018-04-27  Jeff Law  <law@redhat.com>
2858         * config.gcc: Mark tile* targets as deprecated/obsolete.
2860 2018-04-27  Richard Biener  <rguenther@suse.de>
2862         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2863         fix for ILP32.
2865 2018-04-27  Richard Biener  <rguenther@suse.de>
2867         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2869 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
2871         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2872         with Yd constraint. Set "preferred_for_speed" attribute from
2873         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2874         with Yd constraint.
2875         (*movdi_internal): Ditto.
2876         (movti_interunit splitters): Remove
2877         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2878         (movdi_interunit splitters): Ditto.
2879         * config/i386/constraints.md (Ye): Remove.
2880         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2882 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2884         PR target/85512
2885         * config/aarch64/constraints.md (Usg): Limit to 31.
2886         (Usj): Limit to 63.
2888 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
2890         PR tree-optimization/85529
2891         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2892         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2893         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2894         zero extension or masking of the MSB bit.
2895         (optimize_range_tests): Add FIRST_BB argument, pass it through
2896         to optimize_range_tests_var_bound.
2897         (maybe_optimize_range_tests, reassociate_bb): Adjust
2898         optimize_range_tests callers.
2900 2018-04-26  Richard Biener  <rguenther@suse.de>
2901             Jakub Jelinek  <jakub@redhat.com>
2903         * cgraph.h (symbol_table): Just declare debug method here.
2904         * symtab.c (symbol_table::debug): Define.
2906 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
2908         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2910 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
2912         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2913         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2914         (*movdi_internal): Substitute Yi and Yj constraint with x
2915         and Ym and Yn constraint with y constraint.  Update "isa"
2916         attribute and set "preferred_for_speed" attribute from
2917         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2918         (*movsi_internal): Ditto.
2919         (*movdf_internal): Ditto.
2920         (*movsf_internal): Ditto.
2921         (*zero_extendsidi2): Ditto.
2922         * config/i386/sse.md (vec_set<mode>_0): Ditto.
2923         (sse2_loadld): Ditto.
2924         (*vec_extract<ssevecmodelower>_0): Ditto.
2925         (*vec_extractv4si_0_zext_sse4): Ditto.
2926         (vec_concatv2di): Ditto.
2927         (*vec_dup<mode>): Ditto.
2928         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2929         * config/i386/constraints.md (Yi): Remove.
2930         (Yj): Remove.
2931         (Ym): Remove.
2932         (Yn): Remove.
2934 2018-04-26  Nathan Sidwell  <nathan@acm.org>
2936         * dumpfile.c (dump_open): New.
2937         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2938         (dump_finish): Detect stdio/stderr by value not name.
2940 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
2942         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2944 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2946         PR target/84952
2947         * config/nvptx/nvptx.c (verify_neutering_jumps)
2948         (verify_neutering_labels): New function
2949         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2951 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2953         PR target/84025
2954         * config/nvptx/nvptx.c (needs_neutering_p): New function.
2955         (nvptx_single): Use needs_neutering_p to skip over insns that do not
2956         need neutering.
2958 2018-04-26  Richard Biener <rguenther@suse.de>
2959             Tom de Vries  <tom@codesourcery.com>
2961         PR lto/85422
2962         * lto-streamer-out.c (output_function): Fixup loops if required to match
2963         discovery done in the reader.
2965 2018-04-26  Richard Biener  <rguenther@suse.de>
2967         PR tree-optimization/85116
2968         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2969         have a loop exit from the single latch predecessor.  Remove
2970         case of header with just condition.
2971         (ch_base::copy_headers): Exclude infinite loops from any
2972         processing.
2973         (pass_ch::execute): Record exits.
2975 2018-04-26  Richard Biener  <rguenther@suse.de>
2977         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2978         prologue cost vector and pass it to vect_get_load_cost.
2979         (vect_get_peeling_costs_all_drs): Likewise.
2980         (vect_peeling_hash_get_lowest_cost): Likewise.
2981         (vect_enhance_data_refs_alignment): Likewise.
2983 2018-04-26  Richard Biener  <rguenther@suse.de>
2985         PR middle-end/85450
2986         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2987         checking of integer<->pointer conversions.
2988         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2989         sign-/zero-extending pointer types.
2990         (expand_omp_for_static_chunk): Likewise.
2992 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
2993             Jean Lee  <xiaoyur347@gmail.com>
2995         * config/mips/mips.c (mips_asan_shadow_offset): New function.
2996         (TARGET_ASAN_SHADOW_OFFSET): Define.
2997         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
2998         true for -fsanitize=address.
3000 2018-04-25  Mark Wielaard  <mark@klomp.org>
3002         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3003         shorter ones.
3005 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3007         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3008         than "alu", remove explicit "memory" and "imm_disp" attributes.
3009         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3011         PR middle-end/85414
3012         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3013         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3014         gen_lowpart_no_emit.
3016 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3018         PR target/85473
3019         * config/i386/i386.c (ix86_expand_builtin): Change memory
3020         operand to XI, extend p0 to Pmode.
3021         * config/i386/i386.md: Change unspec volatile and operand
3022         1 mode to XI, change operand 0 mode to P.
3024 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3026         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3027         GET_MODE_MASK before any checking.
3028         (nds32_can_use_bset_p): Likewise.
3029         (nds32_can_use_btgl_p): Likewise.
3031 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3033         * config/nds32/nds32-doubleword.md: New define_split pattern for
3034         illegal register number.
3036 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3038         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3040 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3042         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3044 2018-04-25  Richard Biener  <rguenther@suse.de>
3046         * lto-streamer.h (LTO_major_version): Bump to 8.
3048 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3050         * BASE-VER: Set to 9.0.0.
3052 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3054         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3055         in __abskf2 and __powikf2.
3057 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3059         PR target/85512
3060         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3061         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3062         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3063         Use the above on operand 2.  Reindent.
3064         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3066 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3068         PR target/85485
3069         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3070         handle OPT_mcet.
3071         * config/i386/i386.opt (mcet): Removed.
3072         * doc/install.texi: Remove -mcet documentation.
3073         * doc/invoke.texi: Likewise.
3075 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3077         PR target/85485
3078         * doc/install.texi: Remove -mcet from bootstrap-cet.
3080 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3082         PR target/85511
3083         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3084         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3085         if TARGET_64BIT.
3087         PR target/85503
3088         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3089         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3090         containing a CONST_VECTOR.
3092 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3094         * doc/install.texi: Update newlib dependency for nvptx.
3096 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3098         PR target/85508
3099         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3100         instead of INTVAL when shifting x left.
3102 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3104         PR tree-optimization/85478
3105         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3106         vect_grouped_store_supported for single element vectors.
3108 2018-04-24  Richard Biener  <rguenther@suse.de>
3110         PR target/85491
3111         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3112         load cost increase to the case of non-constant step.
3114 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3116         PR target/84828
3117         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3118         destination if any_malformed_asm.
3120 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3122         PR middle-end/85496
3123         * expr.c (store_field): In the bitfield case, if the value comes from
3124         a function call and is returned in registers by means of a PARALLEL,
3125         do not change the mode of the temporary unless BLKmode and VOIDmode.
3127 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3129         PR rtl-optimization/85423
3130         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3131         dependencies to debug insns when the previous insn is non-debug.
3133 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3135         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3136         enums into a single definition.
3137         (fls): Fix predicates and printing.
3138         (seti): Likewise.
3140 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3142         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3143         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3144         and short u6 immediate.
3145         (check_if_valid_sleep_operand): Remove.
3146         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3148 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3150         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3151         flag_always_save_lp condition.
3152         * config/nds32/nds32.opt (malways-save-lp): New option.
3154 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3156         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3157         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3158         * config/nds32/nds32.h
3159         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3160         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3162 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3164         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3165         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3167 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3168             Chung-Ju Wu  <jasonwucj@gmail.com>
3170         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3171         Declare.
3172         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3173         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3175 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3177         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3179 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3181         * config/nds32/nds32-protos.h (nds32_data_alignment,
3182         nds32_local_alignment): Declare.
3183         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3184         nds32_local_alignment): New functions.
3185         (TARGET_CONSTANT_ALIGNMENT): Define.
3186         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3188 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3190         * config/nds32/nds32.c
3191         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3192         (TARGET_MODES_TIEABLE_P): Likewise.
3194 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3196         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3197         level Ofast and Og.
3199 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3200             Chung-Ju Wu  <jasonwucj@gmail.com>
3202         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3203         for unaligned access.
3204         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3205         unaligned access.
3206         * config/nds32/nds32-intrinsic.md: Likewise.
3207         * config/nds32/nds32_intrinsic.h: Likewise.
3208         * config/nds32/nds32.h (nds32_builtins): Likewise.
3209         * config/nds32/nds32.opt (munaligned-access): New option.
3210         * config/nds32/nds32.c (nds32_asm_file_start): Display
3211         flag_unaligned_access status.
3213 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3215         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3216         -mno-relax is present.
3217         * config/riscv/linux.h (LINK_SPEC): Ditto.
3219 2018-04-20  Martin Sebor  <msebor@redhat.com>
3221         PR c/85365
3222         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3223         for null pointers.
3224         (gimple_fold_builtin_stxcpy_chk): Same.
3225         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3227 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3229         PR target/85456
3230         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3231         __powikf2 when long double is IEEE 128-bit.
3233 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3235         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3236         step to make sure stack always aligned.
3238 2018-04-20  Carl Love  <cel@us.ibm.com>
3240         PR target/83402
3241         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3242         size check for arg0.
3244 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3245             Tom de Vries  <tom@codesourcery.com>
3247         PR target/85445
3248         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3249         Emit insns for calls too.
3250         (nvptx_find_par): Always look for worker-level predecessor insn.
3251         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3252         calls.
3253         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3254         (nvptx_process_pars): Propagate frames for calls.
3256 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3258         PR target/85469
3259         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3260         Removed.
3261         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3262         (ix86_handle_option): Don't handle OPT_mibt.
3263         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3264         __SHSTK__.
3265         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3266         has_ibt and ibt.
3267         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3268         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3269         (ix86_target_macros): Define __CET__ with flag_cf_protection
3270         for -fcf-protection.
3271         * config/i386/i386.c (isa2_opts): Remove -mibt.
3272         * config/i386/i386.h (TARGET_IBT): Removed.
3273         (TARGET_IBT_P): Likewise.
3274         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3275         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3276         * config/i386/i386.opt (mcet): Update help message.
3277         (mshstk): Likewise.
3278         (mibt): Removed.
3279         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3280         -mcet as an alias for -mshstk.
3282 2018-04-20  Richard Biener <rguenther@suse.de>
3284         PR middle-end/85475
3285         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3286         complexity by forcing a single use of the multiply operand.
3288 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3290         ipa/85449
3291         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3292         recursion dependency to only apply to non-clones.
3294 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3296         ipa/85447
3297         * ipa-cp.c (create_specialized_node): Check that clones of
3298         self-recursive edges exist during IPA-CP.
3300 2018-04-19  Toon Moene  <toon@moene.org>
3302         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3303         by -O3. 
3305 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3307         PR tree-optimization/85467
3308         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3309         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3310         VECTOR_CST element to type.
3312 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3314         PR target/85397
3315         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3316         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3317         (builtin_longjmp): Likewise.
3318         (save_stack_nonlocal): New pattern.
3319         (restore_stack_nonlocal): Likewise.
3321 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3323         PR target/85404
3324         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3325         Replace ASM_OUTPUT_LABEL with fprintf.
3327 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3329         PR target/85417
3330         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3331         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3332         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3333         define __IBT__ and __SHSTK__ for -fcf-protection.
3334         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3335         TARGET_IBT.
3336         (ix86_trampoline_init): Likewise.
3337         (x86_output_mi_thunk): Likewise.
3338         (ix86_notrack_prefixed_insn_p): Likewise.
3339         (ix86_option_override_internal): Don't disallow -fcf-protection.
3340         * config/i386/i386.md (rdssp<mode>): Also enable for
3341         -fcf-protection.
3342         (incssp<mode>): Likewise.
3343         (nop_endbr): Likewise.
3344         * config/i386/i386.opt (mcet): Change help message to built-in
3345         functions only.
3346         (mibt): Likewise.
3347         (mshstk): Likewise.
3348         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3349         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3350         enable CET built-in functions.
3352 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3354         * common/config/i386/i386-common.c 
3355         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3356         OPTION_MASK_ISA_MOVDIRI_UNSET,
3357         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3358         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3359         * config.gcc (movdirintrin.h): New header.
3360         * config/i386/cpuid.h (bit_MOVDIRI,
3361         bit_MOVDIR64B): New bits.
3362         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3363         and -mmvodir64b.
3364         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3365         (VOID, PVOID, PCVOID)): New function types.
3366         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3367         __builtin_ia32_directstoreu_u64,
3368          __builtin_ia32_movdir64b): New builtins.
3369         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3370         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3371         and -mmovdiri.
3372         (ix86_valid_target_attribute_inner_p): Ditto.
3373         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3374         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3375         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3376         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3377         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3378         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3379         (movdiri<mode>, movdir64b_<mode>): New.
3380         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3381         * config/i386/immintrin.h: Include movdirintrin.h.
3382         * config/i386/movdirintrin.h: New file.
3383         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3385 2018-04-19  Richard Biener  <rguenther@suse.de>
3387         PR middle-end/85455
3388         * cfg.c (clear_bb_flags): When loop state says we have
3389         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3391 2018-04-19  Richard Biener  <rguenther@suse.de>
3393         PR tree-optimization/84737
3394         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3395         copying restrict info.
3396         (vect_setup_realignment): Use it.
3397         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3398         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3399         the first DR to all generated stores.
3400         (vectorizable_load): Likewise for loads.
3402 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3404         PR tree-optimization/85446
3405         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3406         the integral and pointer types to have the same precision.
3408         * doc/install.texi: Document --disable-cet being the default and
3409         --enable-cet=auto.
3411 2018-04-18  Martin Liska  <mliska@suse.cz>
3413         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3414         style.
3416 2018-04-18  Martin Liska  <mliska@suse.cz>
3418         Revert
3419         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3421         PR ipa/83983
3422         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3423         arguments if they are comparable.
3425 2018-04-18  Martin Liska  <mliska@suse.cz>
3427         Revert
3428         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3430         PR lto/84805
3431         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3432         incomplete types.
3434 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3436         PR target/85388
3437         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3438         ENDBR after calling __morestack.
3440 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3442         PR jit/85384
3443         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3444         by using gcc_base_ver to generate a gcc_driver_version, and use
3445         it when generating GCC_DRIVER_NAME.
3446         * configure: Regenerate.
3448 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3450         PR target/81084
3451         * config.gcc: Obsolete powerpc*-*-*spe*.
3453 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3455         PR debug/84637
3456         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3457         (stabstr_D): Change type of unum from unsigned int to
3458         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3459         type.
3461 2018-04-17  Jim Wilson  <jimw@sifive.com>
3463         PR 84856
3464         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3465         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3466         Set arg_pointer_offset after using pretend_args_size.
3468 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3470         PR rtl-optimization/85431
3471         * dse.c (record_store): Ignore zero width stores.
3473         PR sanitizer/85230
3474         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3475         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3476         __builtin_stack_restore rather than after it.
3477         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3478         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3479         argument instead of virtual_dynamic_stack_rtx.
3481 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3483         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3484         New prototype.
3485         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3486         Add note to error message to explain internal mapping of overloaded
3487         built-in function name to non-overloaded built-in function name.
3488         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3489         function.
3491 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3493         PR target/85424
3494         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3495         where the inputs overlap with the output.
3497 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3499         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3500         (=v, v) alternative and explicit "memory" attribute.
3501         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3502         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3503         attributes.
3504         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3505         "sselog1" type instead of "sselog".
3506         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3507         "sselog".  Remove explicit "memory" attribute.
3508         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3509         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3510         attributes.
3511         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3512         "sselog1" type instead of "sselog".  Remove explicit "memory"
3513         attribute.
3514         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3515         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3516         attribute.
3517         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3518         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3519         attributes.
3520         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3521         "sselog1" type instead of "sselog".  Remove explicit "memory"
3522         attribute.
3523         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3524         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3525         attribute.
3527         PR target/85430
3528         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3530         PR middle-end/85414
3531         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3532         on a SUBREG.
3534 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3536         PR ipa/85421
3537         * ipa-cp.c (create_specialized_node): Call
3538         expand_all_artificial_thunks if necessary.
3540 2018-04-17  Martin Liska  <mliska@suse.cz>
3542         PR lto/85405
3543         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3544         in message, remote space in between '_G' and '('.
3546 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3548         PR target/85281
3549         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3550         avx512f_vmcmp<mode>3<round_saeonly_name>,
3551         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3552         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3553         avx512f_rndscale<mode><round_saeonly_name>,
3554         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3555         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3556         Use %<iptr>2 instead of %2 for -masm=intel.
3557         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3558         avx512f_vcvttss2usi<round_saeonly_name>,
3559         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3560         -masm=intel.
3561         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3562         avx512f_vcvttsd2usi<round_saeonly_name>,
3563         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3564         Use %q1 instead of %1 for -masm=intel.
3565         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3566         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3567         of %3 for -masm=intel.
3568         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3569         -masm=intel.
3570         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3571         -masm=intel.
3572         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3573         -masm=intel.
3574         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3575         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3576         %g1.
3577         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3578         -masm=intel.
3579         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3580         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3581         %g1 and one with %0 and %1.
3582         (avx512er_vmrcp28<mode><round_saeonly_name>,
3583         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3584         %1 for -masm=intel.
3585         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3586         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3587         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3588         of %0 and %{%4%} for -masm=intel.
3589         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3590         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3591         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3592         order of %0 and %{%5%}%{z%} for -masm=intel.
3594 2018-04-17  Jan Hubicka  <jh@suse.cz>
3596         PR lto/85405
3597         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3599 2018-04-17  Martin Liska  <mliska@suse.cz>
3601         PR ipa/85329
3602         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3603         for target_clone error message.  Make default implementation
3604         clone to be a local declaration.
3605         (separate_attrs): Add new argument and check for an empty
3606         string.
3607         (expand_target_clones): Handle it.
3608         (ipa_target_clone): Make redirection just for target_clones
3609         functions.
3611 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3612             Tom de Vries  <tom@codesourcery.com>
3614         PR middle-end/84955
3615         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3616         tiled basic blocks without omp continue statements.
3618 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3620         PR target/83660
3621         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3622         vec_extract expression as having side effects to make sure it gets
3623         a cleanup point.
3625 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3627         PR target/85403
3628         * config/i386/i386.c (get_builtin_code_for_version): Check
3629         error_mark_node.
3631 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3633         PR target/84331
3634         * gcc/config.gcc: Support "skylake".
3635         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3636         PROCESSOR_SKYLAKE.
3637         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3638         (processor_target_table): Add "skylake".
3639         (ix86_option_override_internal): Add "skylake".
3640         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3641         PROCESSOR_CANNONLAKE.
3642         (get_builtin_code_for_version): Fix priority for
3643         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3644         PROCESSOR_SKYLAKE-AVX512.
3645         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3646         (processor_type): Add PROCESSOR_SKYLAKE.
3648 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3649             Jason Merrill  <jason@redhat.com>
3651         PR c++/85112
3652         * convert.c (convert_to_integer_1): Use direct recursion for
3653         enumeral types and types with a precision less than the number
3654         of bits in their mode.
3656 2018-04-16  Julia Koval  <julia.koval@intel.com>
3658         PR target/84413
3659         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3660         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3662 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3664         PR target/85293
3665         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3666         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3667         and -mno-direct-move.
3669 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3671         PR target/83402
3672         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3673         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3674         Ensure negative shifts result in {0}.
3676 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3678         PR rtl-optimization/79916
3679         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3680         regs (if any) to define how to gnerate SD moves when LRA is in
3681         progress.
3683 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3685         PR rtl-optimization/85393
3686         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3687         * except.c (expand_dw2_landing_pad_for_region): Make static.
3688         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3689         a label and unconditional jump to old_bb, rather than
3690         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3691         basic block.
3693         PR rtl-optimization/85376
3694         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3695         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3696         instead of a specific value.
3698 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3699             Bin Cheng  <bin.cheng@arm.com>
3701         PR tree-optimization/82965
3702         PR tree-optimization/83991
3703         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3704         by_profile_only parameter.
3705         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3706         information if the loop was predicted to iterate too many times.
3707         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3709 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3711         PR lto/71991
3712         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3713         always inline.
3715 2018-04-13  Martin Liska  <mliska@suse.cz>
3716             Jakub Jelinek  <jakub@redhat.com>
3718         PR middle-end/81657
3719         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3720         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3721         * builtins.c (expand_builtin_memory_copy_args): Use
3722         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3723         handle dest_addr == pc_rtx.
3725 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3727         PR target/85291
3728         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3729         asked to not generate direct moves.
3730         (fix_trunc<mode>si2_stfiwx): Similar.
3731         (fix_trunc<mode>si2_internal): Similar.
3733 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3735         PR debug/83157
3736         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3737         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3738         lookup if dest in some wider mode is known to be const0_rtx and
3739         if so, record permanent equivalence for it to be ZERO_EXTEND of
3740         the narrower mode destination.
3742 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3744         * lto-streamer-out.c (output_function): Revert 259346.
3745         * omp-expand.c (expand_oacc_for): Likewise.
3747 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
3749         PR rtl-optimization/85354
3750         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3751         * sel-sched.c (sel_global_init): ... here.
3753 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
3755         PR target/85238
3756         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3757         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3758         mode for PE-COFF targets.
3759         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
3760         (i386_pe_asm_lto_end): Likewise.
3761         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
3762         (TARGET_ASM_LTO_END): Likewise.
3763         * config/i386/winnt.c (saved_debug_info_level): New static variable.
3764         (i386_pe_asm_lto_start): New function.
3765         (i386_pe_asm_lto_end): Likewise.
3767 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3768             Richard Biener  <rguenther@suse.de>
3770         PR middle-end/84955
3771         * lto-streamer-out.c (output_function): Fix CFG loop state before
3772         streaming out.
3773         * omp-expand.c (expand_oacc_for): Handle calls to internal
3774         functions like regular functions.
3776 2018-04-12  Richard Biener  <rguenther@suse.de>
3778         PR lto/85371
3779         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
3780         for the early LTO debug to properly generate references to it
3781         during DIE emission.  Do not re-use that for the skeleton for
3782         split-dwarf.
3783         (dwarf2out_early_finish): Likewise.
3785 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3787         PR target/85328
3788         * config/i386/sse.md
3789         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
3790         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
3791         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
3792         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
3793         and output is a reg, avoid creating invalid lowpart subreg, but
3794         instead split into a 512-bit move.  Don't split if not AVX512VL,
3795         input is xmm16+ reg and output is a mem.
3796         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
3797         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
3798         xmm16+ reg and output is a mem.
3800 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3802         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
3803         also for flag_dwarf2_cfi_asm.
3805 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3807         PR rtl-optimization/85342
3808         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3809         a bool scalar var inside of the loop instead.  Don't try to update
3810         recog_data.operand after failed apply_change_group.
3812 2018-04-12  Tom de Vries  <tom@codesourcery.com>
3814         PR target/85296
3815         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3816         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
3817         array with flexible array member as array without given dimension.
3818         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3819         argument for undefined param to true.
3821 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
3823         PR target/85321
3824         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3825         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3826         from PowerPC section.
3827         * config/rs6000/sysv4.opt (mcall-): Improve help text.
3828         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3829         help text that is too long.
3830         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3831         help text that is too long.
3832         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3833         help text that is too long.
3835 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
3837         * config/alpha/alpha.md (stack_probe_internal): Rename
3838         from "probe_stack".  Update all callers.
3840 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3842         PR rtl-optimization/84566
3843         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3844         sched_macro_fuse_insns.
3846 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3848         PR target/84301
3849         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3850         (compute_block_dependences): ... from here.
3852 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3854         PR tree-optimization/85331
3855         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3856         from int to HOST_WIDE_INT.
3858 2018-04-11  Martin Jambor  <mjambor@suse.cz>
3860         PR ipa/84149
3861         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3862         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3863         not the same as the source val.
3864         (cgraph_edge_brings_value_p): New parameter.
3865         (gather_edges_for_value): Pass destination value to
3866         cgraph_edge_brings_value_p.
3867         (perhaps_add_new_callers): Likewise.
3868         (get_info_about_necessary_edges): Likewise and exclude values brought
3869         only by self-recursive edges.
3870         (create_specialized_node): Redirect only clones of self-calling edges.
3871         (+self_recursive_pass_through_p): New function.
3872         (find_more_scalar_values_for_callers_subset): Use it.
3873         (find_aggregate_values_for_callers_subset): Likewise.
3874         (known_aggs_to_agg_replacement_list): Removed.
3875         (decide_whether_version_node): Re-calculate known constants for all
3876         remaining context clones.
3878 2018-04-11  Richard Biener  <rguenther@suse.de>
3880         PR lto/85339
3881         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3882         from early DWARF output.
3883         (dwarf2out_early_finish): Output line info unconditionally into
3884         early DWARF and add reference to it.
3886 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3888         PR target/85281
3889         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3890         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3891         other than V2DFmode using iptr mode attribute.
3892         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3894 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3896         PR rtl-optimization/84659
3897         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3899 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3901         PR debug/85302
3902         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3903         SIZEP is NULL.
3904         (output_loc_list): Pass address of a dummy size variable even in the
3905         locview handling loop.
3906         (index_location_lists): Add comment on why skip_loc_list_entry can't
3907         call size_of_locs.
3909 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3911         PR target/85261
3912         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3913         into register.
3915 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
3917         PR target/85321
3918         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3919         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3920         and -mstring-compare-inline-limit.
3922 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3924         PR target/85287
3925         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3926         for stack clash protection in a register whenever we need it to be in
3927         a register.
3929 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3931         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3932         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3934 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3936         PR target/85321
3937         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3938         the help text.
3939         (mlong-double-): Ditto.
3940         * config/rs6000/sysv4.opt (msdata=): Ditto.
3941         (mtls-size=): Ditto.
3943 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3945         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3946         erroneous entries for
3947         "vector int vec_ldl (int, long int *)", and
3948         "vector unsigned int vec_ldl (int, unsigned long int *)".
3949         Add comments and entries for
3950         "vector bool char vec_ldl (int, bool char *)",
3951         "vector bool short vec_ldl (int, bool short *)",
3952         "vector bool int vec_ldl (int, bool int *)",
3953         "vector bool long long vec_ldl (int, bool long long *)",
3954         "vector pixel vec_ldl (int, pixel *)",
3955         "vector long long vec_ldl (int, long long *)",
3956         "vector unsigned long long vec_ldl (int, unsigned long long *)".
3957         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3958         type tree bool_long_long_type_node and correct definition of
3959         bool_V2DI_type_node to make reference to this new type tree.
3960         (rs6000_mangle_type): Replace erroneous reference to
3961         bool_long_type_node with bool_long_long_type_node.
3962         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3963         comments to emphasize sign distinctions for char and int types and
3964         replace RS6000_BTI_bool_long constant with
3965         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
3966         use of RS6000_BTI_pixel.
3967         (bool_long_type_node): Remove this macro definition.
3968         (bool_long_long_type_node): New macro definition
3970 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3972         PR rtl-optimization/85300
3973         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3974         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3975         simplify_unary_operation fails.
3977 2018-04-10  Martin Liska  <mliska@suse.cz>
3979         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3980         cgraph_edge and ipa_ref.
3982 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3984         PR target/85177
3985         PR target/85255
3986         * config/i386/sse.md
3987         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3988         computation of the VEC_MERGE selector from mask.
3989         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3990         Fix decoding of the VEC_MERGE selector into mask.
3992 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3994         PR tree-optimization/85286
3995         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
3997 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3999         * final.c (final_1): Set insn_last_address as well as
4000         insn_current_address.
4002 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4004         PR target/85173
4005         * explow.c (emit_stack_probe): Call validize_mem on memory location
4006         before passing it to gen_probe_stack.  Create address operand and
4007         legitimize it for the probe_stack_address case.
4009 2018-04-09  Jan Hubicka  <jh@suse.cz>
4011         PR lto/85078
4012         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4013         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4014         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4015         walk basetypes.
4016         (free_lang_data): Rebuild type inheritance graph.
4018 2018-04-09  Martin Sebor  <msebor@redhat.com>
4020         * invoke.texi (-finline-small-functions): Mention other optimization
4021         options.
4022         (-findirect-inlining, -fpartial-inlining): Same.
4023         (-finline-functions-called-once): Same.
4024         (-freorder-blocks-and-partition): Same.
4026 2018-04-09  Jan Hubicka  <jh@suse.cz>
4028         PR rtl/84058
4029         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4030         jumps; choose last target that matches the criteria (i.e.
4031         no partition changes for non-crossing jumps).
4032         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4033         support for redirecting crossing jumps to non-crossing.
4035 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4037         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4038         also for naked functions.
4040 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4042         * config/arc/arc.md (add_shift): New pattern.
4043         (add_shift2): Likewise.
4044         (sub_shift): Likewise.
4045         (sub_shift_cmp0_noout): Likewise.
4046         (compare_si_ashiftsi): Likewise.
4047         (xbfu_cmp0_noout): New combine pattern.
4048         (xbfu_cmp0"): Likewise.
4049         (movsi_set_cc_insn): Place the predicable variant first.
4050         (commutative_binary_cmp0_noout): Remove clobber.
4051         (commutative_binary_cmp0): New pattern.
4052         (noncommutative_binary_cmp0): Likewise.
4053         (noncommutative_binary_cmp0_noout): Likewise.
4054         (noncommutative_binary_comparison_result_used): Removed.
4055         (rsub_cmp0): New pattern.
4056         (rsub_cmp0_noout): Likewise.
4057         (extzvsi): Changed, keep only meaningful variants.
4058         (SQH, SEZ): New iterators.
4059         (SQH_postfix): New mode attribute.
4060         (SEZ_prefix): New code attribute.
4061         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4062         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4063         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4064         of numerical value.
4065         (noncommutative_operator): Check the availability of barrel
4066         shifter option.
4068 2018-04-09  Richard Biener  <rguenther@suse.de>
4070         PR tree-optimization/85284
4071         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4072         Only use the niter constraining form of simple_iv when the exit
4073         is always executed.
4075 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4077         PR target/84041
4078         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4079         (define_expand "*memory_barrier"): New define_expand.
4080         (define_insn "memory_barrier"): New insn.
4082 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4084         PR rtl-optimization/80463
4085         PR rtl-optimization/83972
4086         PR rtl-optimization/83480
4088         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4089         correct producer for the insn.
4090         (tidy_control_flow): Fixup seqnos in case of debug insns.
4092 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4094         PR rtl-optimization/83913
4096         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4097         different sched-times when merging exprs.
4099 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4101         PR rtl-optimization/83962
4103         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4104         tidy_fallthru_edge and tidy_control_flow.
4106 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4108         PR rtl-optimization/83530
4110         * sel-sched.c (force_next_insn): New global variable.
4111         (remove_insn_for_debug): When force_next_insn is true, also leave only
4112         next insn in the ready list.
4113         (sel_sched_region): When the region wasn't scheduled, make another pass
4114         over it with force_next_insn set to 1.
4116 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4118         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4119         into tm_file.
4120         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4121         for interrupt control.
4122         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4123         functions for interrupt control.
4124         * config/nds32/nds32-intrinsic.md: Likewise.
4125         * config/nds32/nds32_intrinsic.h: Likewise.
4126         * config/nds32/nds32.h (nds32_builtins): Likewise.
4128 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4130         * config/nds32/nds32.c (nds32_init_machine_status,
4131         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4132         strict_aligned_p field.
4133         (nds32_expand_to_rtl_hook): New function.
4134         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4135         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4137 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4138             Chung-Ju Wu  <jasonwucj@gmail.com>
4140         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4141         * config/nds32/nds32-n7.md: New file.
4142         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4143         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4144         pipeline.
4145         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4146         * config/nds32/nds32.md (pipeline_model): Add n7.
4147         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4148         * config/nds32/pipelines.md: Include n7 settings.
4150 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4151             Chung-Ju Wu  <jasonwucj@gmail.com>
4153         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4154         * config/nds32/nds32-e8.md: New file.
4155         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4156         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4157         pipeline.
4158         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4159         * config/nds32/nds32.md (pipeline_model): Add e8.
4160         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4161         * config/nds32/pipelines.md: Include e8 settings.
4163 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4164             Chung-Ju Wu  <jasonwucj@gmail.com>
4166         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4167         * config/nds32/nds32-n8.md: New file.
4168         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4169         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4170         pipeline.
4171         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4172         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4173         * config/nds32/nds32.md (pipeline_model): Add n8.
4174         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4175         * config/nds32/pipelines.md: Include n8 settings.
4177 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4178             Chung-Ju Wu  <jasonwucj@gmail.com>
4180         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4181         * config/nds32/nds32-n9-2r1w.md: New file.
4182         * config/nds32/nds32-n9-3r2w.md: New file.
4183         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4184         nds32_register_ports): New or modify for cpu n9.
4185         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4186         pipeline.
4187         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4188         * config/nds32/nds32-utils.c: New file.
4189         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4190         TARGET_MUL_SLOW): Define.
4191         * config/nds32/nds32.md (pipeline_model): New attribute.
4192         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4193         New options that support cpu n9.
4194         * config/nds32/pipelines.md: Include n9 settings.
4195         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4197 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4199         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4200         information if necessary.
4201         (output_cond_branch_compare_zero): Likewise.
4202         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4203         (nds32_target_alignment): Refine for alignment.
4204         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4205         (FUNCTION_BOUNDARY): Modify.
4206         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4207         align case.
4208         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4210 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4212         * config/nds32/constants.md (unspec_volatile_element): Add values for
4213         TLB operation and data prefetch.
4214         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4215         functions for TLB operation and data prefetch.
4216         * config/nds32/nds32-intrinsic.md: Likewise.
4217         * config/nds32/nds32_intrinsic.h: Likewise.
4218         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4219         (nds32_print_operand): Likewise.
4220         * config/nds32/nds32.h (nds32_builtins): Likewise.
4222 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4223         Andrew Pinski <pinsika@gcc.gnu.org>
4225         PR middle-end/82976
4226         * match.pd: Use constant_boolean_node of correct type instead of
4227         boolean_true_node or boolean_false_node for simplifying
4228         pointer comparisons to zero.
4230 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4232         PR tree-optimization/80021
4233         * tree.c (verify_type_variant): Make error call in verify_variant_match
4234         translatable and remove final full stop.
4236 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4238         * config/nds32/constants.md (unspec_volatile_element): Add
4239         UNSPEC_VOLATILE_EH_RETURN.
4240         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4241         nds32_output_stack_pop): Support dwarf exception handling process.
4242         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4243         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4244         exception handling process.
4245         (nds32_compute_stack_frame): Likewise.
4246         (nds32_return_addr_rtx): Likewise.
4247         (nds32_initial_elimination_offset): Likewise.
4248         (nds32_expand_prologue): Likewise.
4249         (nds32_expand_epilogue): Likewise.
4250         (nds32_dynamic_chain_address): New function.
4251         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4252         exception handling.
4253         (DYNAMIC_CHAIN_ADDRESS): Define.
4254         (EH_RETURN_DATA_REGNO): Define.
4255         (EH_RETURN_STACKADJ_RTX): Define.
4256         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4257         patterns for dwarf exception handling.
4259 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4261         * config/nds32/nds32.h: Clean up obsolete macros.
4263 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4265         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4266         Add enum values for particular instructions.
4267         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4268         particular intrinsic functions.
4269         * config/nds32/nds32-intrinsic.md: Likewise.
4270         * config/nds32/nds32_intrinsic.h: Likewise.
4271         * config/nds32/nds32.h (nds32_builtins): Likewise.
4272         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4273         (btst, ave): New patterns for particular instructions.
4275 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4277         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4278         Add enum values for atomic load/store and memory sync.
4279         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4280         and memory sync.
4281         * config/nds32/nds32-intrinsic.md: Likewise.
4282         * config/nds32/nds32_intrinsic.h: Likewise.
4283         * config/nds32/nds32.h (nds32_builtins): Likewise.
4285 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4287         PR tree-optimization/85257
4288         * fold-const.c (native_encode_vector): If not all elts could fit
4289         and off is -1, return 0 rather than offset.
4290         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4291         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4292         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4293         adjust buffer in native_interpret_expr call.
4295 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4297         * config/nds32/constants.md (unspec_volatile_element): Add cache
4298         control enum values.
4299         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4300         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4301         * config/nds32/nds32.c (nds32_cctl_names): New.
4302         (nds32_print_operand): Handle cache control register names.
4303         * config/nds32/nds32.h (nds32_builtins): New enum values.
4304         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4305         macros.
4306         * config/nds32/nds32.md (type): Add mmu.
4307         * config/nds32/pipelines.md (simple_insn): Add mmu.
4309 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4311         * config/nds32/nds32.md (type): Remove call.
4312         * config/nds32/pipelines.md (simple_insn): Likewise.
4314 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4316         * config/nds32/constants.md (unspec_volatile_element): Add
4317         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4318         UNSPEC_VOLATILE_FMFCFG.
4319         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4320         description for fmfcfg and fmfcsr.
4321         (bdesc_1arg): Add fmtcsr.
4322         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4323         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4324         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4325         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4326         unspec_fmfcfg): New patterns.
4327         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4328         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4329         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4330         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4331         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4332         __nds32__fmfcfg): Define.
4334 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4336         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4337         intrinsic register names.
4338         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4339         intrinsic register enum values and macros.
4341 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4343         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4344         for load/store addressing form.
4345         (nds32_print_operand_address): Likewise.
4347 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4349         PR target/85196
4350         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4351         based on LABEL_REF.  Remove useless assertion.
4352         (pic_address_needs_scratch): Fix formatting.
4353         (sparc_legitimize_pic_address): Minor tweaks.
4354         (sparc_delegitimize_address): Adjust assertion accordingly.
4355         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4356         into symbolic_operand.
4357         (movsi_high_pic_label_ref): Likewise.
4358         (movsi_lo_sum_pic_label_ref): Likewise.
4359         (movdi_pic_label_ref): Likewise.
4360         (movdi_high_pic_label_ref): Likewise.
4361         (movdi_lo_sum_pic_label_ref): Likewise.
4363 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4365         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4366         custom LIB_SPEC setup.
4368 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4369             Kito Cheng  <kito.cheng@gmail.com>
4371         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4372         * config/riscv/freebsd.h: New.
4374 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4376         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4377         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4378         file.
4380 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4381             Kito Cheng  <kito.cheng@gmail.com>
4383         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4384         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4385         * config/nds32/nds32-protos.h (nds32_output_call,
4386         nds32_output_return): Declare.
4387         * config/nds32/nds32.md: Refine all the call and return patterns.
4389 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4391         PR debug/85252
4392         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4393         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4395         PR rtl-optimization/84872
4396         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4397         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4398         EDGE_CROSSING edge.
4400 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4402         * expr.c (copy_blkmode_to_reg): Revert 254862.
4403         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4405 2018-04-06  Richard Biener  <rguenther@suse.de>
4407         PR middle-end/85244
4408         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4409         after seeing a component reference with an adjacent field.  Treat
4410         refs to arrays at struct end of external decls similar to
4411         refs to unconstrained commons.
4413 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4415         PR sanitizer/85213
4416         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4417         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4418         recursive calls.
4419         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4420         save_p here.
4422 2018-04-06  Richard Biener  <rguenther@suse.de>
4424         PR middle-end/85180
4425         * alias.c (find_base_term): New wrapper around find_base_term
4426         unwinding CSELIB_VAL_PTR changes.
4427         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4428         recursion.
4430 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4432         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4433         instructions.
4434         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4435         constant definitions.
4436         ("nop"): lr 0,0 -> nopr r0
4437         ("nop_lr0", "nop_lr1"): New insn definitions.
4439 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4441         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4442         NDS32_V3PUSH_AVAILABLE_P macro.
4444 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4445             Chung-Ju Wu  <jasonwucj@gmail.com>
4447         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4448         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4449         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4450         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4451         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4452         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4453         * config/nds32/constraints.md: New constraints and checking for hard
4454         float configuration.
4455         * config/nds32/iterators.md: New mode iterator and attribute for hard
4456         float configuration.
4457         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4458         patterns.
4459         * config/nds32/nds32-fpu.md: New file.
4460         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4461         deal with hard float code generation.
4462         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4463         ARCH_V3S.
4464         (abi_type, float_reg_number): New enum type.
4465         * config/nds32/nds32-predicates.c: New predicates for hard float.
4466         * config/nds32/nds32-protos.h: Declare functions for hard float.
4467         * config/nds32/nds32.c: Implementation for hard float configuration.
4468         * config/nds32/nds32.h: Definitions for hard float configuration.
4469         * config/nds32/nds32.md: Include hard float machine description and
4470         modify patterns for hard float configuration.
4471         * config/nds32/nds32.opt: New options for hard float configuration.
4472         * config/nds32/predicates.md: New predicates for hard float
4473         configuration.
4475 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4477         * common/config/nds32/nds32-common.c
4478         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4480 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4482         PR middle-end/85195
4483         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4484         CONSTRUCTOR_ELT (ctor, ...)->value.
4486 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4488         PR target/85193
4489         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4491 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4493         PR target/85204
4494         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4495         cond jump.
4497 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4498             Kito Cheng  <kito.cheng@gmail.com>
4500         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4501         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4502         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4503         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4505 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4506             Kito Cheng  <kito.cheng@gmail.com>
4508         * config/nds32/constraints.md (Ufe): New memory constraint.
4509         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4510         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4511         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4512         operands.
4513         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4514         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4516 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4518         * config/nds32/nds32.md: Use optimize_size in the condition for
4519         alu-shift instructions.
4521 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4523         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4525 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4527         * config/nds32/nds32.md (negsi2): Refine pattern.
4529 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4530             Chung-Ju Wu  <jasonwucj@gmail.com>
4532         * config/nds32/iterators.md (shift_rotate): New code iterator.
4533         (shift): New code attribute.
4534         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4535         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4536         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4537         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4538         bit-wise operations.
4539         (andsi3, *andsi3): Ditto.
4540         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4541         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4542         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4543         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4544         nds32_ior_operand, nds32_xor_operand): New predicates.
4546 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4548         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4549         (addsi3, subsi3): ... this.
4551 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4553         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4555 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4557         * config/nds32/nds32.md: Adjust indention.
4559 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4561         * config/nds32/nds32.md (feature): New attribute.
4563 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4565         * config/nds32/nds32.md (subtype): New attribute.
4567 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4569         PR target/85203
4570         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4571         expansion to perform a bitwise AND of the argument followed by a
4572         boolean negation of the result.
4574 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4576         PR rtl-optimization/84878
4577         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4578         the basic block.  Assert the use reference is not artificial and that
4579         it has an associated insn.
4581 2018-04-04  Michael Matz  <matz@suse.de>
4583         * builtins.c (compute_objsize): Pass correct operand
4584         to array_at_struct_end_p.
4586 2018-04-04  Richard Biener  <rguenther@suse.de>
4588         PR lto/85176
4589         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4590         from contexts for DINFO_LEVEL_TERSE and below.
4592 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4594         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4595         resiter_operand condition.
4596         * config/nds32/nds32.md (*move<mode>): Ditto.
4598 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4599             Monk Chiang  <sh.chiang04@gmail.com>
4601         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4603 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4605         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4607 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4608             Kito Cheng  <kito.cheng@gmail.com>
4610         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4611         nds32_cond_code_str, output_cond_branch,
4612         output_cond_branch_compare_zero, nds32_expand_cbranch,
4613         nds32_expand_cstore, nds32_expand_movcc,
4614         nds32_output_cbranchsi4_equality_zero,
4615         nds32_output_cbranchsi4_equality_reg,
4616         nds32_output_cbranchsi4_equality_reg_or_const_int,
4617         nds32_output_cbranchsi4_greater_less_zero: New functions.
4618         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4619         nds32_expand_cstore, nds32_expand_movcc,
4620         nds32_output_cbranchsi4_equality_zero,
4621         nds32_output_cbranchsi4_equality_reg,
4622         nds32_output_cbranchsi4_equality_reg_or_const_int,
4623         nds32_output_cbranchsi4_greater_less_zero): Declare.
4624         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4625         nds32_rimm11s_operand): New predicates.
4626         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4627         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4628         patterns.
4630 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4632         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4633         * config/nds32/nds32.md: Ditto.
4634         * config/nds32/pipelines.md: Ditto.
4636 2018-04-04  Richard Biener  <rguenther@suse.de>
4638         PR tree-optimization/85168
4639         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4640         propagating abnormals.
4642 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4644         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4646 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4647             Kito Cheng  <kito.cheng@gmail.com>
4649         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4650         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4651         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4652         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4653         * config/nds32/nds32.md (sibcall_internal): New.
4654         (sibcall_register): Remove.
4655         (sibcall_immediate): Remove.
4656         (sibcall_value_internal): New.
4657         (sibcall_value_register): Remove.
4658         (sibcall_value_immediate): Remove.
4659         * config/nds32/predicates.md (nds32_general_register_operand): New.
4660         (nds32_call_address_operand): New.
4662 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4664         PR rtl-optimization/85167
4665         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4666         bb_defs if *split_p, instead preinitialize it to NULL.
4668         PR tree-optimization/85156
4669         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4670         evaluating the argument multiple times.
4672 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4674         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4675         than vector.
4676         (_mm_cvtpd_ps): Likewise.
4677         (_mm_cvttpd_epi32): Likewise.
4678         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4679         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4680         vector, pixel, and bool following altivec.h include.
4682 2018-04-03  Martin Sebor  <msebor@redhat.com>
4684         * doc/extend.texi (Common Function Attributes): Clarify.
4685         (const attribute): Likewise.
4686         (pure attribute): Likewise.
4688 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4690         PR target/85169
4691         * config/i386/i386.c (ix86_expand_vector_set): Use
4692         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4694 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4696         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4697         instructions when changing rounding bits to preserve precision bits
4698         in the x87 control word.
4700 2018-04-03  Martin Liska  <mliska@suse.cz>
4702         PR tree-optimization/82491
4703         * rtl.h (strip_offset_and_add): Replace += suboffset with
4704         poly_uint64 () + suboffset.
4706 2018-03-29  Martin Liska  <mliska@suse.cz>
4707             Martin Jambor  <mjambor@suse.cz>
4709         PR ipa/84947
4710         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4711         param_type is not an integral or pointer type.
4713 2018-04-03  Richard Biener  <rguenther@suse.de>
4715         * sese.h (recompute_all_dominators): Remove.
4717 2018-04-02  Martin Sebor  <msebor@redhat.com>
4719         * doc/invoke.texi (-Wrestrict): Fix typos.
4721 2018-04-02  Jim Wilson  <jimw@sifive.com>
4723         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4724         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4725         (<optab>di3, <optab>si3_extend): Likewise.
4726         (<optab>si3_mask, <optab>si3_mask_1): New.
4727         (<optab>di3_mask, <optab>di3_mask_1): New.
4728         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4729         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4730         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4732 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4734         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4735         example.
4737 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4739         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4740         (nds32_canonicalize_comparison): New function.
4742 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4743             Kito Cheng  <kito.cheng@gmail.com>
4744             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4746         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4747         * config/nds32/constants.md (unspec_volatile_element): Add
4748         UNSPEC_VOLATILE_RELAX_GROUP.
4749         * config/nds32/nds32-relax-opt.c: New file.
4750         * config/nds32/nds32-predicates.c
4751         (nds32_symbol_load_store_p): New function.
4752         * config/nds32/nds32-protos.h
4753         (nds32_symbol_load_store_p): Declare function.
4754         (make_pass_nds32_relax_opt): Declare new rtl pass function.
4755         * config/nds32/nds32.c
4756         (nds32_register_pass): New function to register pass.
4757         (nds32_register_passes): New function to register passes.
4758         * config/nds32/nds32.md (relax_group): New pattern.
4759         * config/nds32/nds32.opt (mrelax-hint): New option.
4760         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
4762 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
4764         * config/nds32/t-nds32: Modify files dependency.
4766 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4768         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
4769         (PROFILE_HOOK): Define its implementation.
4771 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4773         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
4774         type and 32-bit size.
4776 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
4778         PR middle-end/85090
4779         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
4780         (V_128_256): New mode iterator.
4781         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
4782         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
4783         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
4784         of V.
4785         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
4786         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
4788 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
4790         PR target/83315
4791         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
4792         NaN inputs correctly.
4794 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
4796         PR target/80546
4797         * config/rs6000/vsx.md (??r): New mode attribute.
4798         (*vsx_mov<mode>_64bit): Use it.
4799         (*vsx_mov<mode>_32bit): Likewise.
4801 2018-03-30  Martin Sebor  <msebor@redhat.com>
4803         PR tree-optimization/84818
4804         * builtins.c (check_access): Use warning_n.
4806 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
4808         PR target/83822
4809         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4810         condition.
4811         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4812         condition.
4814 2018-03-30  Julia Koval  <julia.koval@intel.com>
4816         PR target/84413
4817         * x86-tune.def (movx, partial_reg_dependency): Enable for
4818         m_SKYLAKE_AVX512.
4820 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
4822         PR inline-asm/84985
4823         * lra-constraints.c (process_alt_operands): Move setting
4824         this_alternative_matches below.
4826 2018-03-29  Martin Liska  <mliska@suse.cz>
4828         PR lto/84995.
4829         * doc/invoke.texi: Document how LTO works with debug info.
4830         Describe auto-load support of binutils.  Mention 'x86-64'
4831         as valid option value of -march option.
4833 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
4835         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4837         PR c/85094
4838         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4839         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4840         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4841         checking.
4843 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4845         PR target/84912
4846         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4847         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4848         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4849         for RS6000_BTM_POWERPC64.
4850         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4851         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4852         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4853         definition.
4854         (DIVDE): Use it.
4855         (DIVDEU): Likewise.
4857 2018-03-28 Carl Love  <cel@us.ibm.com>
4859         Revert
4860         2017-09-27  Carl Love  <cel@us.ibm.com>
4862         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4863         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4864         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4865         fctiw instruction.
4867 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4869         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4870         instead of __vector bool.
4871         (_mm_max_pu8): Likewise.
4872         (_mm_min_pi16): Likewise.
4874 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4876         PR target/84912
4877         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4878         (DIVWEUO): Likewise.
4879         (DIVDEO): Likewise.
4880         (DIVDEUO): Likewise.
4881         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4882         DIVWEUO and DIVDEUO.
4883         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4884         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4885         (div_extend): Likewise.
4886         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4887         builtin function.
4888         (__builtin_divweuo): Likewise.
4889         (__builtin_divdeo): Likewise.
4890         (__builtin_divdeuo): Likewise.
4892 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4894         PR target/85095
4895         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4896         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4898         PR tree-optimization/82004
4899         * gimple-match-head.c (optimize_pow_to_exp): New function.
4900         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4901         Don't fold to exp if optimize_pow_to_exp is false.
4903 2018-03-28  Martin Liska  <mliska@suse.cz>
4905         PR other/84819
4906         * calls.c (initialize_argument_information): Fix trailing space.
4907         * common.opt: Fix typo and provide better explanation for
4908         -fsanitize-coverage option.
4909         * config/i386/i386.opt: Fix typo.
4911 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4912             Martin Liska  <mliska@suse.cz>
4914         PR sanitizer/85081
4915         * gimplify.c (asan_poison_variable): Don't do the check for
4916         gimplify_omp_ctxp here.
4917         (gimplify_decl_expr): Do it here.
4918         (gimplify_target_expr): Likewise.
4920 2018-03-28  Martin Liska  <mliska@suse.cz>
4922         PR target/84988
4923         * config/i386/i386.c (ix86_function_arg_advance): Do not call
4924         chkp_type_bounds_count if MPX is not enabled.
4926 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4928         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4930 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4932         PR target/84914
4933         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4934         function to create the function decl for complex long double
4935         multiply and divide for -mabi=ieeelongdouble.
4936         (init_float128_ieee): Call it.
4938 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
4940         PR target/85044
4941         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4942         -fcf-protection=branch -mibt.
4943         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4945 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4947         PR target/81863
4948         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4950 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
4952         PR target/85056
4953         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4954         extern array declarations.
4956 2018-03-27  Richard Biener  <rguenther@suse.de>
4958         PR middle-end/84067
4959         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4960         explicit single_use checks.
4962 2018-03-27  Richard Biener  <rguenther@suse.de>
4964         PR tree-optimization/85082
4965         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4966         Valueize the VUSE.
4968 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4970         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4971         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4972         Turn on fasynchronous-unwind-tables and funwind-tables.
4974 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
4976         PR target/85073
4977         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4978         (*bmi_blsr_<mode>_ccz): Ditto.
4980 2018-03-26  Tom de Vries  <tom@codesourcery.com>
4982         PR tree-optimization/85063
4983         * omp-general.c (offloading_function_p): New function.  Factor out
4984         of ...
4985         * omp-offload.c (pass_omp_target_link::gate): ... here.
4986         * omp-general.h (offloading_function_p): Declare.
4987         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4988         with attribute omp declare target for offloading functions.
4990 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
4992         PR tree-optimization/84005
4993         * tree-data-ref.h (get_base_for_alignment): Declare.
4994         * tree-data-ref.c (get_base_for_alignment_1): New function.
4995         (get_base_for_alignment): Likewise.
4996         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
4997         get_base_for_alignment to find a suitable base object, instead
4998         of always using drb->base_address.
5000 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5002         PR inline-asm/85022
5003         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5004         known size by default.
5006 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5008         PR inline-asm/85030
5009         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5010         and non BLKmode operands.
5012 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5014         PR target/85026
5015         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5016         Clean up attributes.
5018 2018-03-23  Richard Biener  <rguenther@suse.de>
5020         PR debug/85020
5021         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5022         we are going to emit early debug for LTO.
5024 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5026         PR inline-asm/85034
5027         * function.c (match_asm_constraints_1): Don't optimize if input
5028         doesn't satisfy general_operand predicate for output's mode.
5030         PR inline-asm/85022
5031         * alias.c (write_dependence_p): Don't require for x_canonicalized
5032         non-VOIDmode if x has VOIDmode.
5034         PR sanitizer/85029
5035         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5036         just don't try to optimize it rather than assert it never happens.
5038 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5040         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5041         macro expansions for definition of ST_INTERNAL_<mode> and
5042         LD_INTERNAL_<mode> builtins.
5043         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5044         Remove prototype.
5045         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5046         function.
5047         (altivec_expand_st_builtin): Likewise.
5048         (altivec_expand_builtin): Remove calls to deleted functions.
5049         (rs6000_address_for_altivec): Delete this function.
5050         * config/rs6000/vector.md: Remove expands for
5051         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5053 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5055         PR target/84826
5056         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5057         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5058         re-computing once computed.
5059         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5060         (arm_init_machine_status): Initialize
5061         machine->static_chain_stack_bytes.
5063 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5065         PR target/84760
5066         * doc/extend.texi: Add four new prototypes for vec_ld.
5067         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5068         definitions for more logical presentation.
5069         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5070         entries for V1TI variants of __builtin_altivec_ld builtin.
5071         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5072         handling of V1TI variant of LVX icode pattern.
5073         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5074         (rs6000_gimple_fold_builtin): Likewise.
5075         (altivec_init_builtins): Add code to define
5076         __builtin_altivec_lvx_v1ti function.
5078 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5080         PR inline-asm/84941
5081         * function.c (match_asm_constraints_1): Don't do the optimization
5082         if input isn't a REG, SUBREG, MEM or constant.
5084 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5086         PR tree-optimization/84956
5087         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5088         bb_has_abnormal_pred.
5090 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5092         PR sanitizer/85018
5093         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5094         DECL_INITIAL (decl) to decl at the end.
5095         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5096         adjust the comment.
5098 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5100         * doc/extend.texi (__builtin_tgmath): Document when complex
5101         integer types are treated as _Complex _Float64.
5103 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5105         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5107 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5109         PR tree-optimization/84960
5110         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5111         if it is ENTRY block, move them into single succ of ENTRY in that case.
5113 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5115         PR tree-optimization/84811
5116         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5117         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5118         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5119         (known_subrange_p): Update accordingly.  Cast each value involved
5120         in the size comparison, rather than casting the result of the
5121         subtraction.
5123 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5125         PR tree-optimization/84982
5126         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5127         by flipping the least significant bit rather than all bits from
5128         bitpos to bitpos + bitsize - 1.
5130 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5132         * doc/extend.texi (Deprecated Features): Remove mention of
5133         long-deleted deprecations.
5135 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5137         PR jit/84288
5138         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5139         * configure: Regenerate.
5141 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5143         PR tree-optimization/83126
5144         * tree-parloops.c (num_phis): New function.
5145         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5147 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5149         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5150         mention anon-struct/union members and trailing attributes.
5152 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5154         PR tree-optimization/84969
5155         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5156         builtin memset partitions if they set different rhs values.
5158 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5160         PR rtl-optimization/84989
5161         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5162         VEC_DUPLICATE with scalar result mode.
5164 2018-03-21  Martin Liska  <mliska@suse.cz>
5166         PR ipa/84963
5167         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5168         not intended return statement.
5170 2018-03-21  Martin Liska  <mliska@suse.cz>
5172         PR target/84988
5173         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5174         (chkp_find_bound_slots_1): Limit number of iterations.
5176 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5178         PR target/84838
5179         * Minor grammar fixes for x86 options.
5181 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5183         PR debug/84875
5184         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5185         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5187 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5189         PR target/83789
5190         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5191         (altivec_lvx_<mode>_1op): Likewise.
5192         (altivec_stvx_<mode>_2op): Likewise.
5193         (altivec_stvx_<mode>_1op): Likewise.
5194         (altivec_lvx_<VM2:mode>): New define_expand.
5195         (altivec_stvx_<VM2:mode>): Likewise.
5196         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5197         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5198         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5199         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5200         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5201         (rs6000_gen_lvx): Likewise.
5202         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5203         (altivec_expand_stv_builtin): Likewise.
5204         (altivec_expand_builtin): Likewise.
5205         * config/rs6000/vector.md: Likewise.
5207 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5209         PR target/82518
5210         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5211         BYTES_BIG_ENDIAN.
5213 2018-03-20  Richard Biener  <rguenther@suse.de>
5215         PR target/84986
5216         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5217         sign-conversions as zero, fall back to standard scalar_stmt
5218         cost for the rest.
5220 2018-03-20  Martin Liska  <mliska@suse.cz>
5222         PR ipa/84825
5223         * predict.c (rebuild_frequencies): Handle case when we have
5224         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5226 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5228         PR target/84990
5229         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5230         flag_section_anchors.
5231         * varasm.c (use_blocks_for_decl_p): Remove hack for
5232         dw2_force_const_mem.
5234         PR target/84845
5235         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5236         to ...
5237         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5238         be created, use lowpart_subreg of operands[0] rather than operands[0]
5239         itself.
5240         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5241         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5242         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5243         and n constraint instead of aarch64_shift_imm_di and Usd.
5244         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5245         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5247 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5249         PR target/82989
5250         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5251         to favor GPR over NEON registers.
5252         (<shift>di3_neon): Likewise.
5254 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5256         PR target/84952
5257         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5258         (nvptx_process_pars): Emit bar.sync asap and alap.
5260 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5262         PR target/84954
5263         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5264         seen_label if seen_label is already set.
5266 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5268         PR target/84945
5269         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5270         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5271         Use 1U instead of 1.  Formatting fixes.
5273         PR c/84953
5274         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5275         instead of TREE_TYPE (s1) for the return value.
5277 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5279         PR tree-optimization/84946
5280         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5281         bitsize + bitsize in poly_uint64 rather than poly_int64.
5283         PR sanitizer/78651
5284         * dwarf2asm.c: Include fold-const.c.
5285         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5286         of decl rather than decl itself.
5288         PR rtl-optimization/84643
5289         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5291 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5293         PR sanitizer/78651
5294         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5295         calling assemble_variable.
5297 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5299         PR target/81647
5300         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5301         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5303 2018-03-19  Jim Wilson  <jimw@sifive.com>
5305         PR bootstrap/84856
5306         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5307         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5308         (riscv_first_stack_step): Likewise.
5309         (riscv_option_override): Use STACK_BOUNDARY instead of
5310         MIN_STACK_BOUNDARY.
5311         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5312         MIN_STACK_BOUNDARY.
5313         (BIGGEST_ALIGNMENT): Set to 128.
5314         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5315         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5316         STACK_BOUNDARY.
5318 2018-03-19  Richard Biener  <rguenther@suse.de>
5320         PR tree-optimization/84933
5321         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5322         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5324 2018-03-19  Richard Biener  <rguenther@suse.de>
5326         PR tree-optimization/84859
5327         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5328         (cond_if_else_store_replacement): Perform sinking operation on
5329         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5330         Generalize what a BB with a single eligible store is.
5332 2018-03-19  Richard Biener  <rguenther@suse.de>
5334         PR tree-optimization/84929
5335         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5336         chrec_is_positive against non-chrec arg.
5338 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5340         PR target/84711
5341         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5343 2018-03-18  Martin Liska  <mliska@suse.cz>
5345         PR rtl-optimization/84635
5346         * regrename.c (build_def_use): Use matches_mode only when
5347         matches >= 0.
5349 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5351         PR tree-optimization/84913
5352         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5353         vectorize chains of COND_EXPRs.
5355 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5357         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5359 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5361         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5363 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5365         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5367 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5368             Kito Cheng  <kito.cheng@gmail.com>
5370         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5371         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5372         (nds32_adjust_reg_alloc_order): New function.
5373         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5375 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5377         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5378         nds32_print_operand, nds32_print_operand_address): Use
5379         HOST_WIDE_INT_PRINT_DEC instead.
5381 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5383         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5385 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5387         PR target/84902
5388         * config/i386/i386.c (initial_ix86_tune_features,
5389         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5390         unsigned long long.
5391         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5392         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5393         rather than 1u << ix86_tune.  Formatting fix.
5394         (ix86_option_override_internal): Change ix86_arch_mask from
5395         unsigned int to unsigned HOST_WIDE_INT, initialize to
5396         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5397         (ix86_function_specific_restore): Likewise.
5399 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5401         PR target/84899
5402         * postreload.c (reload_combine_recognize_pattern): Perform
5403         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5404         truncate_int_for_mode the result for the destination's mode.
5406         PR c/84909
5407         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5408         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5409         Likewise.
5410         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5411         Likewise.
5413 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5415         PR target/84876
5416         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5417         regno_allocno_class_array and sorted_pseudos.
5418         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5419         insns where regno is used.
5421 2018-03-16  Martin Liska  <mliska@suse.cz>
5423         PR ipa/84833
5424         * multiple_target.c (create_dispatcher_calls): Redirect
5425         reference in the symbol table.
5427 2018-03-16  Martin Liska  <mliska@suse.cz>
5429         PR ipa/84722
5430         * multiple_target.c (create_dispatcher_calls): Redirect also
5431         an alias.
5433 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5435         PR c++/79937
5436         PR c++/82410
5437         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5438         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5439         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5441 2018-03-16  Julia Koval  <julia.koval@intel.com>
5443         * doc/invoke.texi (Skylake Server): Add CLWB.
5444         Cannonlake): Remove CLWB.
5446 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5448         PR tree-optimization/84841
5449         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5450         1 << 3.
5451         (FLOAT_ONE_CONST_TYPE): Define.
5452         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5453         (sort_by_operand_rank): Put entries with higher constant_type last
5454         rather than first to match comments.
5456 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5458         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5459         split predicate.
5461 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5463         PR c++/79085
5464         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5465         check and use address of target always.
5467 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5469         PR target/84574
5470         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5471         (indirect_thunk_bnd_needed): Likewise.
5472         (indirect_thunks_used): Likewise.
5473         (indirect_thunks_bnd_used): Likewise.
5474         (indirect_return_needed): New.
5475         (indirect_return_bnd_needed): Likewise.
5476         (output_indirect_thunk_function): Add a bool argument for
5477         function return.
5478         (output_indirect_thunk_function): Don't generate alias for
5479         function return thunk.
5480         (ix86_code_end): Call output_indirect_thunk_function to generate
5481         function return thunks.
5482         (ix86_output_function_return): Set indirect_return_bnd_needed
5483         and indirect_return_needed instead of indirect_thunk_bnd_needed
5484         and indirect_thunk_needed.
5486 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5488         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5489         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5490         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5492 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5493             Paul Hua <paul.hua.gm@gmail.com>
5495         PR c/84852
5496         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5498 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5500         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5501         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5502         resp. SFmode cases.
5504 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5506         PR target/84711
5507         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5508         instead of GET_MODE_SIZE when comparing Units.
5510 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5512         PR target/68256
5513         * varasm.c (hash_section): Return an unchangeble hash value
5514         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5515         Return !aarch64_can_use_per_function_literal_pools_p ().
5517 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5519         PR target/84860
5520         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5521         rather than address of cmode as last argument to prepare_cmp_insn.
5523 2018-03-15  Julia Koval  <julia.koval@intel.com>
5525         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5526         F_AVX512VNNI, F_AVX512BITALG): New.
5528 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5530         PR target/83451
5531         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5532         insn for floating-point loads and stores.
5534 2018-03-14  Carl Love  <cel@us.ibm.com>
5536         * config/rs6000/rs6000-c.c: Add macro definitions for
5537         ALTIVEC_BUILTIN_VEC_PERMXOR.
5538         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5539         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5540         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5541         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5542         UNSPEC_VPERMXOR.
5543         * config/doc/extend.texi: Add prototypes for vec_permxor.
5545 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5547         PR c/84852
5548         * diagnostic-show-locus.c (class layout_point): Convert m_line
5549         from int to linenum_type.
5550         (line_span::comparator): Use linenum "compare" function when
5551         comparing line numbers.
5552         (test_line_span): New function.
5553         (layout_range::contains_point): Convert param "row" from int to
5554         linenum_type.
5555         (layout_range::intersects_line_p): Likewise.
5556         (layout::will_show_line_p): Likewise.
5557         (layout::print_source_line): Likewise.
5558         (layout::should_print_annotation_line_p): Likewise.
5559         (layout::print_annotation_line): Likewise.
5560         (layout::print_leading_fixits): Likewise.
5561         (layout::annotation_line_showed_range_p): Likewise.
5562         (struct line_corrections): Likewise for field m_row.
5563         (line_corrections::line_corrections): Likewise for param "row".
5564         (layout::print_trailing_fixits): Likewise.
5565         (layout::get_state_at_point): Likewise.
5566         (layout::get_x_bound_for_row): Likewise.
5567         (layout::print_line): Likewise.
5568         (diagnostic_show_locus): Likewise for locals "last_line" and
5569         "row".
5570         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5571         * input.c (selftest::test_linenum_comparisons): New function.
5572         (selftest::input_c_tests): Call it.
5573         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5574         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5575         * selftest.h (ASSERT_GT): New macro.
5576         (ASSERT_GT_AT): New macro.
5577         (ASSERT_LT): New macro.
5578         (ASSERT_LT_AT): New macro.
5580 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5582         PR rtl-optimization/84780
5583         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5585 2018-03-14  Martin Liska  <mliska@suse.cz>
5587         * tree.c (record_node_allocation_statistics): Use
5588         get_stats_node_kind.
5589         (get_stats_node_kind): New function extracted from
5590         record_node_allocation_statistics.
5591         (free_node): Use get_stats_node_kind.
5593 2018-03-14  Richard Biener  <rguenther@suse.de>
5595         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5596         that the value-set of ANTIC_IN doesn't grow.
5598         Revert
5599         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5600         member.
5601         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5602         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5604 2018-03-14  Julia Koval  <julia.koval@intel.com>
5606         * config.gcc (icelake-client, icelake-server): New.
5607         (icelake): Remove.
5608         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5609         (initial_ix86_arch_features): Ditto.
5610         (PTA_SKYLAKE): Add SGX.
5611         (PTA_ICELAKE): Remove.
5612         (PTA_ICELAKE_CLIENT): New.
5613         (PTA_ICELAKE_SERVER): New.
5614         (ix86_option_override_internal): Split up icelake on icelake client and
5615         icelake server.
5616         (get_builtin_code_for_version): Ditto.
5617         (fold_builtin_cpu): Ditto.
5618         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5619         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5620         * config/i386/i386.h (processor_type): Ditto.
5621         * doc/invoke.texi: Ditto.
5623 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5625         PR sanitizer/83392
5626         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5627         INTEGER_CST offset, add it together with bitpos / 8 and
5628         sign extend based on POINTER_SIZE.
5630         PR target/84844
5631         Revert
5632         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5634         PR target/78090
5635         * config/i386/constraints.md (Yc): New register constraint.
5636         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5637         Use Yc constraint for alternative 2 of operand 0.  Remove
5638         preferred_for_speed attribute.
5640 2018-03-14  Richard Biener  <rguenther@suse.de>
5642         PR tree-optimization/84830
5643         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5644         with the old one to avoid oscillations.
5646 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5648         PR target/83712
5649         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5650         pseudos.
5651         (assign_by_spills): Return a flag of reload assignment failure.
5652         Do not process the reload assignment failures.  Do not spill other
5653         reload pseudos if they has the same reg class.  Update n if
5654         necessary.
5655         (lra_assign): Add a return arg.  Set up from the result of
5656         assign_by_spills call.
5657         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5658         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5659         usage_insns if it is not NULL.
5660         (spill_hard_reg_in_range): New function.
5661         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5662         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5663         function prototypes.
5664         (lra_assign): Change prototype.
5665         * lra.c (lra): Add code to deal with fails by splitting hard reg
5666         live ranges.
5668 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5670         * config/riscv/riscv.opt (mrelax): New option.
5671         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5672         "norelax" when riscv_mrelax is disabled.
5673         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5675 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5677         PR target/84743
5678         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5679         reassociation for int modes.
5681 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5683         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5684         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5685         for big-endian.
5686         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5687         * config/aarch64/aarch64-sve.md
5688         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5689         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5690         (*extend<mode><Vwide>2): Rename to...
5691         (aarch64_sve_extend<mode><Vwide>2): ...this.
5692         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5693         renaming the old pattern to...
5694         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5695         unsigned packs.
5696         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5697         define_expand, renaming the old pattern to...
5698         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5699         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5700         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5701         account when deciding which SVE instruction the optab should use.
5702         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5704 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5706         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5707         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5708         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5709         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5710         (tlsdesc_small_<mode>): Turn a define_expand and use
5711         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5712         (tlsdesc_small_advsimd_<mode>): ...this.
5713         (tlsdesc_small_sve_<mode>): New pattern.
5715 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5717         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5718         (UNSPEC_UMUL_HIGHPART): New constants.
5719         (MUL_HIGHPART): New int iteraor.
5720         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5721         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5722         define_expand.
5723         (*<su>mul<mode>3_highpart): New define_insn.
5725 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5727         PR lto/84805
5728         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5729         incomplete types.
5731 2018-03-13  Martin Liska  <mliska@suse.cz>
5733         PR ipa/84658.
5734         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5735         vector.
5736         (sem_item_optimizer::~sem_item_optimizer): Release it.
5737         (sem_item_optimizer::merge_classes): Register variable aliases.
5738         (sem_item_optimizer::fixup_pt_set): New function.
5739         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5740         * ipa-icf.h: Declare new variables and functions.
5742 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5744         PR middle-end/84834
5745         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5746         integer_pow2p@2 and test integer_pow2p in condition.
5747         (A < 0 ? C : 0): Similarly for @1.
5749         PR middle-end/84831
5750         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5751         characters starting at p contain '\0' character, don't look beyond
5752         that.
5754         PR target/84827
5755         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5756         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
5758         PR target/84828
5759         * reg-stack.c (change_stack): Change update_end var from int to
5760         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
5761         also call set_block_for_insn on the newly added insns and rescan.
5763         PR target/84786
5764         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
5765         on the last operand.
5767         PR c++/84704
5768         * tree.c (stabilize_reference_1): Return save_expr (e) for
5769         STATEMENT_LIST even if it doesn't have side-effects.
5771 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
5773         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
5775 2018-03-12  Renlin Li  <renlin.li@arm.com>
5777         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
5778         aarch64_output_scalar_simd_mov_immediate.
5780 2018-03-12  Martin Sebor  <msebor@redhat.com>
5782         PR tree-optimization/83456
5783         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
5784         for perfectly overlapping calls to memcpy.
5785         (gimple_fold_builtin_memory_chk): Same.
5786         (gimple_fold_builtin_strcpy): Handle no-warning.
5787         (gimple_fold_builtin_stxcpy_chk): Same.
5788         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
5790 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5792         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
5793         parameter.  Use it for SFmode.
5794         (rs6000_function_arg_advance_1): Adjust.
5795         (rs6000_function_arg): Adjust.
5796         (rs6000_gimplify_va_arg): Pass false for that new parameter.
5798 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5800         PR rtl-optimization/84169
5801         PR rtl-optimization/84780
5802         * combine.c (can_combine_p): Check for a 2-insn combination whether
5803         the destination register is used between the two insns, too.
5805 2018-03-12  Richard Biener  <rguenther@suse.de>
5807         PR tree-optimization/84803
5808         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5809         for refs DR analysis didn't process.
5811 2018-03-12  Richard Biener  <rguenther@suse.de>
5813         PR tree-optimization/84777
5814         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5815         force-vectorize loops ignore whether we are optimizing for size.
5817 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5819         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5820         (TARGET_MD_ASM_ADJUST): Define.
5822 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
5823             Kito Cheng  <kito.cheng@gmail.com>
5824             Chung-Ju Wu  <jasonwucj@gmail.com>
5826         * config/nds32/nds32.c (nds32_compute_stack_frame,
5827         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5828         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5829         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5830         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5831         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5832         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5833         * config/nds32/nds32.md (prologue, epilogue): Use macro
5834         NDS32_V3PUSH_AVAILABLE_P to do checking.
5836 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
5838         PR debug/58150
5839         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5840         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5841         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
5842         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
5843         addition of most attributes on !orig_type_die or the attribute not
5844         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5846 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5847             Chung-Ju Wu  <jasonwucj@gmail.com>
5849         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5850         __NDS32_VH__ macro.
5851         * config/nds32/nds32.opt (mvh): New option.
5853 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5854             Chung-Ju Wu  <jasonwucj@gmail.com>
5856         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5857         function.
5858         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5859         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5860         definition.
5862 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5863             Chung-Ju Wu  <jasonwucj@gmail.com>
5865         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5866         function.
5867         * config/nds32/nds32-multiple.md (strlensi): New pattern.
5868         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5870 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
5871             Kito Cheng  <kito.cheng@gmail.com>
5872             Chung-Ju Wu  <jasonwucj@gmail.com>
5874         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5875         UNSPEC_FFMISM and UNSPEC_FLMISM.
5876         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5877         for ffb, ffmism and flmism.
5878         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5879         (unspec_ffmism): Ditto.
5880         (unspec_flmism): Ditto.
5881         (nds32_expand_builtin_impl): Check if string extension is available.
5882         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5883         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5885 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
5887         Reverting patch:
5888         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5890         PR target/83712
5891         * lra-assigns.c (assign_by_spills): Return a flag of reload
5892         assignment failure.  Do not process the reload assignment
5893         failures.  Do not spill other reload pseudos if they has the same
5894         reg class.
5895         (lra_assign): Add a return arg.  Set up from the result of
5896         assign_by_spills call.
5897         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5898         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5899         usage_insns if it is not NULL.
5900         (spill_hard_reg_in_range): New function.
5901         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5902         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5903         function prototypes.
5904         (lra_assign): Change prototype.
5905         * lra.c (lra): Add code to deal with fails by splitting hard reg
5906         live ranges.
5908 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
5910         PR target/84807
5911         * config/i386/i386.opt: Replace Enforcment with Enforcement.
5913 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
5915         PR debug/84620
5916         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5917         (dw_val_node): Add val_symbolic_view.
5918         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5919         (symview_upper_bound): New.
5920         (new_line_info_table): Initialize symviews_since_reset.
5921         (dwarf2out_source_line): Count symviews_since_reset and set
5922         symview_upper_bound.
5923         (dw_val_equal_p): Handle symview.
5924         (add_AT_symview): New.
5925         (print_dw_val): Handle symview.
5926         (attr_checksum, attr_checksum_ordered): Likewise.
5927         (same_dw_val_p, size_of_die): Likewise.
5928         (value_format, output_die): Likewise.
5929         (add_high_low_attributes): Use add_AT_symview for entry_view.
5930         (dwarf2out_finish): Reset symview_upper_bound, clear
5931         zero_view_p.
5933 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
5935         PR target/83969
5936         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5937         Add strict argument and use it.
5938         (rs6000_split_multireg_move): Update for new strict argument.
5939         (mem_operand_gpr): Disallow all non-offsettable addresses.
5940         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5942 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
5944         PR target/84772
5945         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5946         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5947         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5949         PR c++/84767
5950         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5951         decl, use remap_type if we want to use the type.
5953 2018-03-09  Martin Sebor  <msebor@redhat.com>
5955         PR tree-optimization/84526
5956         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5957         Remove dead code.
5958         (builtin_access::generic_overlap): Be prepared to handle non-array
5959         base objects.
5961 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
5963         PR rtl-optimization/84682
5964         * lra-constraints.c (process_address_1): Check is_address flag
5965         for address constraints.
5966         (process_alt_operands): Likewise.
5967         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5968         preprocess_constraints.
5969         * recog.h (preprocess_constraints): Add oploc parameter.
5970         Adjust callers.
5971         * recog.c (preprocess_constraints): Test address_operand for
5972         CT_ADDRESS constraints.
5974 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5976         PR target/83712
5977         * lra-assigns.c (assign_by_spills): Return a flag of reload
5978         assignment failure.  Do not process the reload assignment
5979         failures.  Do not spill other reload pseudos if they has the same
5980         reg class.
5981         (lra_assign): Add a return arg.  Set up from the result of
5982         assign_by_spills call.
5983         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5984         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5985         usage_insns if it is not NULL.
5986         (spill_hard_reg_in_range): New function.
5987         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5988         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5989         function prototypes.
5990         (lra_assign): Change prototype.
5991         * lra.c (lra): Add code to deal with fails by splitting hard reg
5992         live ranges.
5994 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5996         PR target/83193
5997         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
5998         Accept complain bool parameter.  Only emit errors if it is true.
5999         (arm_parse_cpu_option_name): Likewise.
6000         (arm_target_thumb_only): Adjust callers of the above.
6001         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6002         prototype to take a default true bool parameter.
6003         (arm_parse_arch_option_name): Likewise.
6005 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6006             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6008         PR jit/64089
6009         PR jit/84288
6010         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6011         * configure: Regenerate.
6012         * configure.ac ("linker --version-script option"): New.
6013         ("linker soname option"): New.
6015 2018-03-09  Richard Biener  <rguenther@suse.de>
6017         PR tree-optimization/84775
6018         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6019         immediate uses of predicate stmts and mark them modified.
6021         Revert
6022         PR tree-optimization/84178
6023         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6024         to caller.
6025         (version_loop_for_if_conversion): Delay update_ssa call.
6026         (tree_if_conversion): Delay update_ssa until after predicate
6027         insertion.
6029 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6031         PR target/84763
6032         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6033         when the function accesses prior frames.
6035 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6037         PR debug/84456
6038         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6039         gen_llsym, otherwise call maybe_gen_llsym.
6041         PR inline-asm/84742
6042         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6043         has ',' character inside of it.
6045 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6047         PR target/84748
6048         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6049         as clobbering CC_REGNUM.
6051 2018-03-08  Richard Biener  <rguenther@suse.de>
6053         PR middle-end/84552
6054         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6055         (follow_copies_to_constant): Do not follow SSA names registered
6056         for update.
6058 2018-03-08  Richard Biener  <rguenther@suse.de>
6060         PR tree-optimization/84178
6061         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6062         to caller.
6063         (version_loop_for_if_conversion): Delay update_ssa call.
6064         (tree_if_conversion): Delay update_ssa until after predicate
6065         insertion.
6067 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6069         PR tree-optimization/84178
6070         * tree-if-conv.c (release_bb_predicate): Remove the
6071         the assertion that the stmts have NULL use_ops.
6072         Discard the statements, asserting that they haven't
6073         yet been added to a BB.
6075 2018-03-08  Richard Biener  <rguenther@suse.de>
6077         PR tree-optimization/84746
6078         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6079         (phi_translate): Pass in destination ANTIC_OUT set.
6080         (phi_translate_1): Likewise.  For a simplified result lookup
6081         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6082         (phi_translate_set): Adjust.
6083         (do_pre_regular_insertion): Likewise.
6084         (do_pre_partial_partial_insertion): Likewise.
6086 2018-03-08  Martin Liska  <mliska@suse.cz>
6088         PR gcov-profile/84735
6089         * doc/gcov.texi: Document usage of profile files.
6090         * gcov-io.h: Document changes in the format.
6092 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6094         PR debug/84404
6095         PR debug/84408
6096         * dwarf2out.c (struct dw_line_info_table): Update comments for
6097         view == -1.
6098         (FORCE_RESET_NEXT_VIEW): New.
6099         (FORCE_RESETTING_VIEW_P): New.
6100         (RESETTING_VIEW_P): Check for -1 too.
6101         (ZERO_VIEW_P): Likewise.
6102         (new_line_info_table): Force-reset next view.
6103         (dwarf2out_begin_function): Likewise.
6104         (dwarf2out_source_line): Simplify zero_view_p initialization.
6105         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6106         view directly.  Omit view when omitting .loc at line 0.
6108 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6110         PR tree-optimization/84740
6111         * tree-switch-conversion.c (process_switch): Call build_constructors
6112         only if info.phi_count is non-zero.
6114         PR tree-optimization/84739
6115         * tree-tailcall.c (find_tail_calls): Check call arguments against
6116         DECL_ARGUMENTS (current_function_decl) rather than
6117         DECL_ARGUMENTS (func) when checking for tail recursion.
6119 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6121         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6122         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6123         Volker Reichelt's entry and add entries for people that perform
6124         GCC fuzzy testing and report numerous bugs.
6126 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6128         PR target/82411
6129         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6130         readonly data in sdata, if that is disabled.
6131         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6132         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6133         -mreadonly-in-sdata option.
6135 2018-03-07  Martin Sebor  <msebor@redhat.com>
6137         PR tree-optimization/84468
6138         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6139         basic block when looking for nul assignment.
6141 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6143         PR target/84277
6144         * except.h (output_function_exception_table): Adjust prototype.
6145         * except.c (output_function_exception_table): Remove FNNAME parameter
6146         and add SECTION parameter.  Ouput one part of the table at a time.
6147         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6148         the first part of the exception table and emit unwind directives.
6149         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6150         (i386_pe_seh_cold_init): Likewise.
6151         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6152         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6153         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6154         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6155         * config/i386/winnt.c: Include except.h.
6156         (struct seh_frame_state): Add reg_offset, after_prologue and
6157         in_cold_section fields.
6158         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6159         (i386_pe_seh_cold_init): New function.
6160         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6161         to seh->in_cold_section.
6162         (seh_emit_push): Record the offset of the push.
6163         (seh_emit_save): Record the offet of the save.
6164         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6165         Test seh->after_prologue to disregard the epilogue.
6166         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6167         (i386_pe_end_cold_function): New function.
6169 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6171         PR fortran/84565
6172         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6173         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6175         PR c++/84704
6176         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6177         on tmp_var.
6178         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6179         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6181         PR middle-end/84723
6182         * multiple_target.c: Include tree-inline.h and intl.h.
6183         (expand_target_clones): Diagnose and fail if node->definition and
6184         !tree_versionable_function_p (node->decl).
6186 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6188         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6189         sprint_ul.
6190         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6191         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6192         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6194 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6196         PR target/84710
6197         * combine.c (try_combine): Use reg_or_subregno instead of handling
6198         just paradoxical SUBREGs and REGs.
6200 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6202          * config/arc/arc.c (arc_finalize_pic): Remove function.
6203          (arc_must_save_register): We use single base PIC register, remove
6204          checks to save/restore the PIC register.
6205          (arc_expand_prologue): Likewise.
6206          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6207          Remove.
6208          (arc_verify_short): Likewise.
6209          (arc_attr_type): Likewise.
6210          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6211          (walk_stores): Likewise.
6212          (arc_address_cost): Make it static.
6213          (arc_verify_short): Likewise.
6214          (branch_dest): Likewise.
6215          (arc_attr_type): Likewise.
6216          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6217          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6218          (arc_final_prescan_insn): Remove inserting the nops due to
6219          hardware hazards.  It is done in reorg step.
6220          (insn_length_variant_t): Remove.
6221          (insn_length_parameters_t): Likewise.
6222          (arc_insn_length_parameters): Likewise.
6223          (arc_get_insn_variants): Likewise.
6224          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6226 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6228         PR inline-asm/84683
6229         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6230         assertion failure.
6232         PR tree-optimization/84687
6233         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6234         on new_node->decl.
6235         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6237 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6239         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6240         Rename to ppc_speculation_barrier.
6241         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6242         __builtin_ppc_speculation_barrier.
6244 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6246         PR target/84700
6247         * combine.c (combine_simplify_rtx): Don't try to simplify if
6248         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6249         are equal to x.
6251 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6253         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6254         to 32 bytes when compiling for POWER9.
6256 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6258         PR target/84564
6259         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6260         regparm >= 3 with no arg reg available also for calls with
6261         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6263         PR target/84524
6264         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6265         orig,vex.
6266         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6268 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6270         PR target/84264
6271         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6273 2018-03-05  Richard Biener  <rguenther@suse.de>
6275         PR tree-optimization/84486
6276         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6277         When inserting a __builtin_assume_aligned call set the LHS
6278         SSA name alignment info accordingly.
6280 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6282         PR tree-optimization/84114
6283         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6284         Avoid reassociation of FLOAT_MODE addition.
6286 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6288         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6289         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6290         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6291         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6292         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6293         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6294         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6295         and -mwbnoinvd.
6296         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6297         __builtin_ia32_wbinvd): New builtins.
6298         (SPECIAL_ARGS2): New.
6299         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6300         (SPECIAL_ARGS2): New.
6301         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6302         (ix86_valid_target_attribute_inner_p): Ditto.
6303         (ix86_init_mmx_sse_builtins): Add special_args2.
6304         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6305         TARGET_WBNOINVD_P): New.
6306         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6307         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6308         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6309         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6310         * config/i386/pconfigintrin.h: New file.
6311         * config/i386/wbnoinvdintrin.h: Ditto.
6312         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6313         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6315 2018-03-05  Richard Biener  <rguenther@suse.de>
6317         PR tree-optimization/84670
6318         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6319         member.
6320         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6321         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6322         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6323         doesn't grow if all successors (recursively) were visited at least
6324         once.
6326 2018-03-05  Richard Biener  <rguenther@suse.de>
6328         PR tree-optimization/84650
6329         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6330         if executed in the loop pipeline.
6332 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6334         * doc/configfiles.texi (Configuration Files): Move info about
6335         conditionalizing $target-protos.h to...
6336         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6337         differs from $target-protos.h.
6339 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6340             Chung-Ju Wu  <jasonwucj@gmail.com>
6342         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6343         * config/nds32/nds32-multiple.md (setmemsi): Define.
6344         * config/nds32/nds32-memory-manipulation.c
6345         (nds32_gen_dup_4_byte_to_word_value): New.
6346         (emit_setmem_word_loop): New.
6347         (emit_setmem_byte_loop): New.
6348         (nds32_expand_setmem_loop): New.
6349         (nds32_expand_setmem_loop_v3m): New.
6350         (nds32_expand_setmem_unroll): New.
6351         (nds32_expand_setmem): New.
6353 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6354             Chung-Ju Wu  <jasonwucj@gmail.com>
6356         * config/nds32/nds32-memory-manipulation.c
6357         (nds32_emit_load_store): New.
6358         (nds32_emit_post_inc_load_store): New.
6359         (nds32_emit_mem_move): New.
6360         (nds32_emit_mem_move_block): New.
6361         (nds32_expand_movmemsi_loop_unknown_size): New.
6362         (nds32_expand_movmemsi_loop_known_size): New.
6363         (nds32_expand_movmemsi_loop): New.
6364         (nds32_expand_movmemsi_unroll): New.
6365         (nds32_expand_movmemqi): Rename ...
6366         (nds32_expand_movmemsi): ... to this.
6367         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6368         (movmemsi): ... to this.
6369         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6370         (nds32_expand_movmemsi): ... to this.
6372 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6373             Monk Chiang  <sh.chiang04@gmail.com>
6374             Chung-Ju Wu  <jasonwucj@gmail.com>
6376         * config/nds32/nds32-protos.h
6377         (nds32_expand_load_multiple): New arguments.
6378         (nds32_expand_store_multiple): Ditto.
6379         (nds32_valid_multiple_load_store): Rename ...
6380         (nds32_valid_multiple_load_store_p): ... to this.
6381         * config/nds32/nds32-memory-manipulation.c
6382         (nds32_expand_load_multiple): Refine implementation.
6383         (nds32_expand_store_multiple): Ditto.
6384         * config/nds32/nds32-multiple.md
6385         (load_multiple): Update nds32_expand_load_multiple interface.
6386         (store_multiple): Update nds32_expand_store_multiple interface.
6387         * config/nds32/nds32-predicates.c
6388         (nds32_valid_multiple_load_store): Rename ...
6389         (nds32_valid_multiple_load_store_p): ... to this and refine
6390         implementation.
6391         * config/nds32/predicates.md
6392         (nds32_load_multiple_and_update_address_operation): New predicate.
6393         (nds32_store_multiple_and_update_address_operation): New predicate.
6395 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6396             Chung-Ju Wu  <jasonwucj@gmail.com>
6398         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6399         (combo): New attribute.
6400         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6402 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6404         * config/nds32/nds32.opt: Change -mcmodel= default value.
6406 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6407             Monk Chiang  <sh.chiang04@gmail.com>
6408             Chung-Ju Wu  <jasonwucj@gmail.com>
6410         * config/nds32/constants.md (unspec_element): New enum.
6411         * config/nds32/constraints.md (Umw): New constraint.
6412         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6413         * config/nds32/nds32-intrinsic.md: Likewise.
6414         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6415         (nds32_valid_smw_lwm_base_p): New.
6416         (nds32_output_smw_single_word): New.
6417         (nds32_output_lmw_single_word): New.
6418         (nds32_expand_unaligned_load): New.
6419         (nds32_expand_unaligned_store): New.
6420         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6421         (nds32_output_smw_single_word): Declare.
6422         (nds32_output_lmw_single_word): Declare.
6423         (nds32_expand_unaligned_load): Declare.
6424         (nds32_expand_unaligned_store): Declare.
6425         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6426         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6427         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6428         NDS32_BUILTIN_UASTORE_DW.
6429         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6430         predicate.
6432 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6433             Kito Cheng  <kito.cheng@gmail.com>
6434             Chung-Ju Wu  <jasonwucj@gmail.com>
6436         * config/nds32/nds32-intrinsic.c
6437         (nds32_expand_builtin_null_ftype_reg): Delete.
6438         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6439         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6440         (nds32_read_argument): New.
6441         (nds32_legitimize_target): Ditto.
6442         (nds32_legitimize_argument): Ditto.
6443         (nds32_check_constant_argument): Ditto.
6444         (nds32_expand_unop_builtin): Ditto.
6445         (nds32_expand_unopimm_builtin): Ditto.
6446         (nds32_expand_binop_builtin): Ditto.
6447         (nds32_builtin_decl_impl): Ditto.
6448         (builtin_description): Ditto.
6449         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6450         (nds32_init_builtins_impl): Ditto.
6451         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6452         (nds32_builtin_decl): New.
6453         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6454         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6456 2018-03-02  Jeff Law  <law@redhat.com>
6458         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6459         (redundant_insn, fill_simple_delay_slots): Likewise.
6460         (fill_slots_from_thread): Likewise.
6461         * resource.c (mark_referenced_resources): Likewise.
6462         (mark_set_resources, find_dead_or_set_registers): Likewise.
6464 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6466         * substring-locations.h (format_warning_va): Formatting fix for
6467         ATTRIBUTE_GCC_DIAG.
6468         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6469         argument.
6470         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6471         * substring-locations.c: Include intl.h.
6472         (format_warning_va): Turned into small wrapper around
6473         format_warning_n_va, renamed to ...
6474         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6475         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6476         use ngettext.
6477         (format_warning_at_substring_n): New function.
6478         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6479         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6480         format_warning_at_substring with just a shorter name instead of
6481         const function pointer.
6482         (fmtwarn_n): New function.
6483         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6484         appropriate, get rid of all the fmtstr temporaries, move conditionals
6485         with G_() wrapped string literals directly into fmtwarn arguments,
6486         cast dir.len to (int), formatting fixes.
6488 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6490         * doc/invoke.texi: Remove "Cilk Plus" references.
6492 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6493             Richard Biener  <rguenther@suse.de>
6495         PR ipa/84628
6496         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6497         for error or warning attributes if CALL_FROM_THUNK_P is set.
6498         Formatting fixes.
6500 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6502         PR target/56540
6503         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6504         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6506         PR target/56540
6507         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6508         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6510         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6511         instead of -1U in last predictors element's probability member.
6513 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6515         PR ipa/83983
6516         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6517         arguments if they are comparable.
6519 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6521         PR tree-optimization/84634
6522         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6523         masks and masked_loop_p with a single loop_masks, making sure it's
6524         null for bb vectorization.
6526 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6528         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6529         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6530         loop->force_vectorize to check whether there is no alias.
6532 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6534         PR target/84614
6535         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6536         prototypes.
6537         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6538         comments.
6539         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6540         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6541         instead of a loop around prev_real_insn.
6542         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6543         prev_real_insn.
6545         PR inline-asm/84625
6546         * config/i386/i386.c (ix86_print_operand): Use conditional
6547         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6548         zero vector.
6550 2018-03-02  Richard Biener  <rguenther@suse.de>
6552         PR tree-optimization/84427
6553         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6554         (bitmap_set_subtract_values): Rewrite to handle multiple
6555         exprs per value.
6556         (clean): Likewise.
6557         (prune_clobbered_mems): Likewise.
6558         (phi_translate): Take edge instead of pred/phiblock.
6559         (phi_translate_1): Likewise.
6560         (phi_translate_set): Likewise.  Insert all translated
6561         exprs for a value into the set, keeping possibly multiple
6562         expressions per value.
6563         (compute_antic_aux): Adjust for phi_translate changes.
6564         When intersecting union the expressions and prune those
6565         not in the final value set, keeping possibly multiple
6566         expressions per value.  Do not use value-insertion
6567         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6568         all expressions.  Add verification that the value-sets
6569         only shrink during iteration.
6570         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6571         (do_pre_regular_insertion): Likewise.
6572         (do_pre_partial_partial_insertion): Likewise.
6574 2018-03-02  Richard Biener  <rguenther@suse.de>
6576         PR target/82005
6577         * config/darwin.c (saved_debug_info_level): New static global.
6578         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6579         (darwin_asm_lto_end): Restore debug info generation settings.
6581 2018-03-01  Martin Liska  <mliska@suse.cz>
6583         PR sanitizer/82484
6584         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6585         volatile arguments.
6587 2018-03-01  Richard Biener  <rguenther@suse.de>
6589         PR debug/84645
6590         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6591         type annotation with LTO when debug was disabled at compile-time.
6593 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6595         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6596         XINT with INTVAL.
6597         (mips_final_postscan_insn): Likewise.
6599 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6601         PR rtl-optimization/84528
6602         * alias.c (init_alias_target): Add commentary.
6603         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6604         a unique base value if the frame pointer is not eliminated
6605         to the stack pointer.
6607 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6609         PR rtl-optimization/83327
6610         * lra-int.h (hard_regs_spilled_into): Declare.
6611         * lra.c (hard_regs_spilled_into): Define.
6612         (init_reg_info): Init hard_regs_spilled_into.
6613         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6614         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6615         (process_bb_lives): Handle hard_regs_spilled_into.
6616         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6617         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6619 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6621         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6622         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6623         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6624         * config/rs6000/aix72.h: New file.
6626 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6628         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6629         instead of warning_at with conditional singular and plural messages
6630         where possible.
6632         PR target/52991
6633         * stor-layout.c (update_alignment_for_field): For
6634         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6635         && !DECL_PACKED (field), do the alignment update, just use
6636         only desired_align instead of MAX (type_align, desired_align)
6637         as the alignment.
6638         (place_field): Don't do known_align < desired_align handling
6639         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6640         is non-NULL, instead do it after rli->prev_field handling and
6641         only if not within a bitfield word.  For DECL_PACKED (field)
6642         use type_align of BITS_PER_UNIT.
6644 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6646         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6647         superfluous parentheses and trailing spaces.
6649 2018-02-28  Richard Biener  <rguenther@suse.de>
6651         PR tree-optimization/84584
6652         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6653         SCoPs with fake exit edge.
6655 2018-02-28  Martin Liska  <mliska@suse.cz>
6657         PR testsuite/84597
6658         * timevar.c (timer::print): Fix format to properly print 100%
6659         values.
6661 2018-02-28  Richard Biener  <rguenther@suse.de>
6663         PR middle-end/84607
6664         * genmatch.c (capture_info::walk_match): Do not mark
6665         captured expressions without operands as expr_p given
6666         they act more like predicates and should be subject to
6667         "lost tail" side-effect preserving.
6669 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6671         PR rtl-optimization/81611
6672         * auto-inc-dec.c (attempt_change): Move dead note from
6673         mem_insn if it's the next use of regno
6674         (find_address): Take address use of reg holding
6675         non-incremented value.  Add parm to limit search to the named
6676         reg only.
6677         (merge_in_block): Attempt to use a mem insn that is the next
6678         use of the original regno.
6680 2018-02-27  Martin Sebor  <msebor@redhat.com>
6682         PR c++/83871
6683         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6684         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6686 2018-02-27  Martin Sebor  <msebor@redhat.com>
6688         PR translation/84207
6689         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6690         n argument to unsigned HOST_WIDE_INT.
6691         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6692         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6693         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6694         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6696 2018-02-27  Richard Biener  <rguenther@suse.de>
6698         PR tree-optimization/84512
6699         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6700         Do not use the estimate returned from record_stmt_cost for
6701         the scalar iteration cost but sum properly using add_stmt_cost.
6703 2018-02-27  Richard Biener  <rguenther@suse.de>
6705         PR tree-optimization/84466
6706         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6707         Adjust last change to less strictly validate use operands.
6709 2018-02-27  Martin Liska  <mliska@suse.cz>
6711         PR gcov-profile/84548
6712         * gcov.c (process_file): Allow partial overlap and consider it
6713         also as group functions.
6714         (output_lines): Properly calculate range of lines for a group.
6716 2018-02-27  Martin Liska  <mliska@suse.cz>
6718         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6719         'ggc' suffixes.  Change first column width.
6720         (timer::print): Fix formatting of the column.
6722 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6724         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6725         preserve inline entry blocks for the sake of debug inline
6726         entry point markers alone.
6727         (remove_unused_locals): Suggest in comments a better place to
6728         force the preservation of inline entry blocks that are
6729         otherwise unused, but do not preserve them.
6731 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6733         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6735 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6737         PR target/84039
6738         * config/i386/constraints.md (Bs): Replace
6739         ix86_indirect_branch_register with
6740         TARGET_INDIRECT_BRANCH_REGISTER.
6741         (Bw): Likewise.
6742         * config/i386/i386.md (indirect_jump): Likewise.
6743         (tablejump): Likewise.
6744         (*sibcall_memory): Likewise.
6745         (*sibcall_value_memory): Likewise.
6746         Peepholes of indirect call and jump via memory: Likewise.
6747         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6748         (*sibcall_value_GOT_32): Likewise.
6749         * config/i386/predicates.md (indirect_branch_operand): Likewise.
6750         (GOT_memory_operand): Likewise.
6751         (call_insn_operand): Likewise.
6752         (sibcall_insn_operand): Likewise.
6753         (GOT32_symbol_operand): Likewise.
6754         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6756 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6758         PR rtl-optimization/83496
6759         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
6760         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
6761         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
6762         redundant insn, if any.
6763         (relax_delay_slots): Likewise.
6764         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
6766 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
6768         PR tree-optimization/83965
6769         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
6770         that grouped statements are part of a reduction chain.  Return
6771         true if the statement is not marked as a reduction itself but
6772         is part of a group.
6773         (vect_recog_dot_prod_pattern): Don't check whether the statement
6774         is part of a group here.
6775         (vect_recog_sad_pattern): Likewise.
6776         (vect_recog_widen_sum_pattern): Likewise.
6778 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6780         PR debug/84545
6781         * final.c (rest_of_clean_state): Also look for calls inside sequences.
6783 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6785         PR target/84530
6786         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
6787         the bool argument.
6788         (ix86_output_indirect_function_return): New prototype.
6789         (ix86_split_simple_return_pop_internal): Likewise.
6790         * config/i386/i386.c (indirect_return_via_cx): New.
6791         (indirect_return_via_cx_bnd): Likewise.
6792         (indirect_thunk_name): Handle return va CX_REG.
6793         (output_indirect_thunk_function): Create alias for
6794         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
6795         (ix86_output_indirect_jmp): Remove the bool argument.
6796         (ix86_output_indirect_function_return): New function.
6797         (ix86_split_simple_return_pop_internal): Likewise.
6798         * config/i386/i386.md (*indirect_jump): Don't pass false
6799         to ix86_output_indirect_jmp.
6800         (*tablejump_1): Likewise.
6801         (simple_return_pop_internal): Change it to define_insn_and_split.
6802         Call ix86_split_simple_return_pop_internal to split it for
6803         -mfunction-return=.
6804         (simple_return_indirect_internal): Call
6805         ix86_output_indirect_function_return instead of
6806         ix86_output_indirect_jmp.
6808 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
6810         PR bootstrap/84405
6811         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6812         memset and value initialization afterwards.
6814 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
6816         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6818 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6820         PR target/84521
6821         * common/config/aarch64/aarch64-common.c
6822         (aarch_option_optimization_table[]): Switch
6823         off fomit-frame-pointer
6825 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6826             Chung-Ju Wu  <jasonwucj@gmail.com>
6828         * config/nds32/nds32-multiple.md (load_multiple): Disallow
6829         volatile memory.
6830         (store_multiple): Ditto.
6832 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6834         * config.gcc: Add --with-cpu support for nds32 target.
6835         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6836         * config/nds32/nds32.opt: Add -mcpu= option.
6838 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
6840         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6841         isel=yes): Warn for these deprecated options.
6843 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
6845         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6846         ISA_2_5_MASKS_EMBEDDED.
6848 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
6850         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6851         p->max as pointers rather than using iterative_hash_expr.
6853 2018-02-23  Carl Love  <cel@us.ibm.com>
6855         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6856         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6857         BU_P8V_OVERLOAD_2.
6858         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6859         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6860         P8V_BUILTIN_VEC_VUNSIGNED2.
6862 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
6864         PR target/81572
6865         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6866         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6867         LRA_UNKNOWN_ALT.
6868         * lra-constraints.c (curr_insn_transform): Set up
6869         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
6870         LRA_UNKNOWN_ALT.
6871         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6872         * lra-eliminations.c (spill_pseudos): Ditto.
6873         (process_insn_for_elimination): Ditto.
6874         * lra-lives.c (reg_early_clobber_p): Use the new macros.
6875         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6876         LRA_NON_CLOBBERED_ALT.
6878 2018-02-22  Martin Sebor  <msebor@redhat.com>
6880         PR tree-optimization/84480
6881         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6882         to maybe_diag_stxncpy_trunc.  Call it.
6883         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6884         from gimple_fold_builtin_strcpy.  Print inlining stack.
6885         (handle_builtin_stxncpy): Print inlining stack.
6886         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6888 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
6890         PR target/84176
6891         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6892         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6893         and -fcheck-pointer-bounds are used together.
6894         (indirect_thunk_prefix): New enum.
6895         (indirect_thunk_need_prefix): New function.
6896         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
6897         "_nt" instead of "_bnd" for NOTRACK prefix.
6898         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6899         (output_indirect_thunk_function): Likewise.
6900         (): Likewise.
6901         (ix86_code_end): Update output_indirect_thunk_function calls.
6902         (ix86_output_indirect_branch_via_reg): Replace
6903         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6904         (ix86_output_indirect_branch_via_push): Likewise.
6905         (ix86_output_function_return): Likewise.
6906         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6907         incompatible with -fcf-protection=branch and
6908         -fcheck-pointer-bounds.
6910 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6912         PR target/83335
6913         * config/aarch64/aarch64.c (aarch64_print_address_internal):
6914         Change gcc_assert call to output_operand_lossage.
6916 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6918         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6920 2018-02-22  DJ Delorie  <dj@redhat.com>
6921             Sebastian Perta  <sebastian.perta@renesas.com>
6922             Oleg Endo  <olegendo@gcc.gnu.org>
6924         * config/rx/rx.c (rx_rtx_costs): New function.
6925         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6927 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6929         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6931 2018-02-22  Martin Liska  <mliska@suse.cz>
6933         PR driver/83193
6934         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6935         Add "native" as a possible value.
6937 2018-02-22  Martin Liska  <mliska@suse.cz>
6939         PR driver/83193
6940         * config/i386/i386.c (ix86_option_override_internal):
6941         Add "native" as a possible value for -march and -mtune.
6943 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
6945         PR target/84502
6946         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6947         to all type variants.
6949         PR tree-optimization/84503
6950         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6951         width as info->bitpos + info->bitsize - start.
6952         (merged_store_group::merge_overlapping): Simplify width computation.
6953         (check_no_overlap): New function.
6954         (imm_store_chain_info::try_coalesce_bswap): Compute expected
6955         start + width and last_order of the group, fail if check_no_overlap
6956         fails.
6957         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6958         to group if check_no_overlap fails.
6960 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6962         * config/rs6000/altivec.md: Delete contraint arguments to
6963         define_expand, define_split, and define_peephole2, and in
6964         define_insn_and_split if always unused.
6965         * config/rs6000/darwin.md: Ditto.
6966         * config/rs6000/dfp.md: Ditto.
6967         * config/rs6000/rs6000.md: Ditto.
6968         * config/rs6000/sync.md: Ditto.
6969         * config/rs6000/vector.md: Ditto.
6970         * config/rs6000/vsx.md: Ditto.
6972 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6974         * config/rs6000/altivec.md: Write output control strings as braced
6975         blocks instead of double-quoted strings.
6976         * config/rs6000/darwin.md: Ditto.
6977         * config/rs6000/rs6000.md: Ditto.
6978         * config/rs6000/vector.md: Ditto.
6979         * config/rs6000/vsx.md: Ditto.
6981 2018-02-21  Jason Merrill  <jason@redhat.com>
6983         PR c++/84314 - ICE with templates and fastcall attribute.
6984         * attribs.c (build_type_attribute_qual_variant): Remove assert.
6986 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6988         * ipa-cp.c (determine_versionability): Fix comment typos.
6990 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6992         PR c/84229
6993         * ipa-cp.c (determine_versionability): Do not version functions caling
6994         va_arg_pack.
6996 2018-02-21  Martin Liska  <mliska@suse.cz>
6998         PR driver/83193
6999         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7000         Add "native" as a possible value.
7001         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7002         the macro when native cpu detection is available.
7004 2018-02-21  Martin Liska  <mliska@suse.cz>
7006         PR driver/83193
7007         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7008         Add "native" as a possible value.
7009         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7010         when native cpu detection is available.
7012 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7013             Martin Sebor  <msebor@redhat.com>
7015         PR tree-optimization/84478
7016         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7017         false.
7018         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7019         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7020         support which is conservatively correct, for 2 only stay conservative
7021         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7022         argument to the 2 argument get_range_strlen, adjust 6 arg
7023         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7024         false.
7025         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7026         (gimple_fold_builtin_strlen): Pass true as last argument to
7027         get_range_strlen.
7029 2018-02-20  Martin Sebor  <msebor@redhat.com>
7031         PR middle-end/84095
7032         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7033         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7034         (builtin_memref::builtin_memref): Factor out parts into
7035         set_base_and_offset and call it.
7037 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7039         PR middle-end/84406
7040         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7041         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7042         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7043         search at the associated MODE_INT.
7045 2018-02-20  Jeff Law  <law@redhat.com>
7047         PR middle-end/82123
7048         PR tree-optimization/81592
7049         PR middle-end/79257
7050         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7051         for range data rather than using global data.
7052         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7053         range data rather than using global data.
7054         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7055         pass it to children as needed.
7056         (struct directive::fmtresult): Similarly.
7057         (struct directive::set_width): Similarly.
7058         (struct directive::set_precision): Similarly.
7059         (format_integer, format_directive, parse_directive): Similarly.
7060         (format_none): Accept unnamed vr_values parameter.
7061         (format_percent, format_floating, format_character): Similarly.
7062         (format_string, format_plain): Similarly.
7063         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7064         the EVRP range analyzer for range data rather than using global data.
7065         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7066         gimple-ssa-evrp-analyze.h
7067         (class sprintf_dom_walker): Add after_dom_children member function.
7068         Add evrp_range_analyzer member.
7069         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7070         range analyzer as needed.
7071         (sprintf_dom_walker::after_dom_children): New member function.
7072         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7073         if not optimizing.
7074         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7075         (evrp_range_analyzer::pop_to_marker): Likewise.
7077 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7079         PR tree-optimization/84419
7080         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7081         with the required type if its current type is compatible but
7082         different.
7084 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7086         PR middle-end/82004
7087         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7088         after vectorization.
7090 2018-02-20  Martin Liska  <mliska@suse.cz>
7092         PR driver/83193
7093         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7094         possible values if we don't have a hint.
7096 2018-02-20  Martin Liska  <mliska@suse.cz>
7098         PR c/84310
7099         PR target/79747
7100         * final.c (shorten_branches): Build align_tab array with one
7101         more element.
7102         * opts.c (finish_options): Add alignment option limit check.
7103         (MAX_CODE_ALIGN): Likewise.
7104         (MAX_CODE_ALIGN_VALUE): Likewise.
7105         * doc/invoke.texi: Document maximum allowed option value for
7106         all -falign-* options.
7108 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7110         PR target/84146
7111         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7112         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7113         * var-tracking.c (emit_note_insn_var_location): Remove all references
7114         to NOTE_INSN_CALL_ARG_LOCATION.
7115         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7116         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7117         Use copy_rtx_if_shared.
7118         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7119         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7120         (dwarf2out_var_location): Remove handling of
7121         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7122         on call_insn.
7123         * final.c (final_scan_insn): Remove all references to
7124         NOTE_INSN_CALL_ARG_LOCATION.
7125         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7126         before dumping final insns.
7127         * except.c (emit_note_eh_region_end): Remove all references to
7128         NOTE_INSN_CALL_ARG_LOCATION.
7129         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7130         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7131         * config/arc/arc.c (hwloop_optimize): Likewise.
7132         * config/arm/arm.c (create_fix_barrier): Likewise.
7133         * config/s390/s390.c (s390_chunkify_start): Likewise.
7134         * config/sh/sh.c (find_barrier): Likewise.
7135         * config/i386/i386.c (rest_of_insert_endbranch,
7136         ix86_seh_fixup_eh_fallthru): Likewise.
7137         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7138         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7139         * config/frv/frv.c (frv_function_prologue): Likewise.
7140         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7141         reg note.
7142         (note_outside_basic_block_p): Remove all references to
7143         NOTE_INSN_CALL_ARG_LOCATION.
7144         * gengtype.c (adjust_field_rtx_def): Likewise.
7145         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7146         Likewise.
7147         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7148         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7150         PR c++/84444
7151         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7152         is ADDR_EXPR.
7154         PR tree-optimization/84452
7155         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7156         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7157         is NULL.
7159 2018-02-19  Martin Liska  <mliska@suse.cz>
7161         PR sanitizer/82183
7162         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7164 2018-02-19  Martin Liska  <mliska@suse.cz>
7165             Richard Sandiford  <richard.sandiford@linaro.org>
7167         PR tree-optimization/82491
7168         * gimple-fold.c (get_base_constructor): Make earlier bail out
7169         to prevent ubsan.
7171 2018-02-19  Carl Love  <cel@us.ibm.com>
7173         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7174         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7175         BU_P8V_OVERLOAD_1.
7176         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7177         P8V_BUILTIN_VEC_NEG.
7179 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7181         * config/rl78/rl78.md (movdf): New define expand.
7183 2018-02-19  Martin Liska  <mliska@suse.cz>
7185         PR other/80589
7186         * doc/invoke.texi: Fix typo.
7187         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7189 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7191         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7192         handle rs6000_single_float and rs6000_double_float specially for
7193         e500 family CPUs.
7195 2018-02-16  Jeff Law  <law@redhat.com>
7197         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7198         (pop_regs): Use it.
7200 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7202         PR ipa/84425
7203         * ipa-inline.c (inline_small_functions): Fix a typo.
7205 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7207         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7209 2018-02-16  Carl Love  <cel@us.ibm.com>
7211         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7212         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7213         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7214         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7215         expansion to P8V_BUILTIN_VEC_FLOAT2.
7217 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7219         PR rtl-optimization/70023
7220         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7221         src_regno into account.
7223 2018-02-16  Carl Love  <cel@us.ibm.com>
7225         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7226         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7227         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7228         * config/rs6000/rs6000.c: Remove case statements for
7229         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7230         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7231         and P9V_BUILTIN_VEC_VINSERT4B.
7232         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7233         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7234         * config/rs6000/vsx.md:
7235         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7236         vec_insert4b.
7238 2018-02-16  Carl Love  <cel@us.ibm.com>
7240         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7241         vec_insert4b.
7242         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7243         definitions.
7244         * config/rs6000/rs6000-c.c: Add the definitions for
7245         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7246         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7247         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7248         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7249         definition for insert4b and define insn *insert3b_internal.
7250         * doc/extend.texi: Add documentation for vec_extract4b.
7252 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7254         * doc/extend.texi (Backwards Compatibility): Mention friend
7255         injection.  Note for-scope is deprecated.
7256         * doc/invoke.texi (-ffriend-injection): Deprecate.
7258 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7260         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7261         that moved to I2, also allow destinations that are a paradoxical
7262         subreg (instead of a normal reg).
7264 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7266         PR target/83831
7267         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7268         to QImode.
7270 2018-02-16  Richard Biener  <rguenther@suse.de>
7272         PR tree-optimization/84037
7273         PR tree-optimization/84016
7274         PR target/82862
7275         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7276         Adjust vec_construct for the fact we need additional higher latency
7277         128bit inserts for AVX256 and AVX512 vector builds.
7278         (ix86_add_stmt_cost): Scale vector construction cost for
7279         elementwise loads.
7281 2018-02-16  Richard Biener  <rguenther@suse.de>
7283         PR tree-optimization/84417
7284         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7285         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7286         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7288 2018-02-16  Martin Liska  <mliska@suse.cz>
7290         PR sanitizer/84307
7291         * internal-fn.def (ASAN_CHECK): Set proper flags.
7292         (ASAN_MARK): Likewise.
7294 2018-02-16  Julia Koval  <julia.koval@intel.com>
7296         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7297         from PTA_CANNONLAKE.
7299 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7301         PR target/84272
7302         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7303         Use ++iter rather than iter++ for std::list iterators.
7304         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7305         defer deleting them until all nodes in the forest are processed.  Do
7306         free even leaf nodes.  Change to_process into auto_vec.
7308         PR bootstrap/84405
7309         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7310         * vec.h (vec_default_construct): Use memset instead of placement new
7311         if BROKEN_VALUE_INITIALIZATION is defined.
7312         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7313         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7314         is defined.
7316         PR rtl-optimization/83723
7317         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7318         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7319         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7320         recursive calls.
7321         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7322         callers.
7323         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7325 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7327         PR rtl-optimization/81443
7328         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7329         from inner REGs to paradoxical SUBREGs.
7331 2018-02-16  Richard Biener  <rguenther@suse.de>
7333         PR tree-optimization/84399
7334         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7335         For operands we can analyze at their definition make sure we can
7336         analyze them at each use as well.
7338 2018-02-16  Richard Biener  <rguenther@suse.de>
7340         PR tree-optimization/84190
7341         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7342         volatile accesses if the decl isn't volatile.
7344 2018-02-15  Jason Merrill  <jason@redhat.com>
7346         PR c++/84314 - ICE with templates and fastcall attribute.
7347         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7348         TYPE_CANONICAL on an existing type.
7350 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7352         PR tree-optimization/84383
7353         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7354         dstoff nor call operand_equal_p if dstbase is NULL.
7356         PR tree-optimization/84334
7357         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7358         also a CONSTANT_CLASS_P, punt.
7360 2018-02-14  Jim Wilson  <jimw@sifive.com>
7362         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7363         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7364         to where locals are set.  Add TARGET_RVC support.
7365         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7367 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7369         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7371 2018-02-14  Martin Sebor  <msebor@redhat.com>
7373         PR tree-optimization/83698
7374         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7375         arrays constrain the offset range to their bounds.
7376         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7377         (builtin_access::overlap): Avoid setting the size of overlap if it's
7378         already been set.
7379         (maybe_diag_overlap): Also consider arrays when deciding what values
7380         of offsets to include in diagnostics.
7382 2018-02-14  Martin Sebor  <msebor@redhat.com>
7384         PR c/84108
7385         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7386         that correspond to the kind of a declaration.
7388 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7390         PR target/83984
7391         * config/pa/pa.md: Load address of PIC label using the linkage table
7392         if the label is nonlocal.
7394 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7396         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7397         warning message if user requests -maltivec=be.
7398         * doc/invoke.texi: Document deprecation of -maltivec=be.
7400 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7402         PR target/84220
7403         * config/rs6000/rs6000-c.c: Update definitions for
7404         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7405         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7407 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7409         PR target/84239
7410         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7411         add _get_ssp intrinsics. Remove argument from
7412         __builtin_ia32_rdssp[d|q].
7413         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7414         * config/i386/i386-builtin.def: Remove argument from
7415         __builtin_ia32_rdssp[d|q].
7416         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7417         ix86_expand_special_args_builtin for _rdssp[d|q].
7418         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7419         Clear register before usage.
7420         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7421         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7423 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7425         PR tree-optimization/84357
7426         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7427         operand 1 of an ARRAY_REF too.
7429 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7431         PR target/83831
7432         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7433         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7434         declarations.
7435         (set_of_reg): New struct.
7436         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7437         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7438         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7439         functions.
7440         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7441         Split into bitclr, bitset, bitinvert patterns if appropriate.
7442         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7443         use rx_fuse_in_memory_bitop.
7444         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7445         to named insn, correct maximum insn length.
7447 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7449         PR target/79242
7450         * machmode.def: Define a complex mode for PARTIAL_INT.
7451         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7452         MODE_PARTIAL_INT.
7453         * doc/rtl.texi: Document CSPImode.
7454         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7455         handling.
7456         (msp430_hard_regno_nregs_with_padding): Likewise.
7458 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7460         PR target/84279
7461         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7463 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7465         PR rtl-optimization/84169
7466         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7467         we generated a parallel as new i3 and we split that to new i2 and i3
7468         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7469         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7470         those to i2, not i1.  Partially rewrite this scan code.
7472 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7474         PR c/82210
7475         * stor-layout.c (place_field): For variable length fields, adjust
7476         offset_align afterwards not just based on the field's alignment,
7477         but also on the size.
7479         PR middle-end/84309
7480         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7481         of exps and logs in the use_exp2 case.
7483 2018-02-13  Jeff Law  <law@redhat.com>
7485         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7486         entry for "vector".
7488         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7489         ARGS as unused.
7491 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7493         PR debug/84342
7494         PR debug/84319
7495         * common.opt (gas-loc-support, gas-locview-support): New.
7496         (ginline-points, ginternal-reset-location-views): New.
7497         * doc/invoke.texi: Document them.  Use @itemx where intended.
7498         (gvariable-location-views): Adjust.
7499         * target.def (reset_location_view): New.
7500         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7501         (TARGET_RESET_LOCATION_VIEW): New.
7502         * doc/tm.texi: Rebuilt.
7503         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7504         (dwarf2out_default_as_locview_support): New.
7505         (output_asm_line_debug_info): Use option variables.
7506         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7507         (output_loc_list): Likewise.
7508         (add_high_low_attributes): Check option variables.
7509         Don't output entry view attribute in strict mode.
7510         (gen_inlined_subroutine_die): Check option variables.
7511         (dwarf2out_inline_entry): Likewise.
7512         (init_sections_and_labels): Likewise.
7513         (dwarf2out_early_finish): Likewise.
7514         (maybe_reset_location_view): New, from...
7515         (dwarf2out_var_location): ... here.  Call it.
7516         * debug.h (dwarf2out_default_as_loc_support): Declare.
7517         (dwarf2out_default_as_locview_support): Declare.
7518         * hooks.c (hook_int_rtx_insn_0): New.
7519         * hooks.h (hook_int_rtx_insn_0): Declare.
7520         * toplev.c (process_options): Take -gas-loc-support and
7521         -gas-locview-support from dwarf2out.  Enable
7522         -gvariable-location-views by default only with locview
7523         assembler support.  Enable -ginternal-reset-location-views by
7524         default only if the target defines the corresponding hook.
7525         Enable -ginline-points by default if location views are
7526         enabled; force it disabled if statement frontiers are
7527         disabled.
7528         * tree-inline.c (expand_call_inline): Check option variables.
7529         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7531 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7533         PR tree-optimization/84321
7534         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7535         handling.  Also check whether the anti-range contains any values
7536         that satisfy the mask; switch to a VR_RANGE if not.
7538 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7540         PR sanitizer/84340
7541         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7543 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7545         PR c++/83990
7546         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7547         of call statements, also set location of a load to a temporary.
7549 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7551         * config/rl78/rl78.c (add_vector_labels): New function.
7552         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7553         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7554         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7555         which checks that no arguments are passed.
7556         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7557         * doc/extend.texi: Documentation for the new attribute.
7559 2018-02-13  Andreas Schwab  <schwab@suse.de>
7561         * config/riscv/linux.h (CPP_SPEC): Define.
7563 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7565         PR target/84335
7566         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7567         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7568         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7569         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7570         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7571         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7572         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7573         temporarily for AES and PCLMUL builtins.
7575         PR tree-optimization/84339
7576         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7577         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7578         Formatting fixes.
7580         PR middle-end/84309
7581         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7582         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7583         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7584         inline function.
7585         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7586         inline function.
7587         * omp-simd-clone.h: New file.
7588         * omp-simd-clone.c: Include omp-simd-clone.h.
7589         (expand_simd_clones): No longer static.
7590         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7591         cgraph.h and omp-simd-clone.h.
7592         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7593         (vect_recog_widen_shift_pattern): Formatting fix.
7594         (vect_pattern_recog_1): Don't check optab for calls.
7596         PR target/84336
7597         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7598         operands[2] into a REG before using gen_lowpart on it.
7600 2018-02-12  Jeff Law  <law@redhat.com>
7602         PR target/83760
7603         * config/sh/sh.c (find_barrier): Consider a sibling call
7604         a barrier as well.
7606         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7607         successfully back substituting a reg.
7609 2018-02-12  Richard Biener  <rguenther@suse.de>
7611         PR tree-optimization/84037
7612         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7613         parameter, move visited init to caller.
7614         (vect_slp_analyze_operations): Separate cost from validity
7615         check, initialize visited once for all instances.
7616         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7617         for all instances.
7618         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7619         out an assert.
7620         (vect_model_promotion_demotion_cost): Likewise.
7621         (vectorizable_bswap): Guard cost modeling with !slp_node
7622         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7623         SLP stmts.
7624         (vectorizable_call): Likewise.
7625         (vectorizable_conversion): Likewise.
7626         (vectorizable_assignment): Likewise.
7627         (vectorizable_shift): Likewise.
7628         (vectorizable_operation): Likewise.
7629         (vectorizable_store): Likewise.
7630         (vectorizable_load): Likewise.
7631         (vectorizable_condition): Likewise.
7632         (vectorizable_comparison): Likewise.
7634 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7636         PR sanitizer/84307
7637         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7638         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7639         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7641 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7643         PR middle-end/83665
7644         * params.def (inline-min-speedup): Increase from 8 to 15.
7645         (max-inline-insns-auto): Decrease from 40 to 30.
7646         * ipa-split.c (consider_split): Add some buffer for function to
7647         be considered inlining candidate.
7648         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7649         default values.
7651 2018-02-12  Richard Biener  <rguenther@suse.de>
7653         PR tree-optimization/84037
7654         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7655         matched stmts if we cannot swap the non-matched ones.
7657 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7659         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7660         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7661         _mm_maskz_scalef_round_ss): New intrinsics.
7662         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7663         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7664         __builtin_ia32_scalefss_round): Remove.
7665         (__builtin_ia32_scalefsd_mask_round,
7666         __builtin_ia32_scalefss_mask_round): New intrinsics.
7667         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7668         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7669         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7670         "<round_constraint>")): Changed to ...
7671         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7672         "<round_scalar_constraint>")): ... this.
7673         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7674         %0, %1, %2<round_op3>}"): Changed to ...
7675         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7676         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7677         %2<round_scalar_mask_op3>}"): ... this.
7678         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7680 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7682         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7683         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7684         (_mm_maskz_sqrt_round_ss): New intrinsics.
7685         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7686         (__builtin_ia32_sqrtsd_mask_round)
7687         (__builtin_ia32_sqrtss_mask_round): New builtins.
7688         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7689         (__builtin_ia32_sqrtss_round): Remove.
7690         (__builtin_ia32_sqrtsd_mask_round)
7691         (__builtin_ia32_sqrtss_mask_round): New builtins.
7692         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7693         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7694         ((match_operand:VF_128 1 "vector_operand"
7695         "xBm,<round_constraint>")): Changed to ...
7696         ((match_operand:VF_128 1 "vector_operand"
7697         "xBm,<round_scalar_constraint>")): ... this.
7698         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7699         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7700         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7701         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7702         %<iptr>1<round_scalar_mask_op3>}): ... this.
7703         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7704         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7706 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7708         PR target/84266
7709         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7710         Cast vec_cmpeq result to correct type.
7711         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7712         Cast vec_cmpgt result to correct type.
7714 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7716         * final.c (final_scan_insn_1): Renamed from...
7717         (final_scan_insn): ... this.  New wrapper, to recover
7718         seen from the outermost call in recursive ones.
7719         * config/sparc/sparc.c (output_return): Drop seen from call.
7720         (output_sibcall): Likewise.
7721         * config/visium/visium.c (output_branch): Likewise.
7723 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7725         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7726         function label.
7728 2018-02-10  Alan Modra  <amodra@gmail.com>
7730         PR target/84300
7731         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7732         Specify LR as an input.
7734 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7736         PR sanitizer/83987
7737         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7738         remove_member_access_dummy_vars): New functions.
7739         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7740         lower_omp_1, execute_lower_omp): Use them.
7742         PR rtl-optimization/84308
7743         * shrink-wrap.c (spread_components): Release todo vector.
7745 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7747         PR rtl-optimization/57193
7748         * ira-color.c (struct allocno_color_data): Add member
7749         conflict_allocno_hard_prefs.
7750         (update_conflict_allocno_hard_prefs): New.
7751         (bucket_allocno_compare_func): Add a preference based on
7752         conflict_allocno_hard_prefs.
7753         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7754         (color_allocnos): Remove a dead code.  Initiate
7755         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
7757 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7759         PR target/84226
7760         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
7761         constraint from =wa to wa.  Avoid a subreg on the output operand,
7762         instead use a pseudo and subreg it in a move.
7763         (p9_xxbrd_<mode>): Changed to ...
7764         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
7765         (p9_xxbrd_v2df): New expander.
7766         (p9_xxbrw_<mode>): Changed to ...
7767         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
7768         (p9_xxbrw_v4sf): New expander.
7770 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7772         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
7774 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
7776         PR target/83926
7777         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
7778         multiply in 32-bit mode.
7779         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
7780         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
7781         mode.
7783 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7785         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
7786         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
7787         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
7788         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
7790 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
7792         PR lto/84213
7793         * dwarf2out.c (is_trivial_indirect_ref): New function.
7794         (dwarf2out_late_global_decl): Do not generate a location
7795         attribute for variables that have a non-trivial DECL_VALUE_EXPR
7796         and that are not defined in the current unit.
7798 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7800         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
7801         instead of a libcall for UNORDERED.
7803 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
7805         PR target/82641
7806         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7807         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7809 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7811         PR target/PR84295
7812         * config/s390/s390.c (s390_set_current_function): Invoke
7813         s390_indirect_branch_settings also if fndecl didn't change.
7815 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7817         * config/rs6000/rs6000.md (blockage): Set length to zero.
7819 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7821         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7823 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7825         PR sanitizer/84285
7826         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7827         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7828         -static-lib*san.
7830         PR debug/84252
7831         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7832         PARALLEL incoming that failed vt_get_decl_and_offset check.
7834         PR middle-end/84237
7835         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7836         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7837         TREE_READONLY bit.
7838         (get_variable_section): For decls in named .bss* sections pass true as
7839         second argument to bss_initializer_p.
7841 2018-02-09  Marek Polacek  <polacek@redhat.com>
7842             Jakub Jelinek  <jakub@redhat.com>
7844         PR c++/83659
7845         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7846         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
7847         Sync some changes from cxx_fold_indirect_ref.
7849 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7851         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7852         markers.
7853         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7854         (BLOCK_INLINE_ENTRY_LABEL): New.
7855         (dwarf2out_var_location): Disregard inline entry markers.
7856         (inline_entry_data): New struct.
7857         (inline_entry_data_hasher): New hashtable type.
7858         (inline_entry_data_hasher::hash): New.
7859         (inline_entry_data_hasher::equal): New.
7860         (inline_entry_data_table): New variable.
7861         (add_high_low_attributes): Add DW_AT_entry_pc and
7862         DW_AT_GNU_entry_view attributes if a pending entry is found
7863         in inline_entry_data_table.  Add old entry_pc attribute only
7864         if debug nonbinding markers are disabled.
7865         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7866         markers are enabled.
7867         (block_within_block_p, dwarf2out_inline_entry): New.
7868         (dwarf2out_finish): Check that no entries remained in
7869         inline_entry_data_table.
7870         * final.c (reemit_insn_block_notes): Handle inline entry notes.
7871         (final_scan_insn, notice_source_line): Likewise.
7872         (rest_of_clean_state): Skip inline entry markers.
7873         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7874         markers.
7875         * gimple.c (gimple_build_debug_inline_entry): New.
7876         * gimple.h (enum gimple_debug_subcode): Add
7877         GIMPLE_DEBUG_INLINE_ENTRY.
7878         (gimple_build_debug_inline_entry): Declare.
7879         (gimple_debug_inline_entry_p): New.
7880         (gimple_debug_nonbind_marker_p): Adjust.
7881         * insn-notes.def (INLINE_ENTRY): New.
7882         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7883         inline entry marker notes.
7884         (print_insn): Likewise.
7885         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7886         (INSN_DEBUG_MARKER_KIND): Likewise.
7887         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7888         * tree-inline.c (expand_call_inline): Build and insert
7889         debug_inline_entry stmt.
7890         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7891         inline entry blocks early, if nonbind markers are enabled.
7892         (dump_scope_block): Dump fragment info.
7893         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7894         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7895         (gimple_build_debug_inline_entry): New.
7896         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7897         Enable/disable inline entry points too.
7898         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7899         (DEBUG_INSN): Describe inline entry markers.
7901         * common.opt (gvariable-location-views): New.
7902         (gvariable-location-views=incompat5): New.
7903         * config.in: Rebuilt.
7904         * configure: Rebuilt.
7905         * configure.ac: Test assembler for view support.
7906         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7907         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7908         * dwarf2out.c (var_loc_view): New typedef.
7909         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7910         (dwarf2out_locviews_in_attribute): New.
7911         (dwarf2out_locviews_in_loclist): New.
7912         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7913         (enum dw_line_info_opcode): Add LI_adv_address.
7914         (struct dw_line_info_table): Add view.
7915         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7916         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7917         (zero_view_p): New variable.
7918         (ZERO_VIEW_P): New macro.
7919         (output_asm_line_debug_info): New.
7920         (struct var_loc_node): Add view.
7921         (add_AT_view_list, AT_loc_list): New.
7922         (add_var_loc_to_decl): Add view param.  Test it against last.
7923         (new_loc_list): Add view params.  Record them.
7924         (AT_loc_list_ptr): Handle loc and view lists.
7925         (view_list_to_loc_list_val_node): New.
7926         (print_dw_val): Handle dw_val_class_view_list.
7927         (size_of_die): Likewise.
7928         (value_format): Likewise.
7929         (loc_list_has_views): New.
7930         (gen_llsym): Set vl_symbol too.
7931         (maybe_gen_llsym, skip_loc_list_entry): New.
7932         (dwarf2out_maybe_output_loclist_view_pair): New.
7933         (output_loc_list): Output view list or entries too.
7934         (output_view_list_offset): New.
7935         (output_die): Handle dw_val_class_view_list.
7936         (output_dwarf_version): New.
7937         (output_compilation_unit_header): Use it.
7938         (output_skeleton_debug_sections): Likewise.
7939         (output_rnglists, output_line_info): Likewise.
7940         (output_pubnames, output_aranges): Update version comments.
7941         (output_one_line_info_table): Output view numbers in asm comments.
7942         (dw_loc_list): Determine current endview, pass it to new_loc_list.
7943         Call maybe_gen_llsym.
7944         (loc_list_from_tree_1): Adjust.
7945         (add_AT_location_description): Create view list attribute if
7946         needed, check it's absent otherwise.
7947         (convert_cfa_to_fb_loc_list): Adjust.
7948         (maybe_emit_file): Call output_asm_line_debug_info for test.
7949         (dwarf2out_var_location): Reset views as needed.  Precompute
7950         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
7951         attribute.  Set view.
7952         (new_line_info_table): Reset next view.
7953         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7954         (dwarf2out_source_line): Likewise.  Output view resets and labels to
7955         the assembler, or select appropriate line info opcodes.
7956         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7957         (optimize_string_length): Catch it.  Adjust.
7958         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
7959         dw_val_class_view_list, and remove it if no longer needed.
7960         (hash_loc_list): Hash view numbers.
7961         (loc_list_hasher::equal): Compare them.
7962         (optimize_location_lists): Check whether a view list symbol is
7963         needed, and whether the locview attribute is present, and
7964         whether they match.  Remove the locview attribute if no longer
7965         needed.
7966         (index_location_lists): Call skip_loc_list_entry for test.
7967         (dwarf2out_finish): Call output_asm_line_debug_info for test.
7968         Use output_dwarf_version.
7969         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7970         (struct dw_val_node): Add val_view_list.
7971         * final.c (SEEN_NEXT_VIEW): New.
7972         (set_next_view_needed): New.
7973         (clear_next_view_needed): New.
7974         (maybe_output_next_view): New.
7975         (final_start_function): Rename to...
7976         (final_start_function_1): ... this.  Take pointer to FIRST,
7977         add SEEN parameter.  Emit param bindings in the initial view.
7978         (final_start_function): Reintroduce SEEN-less interface.
7979         (final): Rename to...
7980         (final_1): ... this.  Take SEEN parameter.  Output final pending
7981         next view at the end.
7982         (final): Reintroduce seen-less interface.
7983         (final_scan_insn): Output pending next view before switching
7984         sections or ending a block.  Mark the next view as needed when
7985         outputting variable locations.  Notify debug backend of section
7986         changes, and of location view changes.
7987         (rest_of_handle_final): Adjust.
7988         * toplev.c (process_options): Autodetect value for debug variable
7989         location views option.  Warn on incompat5 without -gdwarf-5.
7990         * doc/invoke.texi (gvariable-location-views): New.
7991         (gvariable-location-views=incompat5): New.
7992         (gno-variable-location-views): New.
7994 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
7996         PR tree-optimization/84136
7997         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
7998         that the result of find_edge is non-NULL.
8000 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8002         PR target/83008
8003         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8004         storing integer register in SImode.  Fix cost of 256 and 512
8005         byte aligned SSE register store.
8007 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8009         * config/i386/i386.c (ix86_multiplication_cost): Fix
8010         multiplication cost for TARGET_AVX512DQ.
8012 2018-02-08  Marek Polacek  <polacek@redhat.com>
8014         PR tree-optimization/84238
8015         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8016         get_range_strlen.
8018 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8020         PR tree-optimization/84265
8021         * tree-vect-stmts.c (vectorizable_store): Don't treat
8022         VMAT_CONTIGUOUS accesses as grouped.
8023         (vectorizable_load): Likewise.
8025 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8027         PR tree-optimization/81635
8028         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8029         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8030         (test_round_for_mask): New functions.
8031         (wide_int_cc_tests): Call test_round_for_mask.
8032         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8033         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8034         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8035         range returned by get_range_info.
8037 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8039         PR ipa/81360
8040         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8041         * symtab.c: Include builtins.h
8042         (symtab_node::output_to_lto_symbol_table_p): Move here
8043         from lto-streamer-out.c:output_symbol_p.
8044         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8045         (output_symbol_p): Move all logic to symtab.c
8046         (produce_symtab): Update.
8048 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8050         * config/s390/s390-opts.h (enum indirect_branch): Define.
8051         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8052         (s390_indirect_branch_via_thunk)
8053         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8054         (enum s390_indirect_branch_type): Define.
8055         * config/s390/s390.c (struct s390_frame_layout, struct
8056         machine_function): Remove.
8057         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8058         (indirect_branch_table_label_no, indirect_branch_table_name):
8059         Define variables.
8060         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8061         (enum s390_indirect_branch_option): Define.
8062         (s390_return_addr_from_memory): New function.
8063         (s390_handle_string_attribute): New function.
8064         (s390_attribute_table): Add new attribute handler.
8065         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8066         (s390_indirect_branch_via_thunk): New function.
8067         (s390_indirect_branch_via_inline_thunk): New function.
8068         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8069         sibling call optimization for non z10 compiles.
8070         (s390_emit_call): Force indirect branch target to be a single
8071         register.  Add r1 clobber for non-z10 compiles.
8072         (s390_emit_epilogue): Emit return jump via return_use expander.
8073         (s390_reorg): Handle JUMP_INSNs as execute targets.
8074         (s390_option_override_internal): Perform validity checks for the
8075         new command line options.
8076         (s390_indirect_branch_attrvalue): New function.
8077         (s390_indirect_branch_settings): New function.
8078         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8079         (s390_output_indirect_thunk_function):  New function.
8080         (s390_code_end): Implement target hook.
8081         (s390_case_values_threshold): Implement target hook.
8082         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8083         macros.
8084         * config/s390/s390.h (struct s390_frame_layout)
8085         (struct machine_function): Move here from s390.c.
8086         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8087         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8088         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8089         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8090         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8091         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8092         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8093         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8094         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8095         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8096         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8097         (mnemonic attribute): Add values which aren't recognized
8098         automatically.
8099         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8100         pattern for branch conversion.  Fix mnemonic attribute.
8101         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8102         indirect branch via thunk if requested.
8103         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8104         ("*indirect_jump"): Disable for branch conversion using out of
8105         line thunks.
8106         ("indirect_jump_via_thunk<mode>_z10")
8107         ("indirect_jump_via_thunk<mode>")
8108         ("indirect_jump_via_inlinethunk<mode>_z10")
8109         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8110         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8111         ("casesi_jump_via_inlinethunk<mode>_z10")
8112         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8113         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8114         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8115         ("*indirect2_jump"): Disable for branch conversion.
8116         ("casesi_jump"): Turn into expander and expand patterns for branch
8117         conversion.
8118         ("return_use"): New expander.
8119         ("*return"): Emit return via thunk and rename it to ...
8120         ("*return<mode>"): ... this one.
8121         * config/s390/s390.opt: Add new options and and enum for the
8122         option values.
8124 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8126         * lra-constraints.c (match_reload): Unconditionally use
8127         gen_lowpart_SUBREG, rather than selecting between that
8128         and equivalent gen_rtx_SUBREG code.
8130 2018-02-08  Richard Biener  <rguenther@suse.de>
8132         PR tree-optimization/84233
8133         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8134         changed flag instead of boguously re-using phi_inserted.
8136 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8138         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8139         static local variables.
8141 2018-02-08  Richard Biener  <rguenther@suse.de>
8143         PR tree-optimization/84278
8144         * tree-vect-stmts.c (vectorizable_store): When looking for
8145         smaller vector types to perform grouped strided loads/stores
8146         make sure the mode is supported by the target.
8147         (vectorizable_load): Likewise.
8149 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8151         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8152         Increase LDP/STP opportunities by adding adjacent callee-saves.
8154 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8156         PR rtl-optimization/84068
8157         PR rtl-optimization/83459
8158         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8160 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8162         PR tree-optimization/84224
8163         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8164         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8165         non-zero arguments.
8167 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8169         PR target/84113
8170         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8171         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8172         count, remove one USE.
8174 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8176         * doc/install.texi (Configuration): Document the
8177         --with-long-double-format={ibm,ieee} PowerPC configuration
8178         options.
8180         PR target/84154
8181         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8182         Convert from define_expand to be define_insn_and_split.  Rework
8183         float/double/_Float128 conversions to QI/HI/SImode to work with
8184         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8185         conversions to QI/HImode types did a store and then a load to
8186         truncate the value.  For conversions to VSX registers, don't split
8187         the insn, instead emit the code directly.  Use the code iterator
8188         any_fix to combine signed and unsigned conversions.
8189         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8190         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8191         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8192         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8193         (fix_<mode>di2_hw): Likewise.
8194         (fixuns_<mode>di2_hw): Likewise.
8195         (fix_<mode>si2_hw): Likewise.
8196         (fixuns_<mode>si2_hw): Likewise.
8197         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8198         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8199         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8200         fix<uns>_trunc<SFDF:mode>si2_p8.
8201         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8202         used.
8203         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8204         (fix<uns>_<mode>_mem): Likewise.
8205         (fctiw<u>z_<mode>_mem): Likewise.
8206         (fix<uns>_<mode>_mem): Likewise.
8207         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8208         the register allocator from doing a direct move to the GPRs to do
8209         a store, and instead use the ISA 3.0 store byte/half-word from
8210         vector register instruction.  For IEEE 128-bit floating point,
8211         also optimize stores of 32-bit ints.
8212         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8214 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8216         * genextract.c (push_pathstr_operand): New function to support
8217         [a-zA-Z].
8218         (walk_rtx): Call push_pathstr_operand.
8219         (print_path): Support [a-zA-Z].
8221 2018-02-07  Richard Biener  <rguenther@suse.de>
8223         PR tree-optimization/84037
8224         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8225         (cse_and_gimplify_to_preheader): Declare.
8226         (vect_get_place_in_interleaving_chain): Likewise.
8227         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8228         ivexpr_map.
8229         (_loop_vec_info::~_loop_vec_info): Delete it.
8230         (cse_and_gimplify_to_preheader): New function.
8231         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8232         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8233         (vectorizable_load): Likewise.  For grouped stores always base
8234         the IV on the first element.
8235         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8236         condition before gimplifying.
8238 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8240         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8241         *DIV_EXPR and *MOD_EXPR.
8243 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8245         PR target/84248
8246         * config/i386/i386.c (ix86_option_override_internal): Mask out
8247         the CF_SET bit when checking -fcf-protection.
8249 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8251         PR libgomp/84217
8252         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8253         enough.
8255 2018-02-07  Richard Biener  <rguenther@suse.de>
8257         PR tree-optimization/84204
8258         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8259         this place.
8261         PR tree-optimization/84205
8262         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8263         special-case isl_ast_op_zdiv_r.
8265         PR tree-optimization/84223
8266         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8267         Only add conditions from within the region.
8268         (gather_bbs::after_dom_children): Adjust.
8270 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8272         PR target/84209
8273         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8274         * config/avr/avr.md: Only post-reload split REG-REG moves if
8275         either register is GENERAL_REG_P.
8277 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8279         PR tree-optimization/84235
8280         * tree-ssa-scopedtables.c
8281         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8282         if the subtraction is performed in floating point type where NaNs are
8283         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8284         build 1.  Formatting fix.
8286 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8288         PR target/84146
8289         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8290         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8291         and skip it regardless of bb boundaries.  Use CALL_P macro,
8292         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8293         unnecessarily, formatting fix.
8295 2018-02-06  Michael Collison  <michael.collison@arm.com>
8297         * config/arm/thumb2.md:
8298         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8299         (*thumb_mov_notscc): Ditto.
8301 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8303         PR target/84154
8304         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8305         unsigned_fix, not "s".
8307 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8309         * configure.ac (gcc_fn_eh_frame_ro): New function.
8310         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8311         correct .eh_frame permissions.
8312         * configure: Regenerate.
8314 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8316         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8317         irrelevant options.
8319 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8321         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8322         Display warning message for -mno-speculate-indirect-jumps.
8324 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8326         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8327         Undocumented.
8328         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8330 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8332         PR tree-optimization/84225
8333         * tree-eh.c (find_trapping_overflow): Only call
8334         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8336 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8338         PR target/84145
8339         * config/i386/i386.c: Reimplement the check of possible options
8340         -mibt/-mshstk conbination. Change error messages.
8341         * doc/invoke.texi: Fix a typo: remove extra '='.
8343 2018-02-06  Marek Polacek  <polacek@redhat.com>
8345         PR tree-optimization/84228
8346         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8348 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8350         PR target/82641
8351         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8352         emitted arch directives.
8353         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8354         __ARM_FEATURE_COPROC before changing architectures.
8356 2018-02-06  Richard Biener  <rguenther@suse.de>
8358         * config/i386/i386.c (print_reg): Fix typo.
8359         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8361 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8363         * configure: Regenerate.
8365 2018-02-05  Martin Sebor  <msebor@redhat.com>
8367         PR tree-optimization/83369
8368         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8369         inlining context.
8371 2018-02-05  Martin Liska  <mliska@suse.cz>
8373         * doc/invoke.texi: Cherry-pick upstream r323995.
8375 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8377         * ira.c (ira_init_register_move_cost): Adjust comment.
8379 2018-02-05  Martin Liska  <mliska@suse.cz>
8381         PR gcov-profile/84137
8382         * doc/gcov.texi: Fix typo in documentation.
8384 2018-02-05  Martin Liska  <mliska@suse.cz>
8386         PR gcov-profile/83879
8387         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8388         using dlopen functionality.
8390 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8392         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8393         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8394         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8395         _mm_maskz_range_round_ss): New intrinsics.
8396         (__builtin_ia32_rangesd128_round)
8397         (__builtin_ia32_rangess128_round): Remove.
8398         (__builtin_ia32_rangesd128_mask_round,
8399         __builtin_ia32_rangess128_mask_round): New builtins.
8400         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8401         __builtin_ia32_rangess128_round): Remove.
8402         (__builtin_ia32_rangesd128_mask_round,
8403         __builtin_ia32_rangess128_mask_round): New builtins.
8404         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8405         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8406         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8407         "<round_saeonly_constraint>")): Changed to ...
8408         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8409         "<round_saeonly_scalar_constraint>")): ... this.
8410         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8411         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8412         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8413         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8414         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8416 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8418         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8419         options.
8420         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8421         Remove all values except native, 8540 and 8548.
8423 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8425         * config/i386/i386.c (ix86_output_function_return): Pass
8426         INVALID_REGNUM, instead of -1, as invalid register number to
8427         indirect_thunk_name and output_indirect_thunk.
8429 2018-02-02  Julia Koval  <julia.koval@intel.com>
8431         * config.gcc: Add -march=icelake.
8432         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8433         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8434         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8435         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8436         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8437         (processor_target_table): Add icelake.
8438         (ix86_option_override_internal): Handle new PTAs.
8439         (get_builtin_code_for_version): Handle icelake.
8440         (M_INTEL_COREI7_ICELAKE): New.
8441         (fold_builtin_cpu): Handle icelake.
8442         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8443         * doc/invoke.texi: Add -march=icelake.
8445 2018-02-02  Julia Koval  <julia.koval@intel.com>
8447         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8448         to wide_int_bitmask.
8449         * wide-int-bitmask.h: New.
8451 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8453         PR target/84066
8454         * config/i386/i386.md: Replace Pmode with word_mode in
8455         builtin_setjmp_setup and builtin_longjmp to support x32.
8457 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8459         PR target/56010
8460         PR target/83743
8461         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8462         #include "opts.h".
8463         (rs6000_supported_cpu_names): New static variable.
8464         (linux_cpu_translation_table): Likewise.
8465         (elf_platform) <cpu>: Define new static variable and use it.
8466         Translate kernel AT_PLATFORM name to canonical name if needed.
8467         Error if platform name is unknown.
8469 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8471         PR target/84089
8472         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8474 2018-02-01  Jeff Law  <law@redhat.com>
8476         PR target/84128
8477         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8478         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8479         the scratch if RELEASE_VIA_POP is false.
8480         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8481         If we have to save a temporary register, decrement SIZE appropriately.
8482         Pass new arguments to release_scratch_register_on_entry.
8483         (ix86_adjust_stack_and_probe): Likewise.
8484         (ix86_emit_probe_stack_range): Pass new arguments to
8485         release_scratch_register_on_entry.
8487 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8489         PR rtl-optimization/84157
8490         * combine.c (change_zero_ext): Use REG_P predicate in
8491         front of HARD_REGISTER_P predicate.
8493 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8495         * config/avr/avr.c (avr_option_override): Move disabling of
8496         -fdelete-null-pointer-checks to...
8497         * common/config/avr/avr-common.c (avr_option_optimization_table):
8498         ...here.
8500 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8502         PR tree-optimization/81635
8503         * tree-data-ref.c (split_constant_offset_1): For types that
8504         wrap on overflow, try to use range info to prove that wrapping
8505         cannot occur.
8507 2018-02-01  Renlin Li  <renlin.li@arm.com>
8509         PR target/83370
8510         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8511         TAILCALL_ADDR_REGS.
8512         (aarch64_register_move_cost): Likewise.
8513         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8514         TAILCALL_ADDR_REGS.
8515         (REG_CLASS_NAMES): Likewise.
8516         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8517         TAILCALL_ADDR_REGS. Remove IP registers.
8518         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8520 2018-02-01  Richard Biener  <rguenther@suse.de>
8522         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8523         for specifying RPO order and allow NULL for that.
8524         * domwalk.c (dom_walker::dom_walker): Likewise.
8525         (dom_walker::walk): Handle NULL RPO order.
8526         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8527         in RPO order.
8528         (rewrite_update_dom_walker): Likewise.
8529         (mark_def_dom_walker): Likewise.
8531 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8533         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8534         (aarch64_maybe_expand_sve_subreg_move): Declare.
8535         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8536         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8537         predicate.
8538         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8539         that are semantically a reverse operation.
8540         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8541         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8542         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8543         functions.
8544         (aarch64_can_change_mode_class): For big-endian, forbid changes
8545         between two SVE modes if they have different element sizes.
8547 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8549         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8550         the TImode handling for big-endian targets.
8552 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8554         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8555         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8556         not just bytes.
8557         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8558         Remove BSWAP handing for big-endian targets and use the form of
8559         LD1RQ appropariate for the mode.
8561 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8563         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8564         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8565         duplicated element.
8567 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8569         PR tearget/83845
8570         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8571         check for operands that need to go through aarch64_sve_reload_be.
8573 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8575         PR tree-optimization/81661
8576         PR tree-optimization/84117
8577         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8578         * tree-eh.c: Include gimplify.h.
8579         (find_trapping_overflow, replace_trapping_overflow,
8580         rewrite_to_non_trapping_overflow): New functions.
8581         * tree-vect-loop.c: Include tree-eh.h.
8582         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8583         * tree-data-ref.c: Include tree-eh.h.
8584         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8586 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8588         PR rtl-optimization/84123
8589         * combine.c (change_zero_ext): Check if hard register satisfies
8590         can_change_dest_mode before calling gen_lowpart_SUBREG.
8592 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8594         PR target/82444
8595         * ira.c (ira_init_register_move_cost): Remove assert.
8597 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8599         PR rtl-optimization/84071
8600         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8601         * doc/tm.texi: Regenerate.
8603 2018-01-31  Richard Biener  <rguenther@suse.de>
8605         PR tree-optimization/84132
8606         * tree-data-ref.c (analyze_miv_subscript): Properly
8607         check whether evolution_function_is_affine_multivariate_p
8608         before calling gcd_of_steps_may_divide_p.
8610 2018-01-31  Julia Koval  <julia.koval@intel.com>
8612         PR target/83618
8613         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8614         * config/i386/i386.md (rdpid_rex64) New.
8615         (rdpid): Make 32bit only.
8617 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8619         PR lto/84105
8620         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8621         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8623 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8625         Revert
8626         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8628         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8630 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8632         PR rtl-optimization/84071
8633         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8634         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8636 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8638         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8639         (arc_attribute_table): Add 'aux' attribute.
8640         (arc_in_small_data_p): Consider aux like variables.
8641         (arc_is_aux_reg_p): New function.
8642         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8643         (arc_get_aux_arg): New function.
8644         (prepare_move_operands): Handle aux-register access.
8645         (arc_handle_aux_attribute): New function.
8646         * doc/extend.texi (ARC Variable attributes): Add subsection.
8648 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8650         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8651         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8652         (arc_attribute_table): Add 'uncached' attribute.
8653         (arc_print_operand): Print '.di' flag for uncached memory
8654         accesses.
8655         (arc_in_small_data_p): Do not consider for small data the uncached
8656         types.
8657         (arc_is_uncached_mem_p): New function.
8658         * config/arc/predicates.md (compact_store_memory_operand): Check
8659         for uncached memory accesses.
8660         (nonvol_nonimm_operand): Likewise.
8661         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8663 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8665         PR c/84100
8666         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8667         falign-loops=): Add Optimization flag.
8669 2018-01-30  Jeff Law  <law@redhat.com>
8671         PR target/84064
8672         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8673         INT_REGISTERS_SAVED.  Check it prior to calling
8674         get_scratch_register_on_entry.
8675         (ix86_adjust_stack_and_probe): Similarly.
8676         (ix86_emit_probe_stack_range): Similarly.
8677         (ix86_expand_prologue): Corresponding changes.
8679 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8681         PR target/40411
8682         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8683         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8685 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8687         PR target/84112
8688         * lra-constraints.c (curr_insn_transform): Process AND in the
8689         address.
8691 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8693         PR rtl-optimization/83986
8694         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8695         dependence against last_pending_memory_flush in addition to
8696         pending_jump_insns.
8698 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8700         PR tree-optimization/81611
8701         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8702         copies.
8704 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8706         PR target/83758
8707         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8708         a reg rtx.
8710 2018-01-30  Richard Biener  <rguenther@suse.de>
8711             Jakub Jelinek  <jakub@redhat.com>
8713         PR tree-optimization/84111
8714         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8715         inner loops added during recursion, as they don't have up-to-date
8716         SSA form.
8718 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8720         PR ipa/81360
8721         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8722         (can_inline_edge_by_limits_p): ... here.
8723         (can_early_inline_edge_p, check_callers,
8724         update_caller_keys, update_callee_keys, recursive_inlining,
8725         add_new_edges_to_heap, speculation_useful_p,
8726         inline_small_functions,
8727         inline_small_functions, flatten_function,
8728         inline_to_all_callers_1): Update.
8730 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8732         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8733         zeros correctly.
8735 2018-01-30  Richard Biener  <rguenther@suse.de>
8737         PR tree-optimization/83008
8738         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8739         invariant and constant vector uses in stmts when they need
8740         more than one stmt.
8742 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8744         PR bootstrap/84017
8745         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8746         * configure: Regenerate.
8748 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8750         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8751         pattern.
8752         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8753         Use gen_rtx_REG rather than gen_lowpart.
8755 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8757         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
8758         rather than 0 when creating partial subregs.
8760 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8762         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
8763         of usage.
8765 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8767         PR target/81550
8768         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
8769         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
8770         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
8771         flags.  This restores the settings used before the 2017-07-24.
8772         Turning off pre increment/decrement/modify allows IVOPTS to
8773         optimize DF/SF loops where the index is an int.
8775 2018-01-29  Richard Biener  <rguenther@suse.de>
8776             Kelvin Nilsen  <kelvin@gcc.gnu.org>
8778         PR bootstrap/80867
8779         * tree-vect-stmts.c (vectorizable_call): Don't call
8780         targetm.vectorize_builtin_md_vectorized_function if callee is
8781         NULL.
8783 2018-01-22  Carl Love  <cel@us.ibm.com>
8785         * doc/extend.tex: Fix typo in second arg in
8786         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
8788 2018-01-29  Richard Biener  <rguenther@suse.de>
8790         PR tree-optimization/84086
8791         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
8792         (flush_ssaname_freelist): When SSA names were released reset
8793         the SCEV hash table.
8795 2018-01-29  Richard Biener  <rguenther@suse.de>
8797         PR tree-optimization/84057
8798         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
8799         removed paths when removing edges.
8801 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
8803         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
8804         -mfunction-return=@var{choice}.
8806 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8808         PR diagnostic/84034
8809         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8810         Handle CR like TAB.
8811         (layout::print_source_line): Likewise.
8812         (test_get_line_width_without_trailing_whitespace): Add test cases.
8814 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
8816         PR middle-end/84040
8817         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8818         debug insns.
8820 2018-01-26  Jim Wilson  <jimw@sifive.com>
8822         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8824         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8825         specified.
8827 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8829         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8830         and CMP + SUB-immediate -> SUBS.
8832 2018-01-26  Martin Sebor  <msebor@redhat.com>
8834         PR tree-optimization/83896
8835         * tree-ssa-strlen.c (get_string_len): Rename...
8836         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
8837         Avoid assuming length is constant.
8838         (handle_char_store): Use HOST_WIDE_INT for string length.
8840 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
8842         PR target/81763
8843         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8844         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8846 2018-01-26  Richard Biener  <rguenther@suse.de>
8848         PR rtl-optimization/84003
8849         * dse.c (record_store): Only record redundant stores when
8850         the earlier store aliases at least all accesses the later one does.
8852 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
8854         PR rtl-optimization/83985
8855         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8856         REG_CFA_RESTORE insns.
8857         (delete_unmarked_insns): Don't ignore separate shrink wrapping
8858         REG_CFA_RESTORE insns here.
8860         PR c/83989
8861         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8862         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8864 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8866         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8867         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8868         (arc_init): Likewise.
8869         (arc_override_options): Likewise.
8870         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8871         value.
8872         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8873         support.
8874         * config/arc/arc.h (TARGET_DBNZ): Define.
8875         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8876         properly set the tune attribute.
8877         (dbnz): Use TARGET_DBNZ guard.
8878         * config/arc/arc.opt (mtune): Add core3 option.
8880 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8882         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8883         recognize new pic like addresses.
8884         (arc_delegitimize_address): Clean up.
8886 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8888         * config/arc/arc-arches.def: Option mrf16 valid for all
8889         architectures.
8890         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8891         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8892         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8893         * config/arc/arc-tables.opt: Regenerate.
8894         * config/arc/arc.c (arc_conditional_register_usage): Handle
8895         reduced register file case.
8896         (arc_file_start): Set must have build attributes.
8897         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8898         mrf16 option value.
8899         * config/arc/arc.opt (mrf16): Add new option.
8900         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8901         * config/arc/genmultilib.awk: Handle new mrf16 option.
8902         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8903         * config/arc/t-multilib: Regenerate.
8904         * doc/invoke.texi (ARC Options): Document mrf16 option.
8906 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8908         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8909         * config/arc/arc.c (arc_handle_secure_attribute): New function.
8910         (arc_attribute_table): Add 'secure_call' attribute.
8911         (arc_print_operand): Print secure call operand.
8912         (arc_function_ok_for_sibcall): Don't optimize tail calls when
8913         secure.
8914         (arc_is_secure_call_p): New function.  * config/arc/arc.md
8915         (call_i): Add support for sjli instruction.
8916         (call_value_i): Likewise.
8917         * config/arc/constraints.md (Csc): New constraint.
8919 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8920             John Eric Martin  <John.Martin@emmicro-us.com>
8922         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8923         * config/arc/arc.c (_arc_jli_section): New struct.
8924         (arc_jli_section): New type.
8925         (rc_jli_sections): New static variable.
8926         (arc_handle_jli_attribute): New function.
8927         (arc_attribute_table): Add jli_always and jli_fixed attribute.
8928         (arc_file_end): New function.
8929         (TARGET_ASM_FILE_END): Define.
8930         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8931         (arc_add_jli_section): New function.
8932         (jli_call_scan): Likewise.
8933         (arc_reorg): Call jli_call_scan.
8934         (arc_output_addsi): Remove 'S' from printing asm operand.
8935         (arc_is_jli_call_p): New function.
8936         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8937         operand.
8938         (movhi_insn): Likewise.
8939         (movsi_insn): Likewise.
8940         (movsi_set_cc_insn): Likewise.
8941         (loadqi_update): Likewise.
8942         (load_zeroextendqisi_update): Likewise.
8943         (load_signextendqisi_update): Likewise.
8944         (loadhi_update): Likewise.
8945         (load_zeroextendhisi_update): Likewise.
8946         (load_signextendhisi_update): Likewise.
8947         (loadsi_update): Likewise.
8948         (loadsf_update): Likewise.
8949         (movsicc_insn): Likewise.
8950         (bset_insn): Likewise.
8951         (bxor_insn): Likewise.
8952         (bclr_insn): Likewise.
8953         (bmsk_insn): Likewise.
8954         (bicsi3_insn): Likewise.
8955         (cmpsi_cc_c_insn): Likewise.
8956         (movsi_ne): Likewise.
8957         (movsi_cond_exec): Likewise.
8958         (clrsbsi2): Likewise.
8959         (norm_f): Likewise.
8960         (normw): Likewise.
8961         (swap): Likewise.
8962         (divaw): Likewise.
8963         (flag): Likewise.
8964         (sr): Likewise.
8965         (kflag): Likewise.
8966         (ffs): Likewise.
8967         (ffs_f): Likewise.
8968         (fls): Likewise.
8969         (call_i): Remove 'S' asm letter, add jli instruction.
8970         (call_value_i): Likewise.
8971         * config/arc/arc.op (mjli-always): New option.
8972         * config/arc/constraints.md (Cji): New constraint.
8973         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8974         operand.
8975         (subsf3_fpx): Likewise.
8976         (mulsf3_fpx): Likewise.
8977         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8978         asm operand.
8979         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8980         function attrbutes.
8981         * doc/invoke.texi (ARC): Document mjli-always option.
8983 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
8985         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
8986         avoid addition with 0 and use incw and decw where possible.
8988 2018-01-26  Richard Biener  <rguenther@suse.de>
8990         PR tree-optimization/81082
8991         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8992         association if it requires casting to unsigned.
8993         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8994         from fold_plusminus_mult_expr to catch important cases late when
8995         range info is available.
8997 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8999         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9000         * configure.ac (hidden_linkonce): New test.
9001         * configure: Regenerate.
9002         * config.in: Regenerate.
9004 2018-01-26  Julia Koval  <julia.koval@intel.com>
9006         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9007         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9008         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9009         _mm_mask_bitshuffle_epi64_mask): Fix type.
9010         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9011         USI_FTYPE_V4DI_V4DI_USI): Remove.
9012         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9013         __builtin_ia32_vpshufbitqmb256_mask,
9014         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9015         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9016         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9018 2018-01-26  Alan Modra  <amodra@gmail.com>
9020         PR target/84033
9021         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9022         UNSPEC_VBPERMQ.  Sort other unspecs.
9024 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9026         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9028 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9030         PR middle-end/83055
9031         * predict.c (drop_profile): Do not push/pop cfun; update also
9032         node->count.
9033         (handle_missing_profiles): Fix logic looking for zero profiles.
9035 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9037         PR middle-end/83977
9038         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9039         on functions with #pragma omp declare simd or functions with simd
9040         attribute.
9041         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9042         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9043         Remove trailing \n from warning_at calls.
9045 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9047         PR target/84028
9048         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9049         for neutered workers.
9051 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9053         PR target/68467
9054         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9055         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9057 2018-01-24  Jeff Law  <law@redhat.com>
9059         PR target/83994
9060         * i386.c (get_probe_interval): Move to earlier point.
9061         (ix86_compute_frame_layout): If -fstack-clash-protection and
9062         the frame is larger than the probe interval, then use pushes
9063         to save registers rather than reg->mem moves.
9064         (ix86_expand_prologue): Remove conditional for int_registers_saved
9065         assertion.
9067 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9069         PR target/84014
9070         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9071         min/max for never referenced object.
9073 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9075         PR middle-end/83977
9076         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9077         here.
9078         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9079         attributes from DECL_ATTRIBUTES (decl) without affecting
9080         DECL_ATTRIBUTES (current_function_decl).
9081         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9082         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9084 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9086         PR tree-optimization/83979
9087         * fold-const.c (fold_comparison): Use constant_boolean_node
9088         instead of boolean_{true,false}_node.
9090 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9092         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9093         with zero counts.
9095 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9097         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9098         Simplify the clause that sets the length attribute.
9099         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9100         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9101         clause that sets the length attribute.
9102         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9104 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9106         PR target/83589
9107         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9108         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9109         Add strict parameter.
9110         (prevent_branch_around_nothing): Insert dummy insn between branch to
9111         label and label with no ptx insn inbetween.
9112         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9114 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9116         PR target/81352
9117         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9118         for neutered threads in warp.
9119         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9121 2018-01-24  Richard Biener  <rguenther@suse.de>
9123         PR tree-optimization/83176
9124         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9125         operands.
9127 2018-01-24  Richard Biener  <rguenther@suse.de>
9129         PR tree-optimization/82819
9130         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9131         code generating pluses that are no-ops in the target precision.
9133 2018-01-24  Richard Biener  <rguenther@suse.de>
9135         PR middle-end/84000
9136         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9138 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9140         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9141         to merge probabilities.
9142         * predict.c (probably_never_executed): Also mark as cold functions
9143         with global 0 profile and guessed local profile.
9144         * profile-count.c (profile_probability::combine_with_count): New
9145         member function.
9146         * profile-count.h (profile_probability::operator*,
9147         profile_probability::operator*=, profile_probability::operator/,
9148         profile_probability::operator/=): Reduce precision to adjusted
9149         and set value to guessed on contradictory divisions.
9150         (profile_probability::combine_with_freq): Remove.
9151         (profile_probability::combine_wiht_count): Declare.
9152         (profile_count::force_nonzero):: Set to adjusted.
9153         (profile_count::probability_in):: Set quality to adjusted.
9154         * tree-ssa-tail-merge.c (replace_block_by): Use
9155         combine_with_count.
9157 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9158             Jim Wilson  <jimw@sifive.com>
9160         * config/riscv/riscv.c (riscv_stack_boundary): New.
9161         (riscv_option_override): Set riscv_stack_boundary.  Handle
9162         riscv_preferred_stack_boundary_arg.
9163         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9164         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9165         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9166         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9167         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9168         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9170 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9172         PR target/83905
9173         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9174         of struct ix86_frame.
9175         (ix86_expand_epilogue): Likewise.  Add a local variable for
9176         the reg_save_offset field in struct ix86_frame.
9178 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9180         PR tree-optimization/82604
9181         * tree-loop-distribution.c (enum partition_kind): New enum item
9182         PKIND_PARTIAL_MEMSET.
9183         (partition_builtin_p): Support above new enum item.
9184         (generate_code_for_partition): Ditto.
9185         (compute_access_range): Differentiate cases that equality can be
9186         proven at all loops, the innermost loops or no loops.
9187         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9188         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9189         (finalize_partitions, distribute_loop): Don't fuse partition of
9190         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9191         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9192         parloop is enabled.
9194 2018-01-23  Martin Liska  <mliska@suse.cz>
9196         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9197         order to ignore the predictor.
9198         (PRED_POLYMORPHIC_CALL): Likewise.
9199         (PRED_RECURSIVE_CALL): Likewise.
9201 2018-01-23  Martin Liska  <mliska@suse.cz>
9203         * tree-profile.c (tree_profiling): Print function header to
9204         aware reader which function we are working on.
9205         * value-prof.c (gimple_find_values_to_profile): Do not print
9206         not interesting value histograms.
9208 2018-01-23  Martin Liska  <mliska@suse.cz>
9210         * profile-count.h (enum profile_quality): Add
9211         profile_uninitialized as the first value. Do not number values
9212         as they are zero based.
9213         (profile_count::verify): Update sanity check.
9214         (profile_probability::verify): Likewise.
9216 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9218         * doc/invoke.texi (ffor-scope): Deprecate.
9220 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9222         PR tree-optimization/83510
9223         * domwalk.c (set_all_edges_as_executable): New function.
9224         (dom_walker::dom_walker): Convert bool param
9225         "skip_unreachable_blocks" to enum reachability.  Move setup of
9226         edge flags to set_all_edges_as_executable and only do it when
9227         reachability is REACHABLE_BLOCKS.
9228         * domwalk.h (enum dom_walker::reachability): New enum.
9229         (dom_walker::dom_walker): Convert bool param
9230         "skip_unreachable_blocks" to enum reachability.
9231         (set_all_edges_as_executable): New decl.
9232         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9233         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9234         "reachability".
9235         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9236         but converting true to REACHABLE_BLOCKS.
9237         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9238         * tree-vrp.c
9239         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9240         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9241         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9242         REACHABLE_BLOCKS.
9243         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9244         if check_all_array_refs will be called.
9246 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9248         * tree.c (selftest::test_location_wrappers): Add more test
9249         coverage.
9251 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9253         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9254         (selftest::test_bit_in_range): Likewise.
9256 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9258         PR testsuite/83888
9259         * doc/sourcebuild.texi (vect_float): Say that the selector
9260         only describes the situation when -funsafe-math-optimizations is on.
9261         (vect_float_strict): Document.
9263 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9265         PR tree-optimization/83965
9266         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9267         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9268         instead of checking only for a reduction.
9269         (vect_recog_widen_sum_pattern): Likewise.
9271 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9273         * predict.c (probably_never_executed): Only use precise profile info.
9274         (compute_function_frequency): Skip after inlining hack since we now
9275         have quality checking.
9277 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9279         * profile-count.h (profile_probability::very_unlikely,
9280         profile_probability::unlikely, profile_probability::even): Set
9281         precision to guessed.
9283 2018-01-23  Richard Biener  <rguenther@suse.de>
9285         PR tree-optimization/83963
9286         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9287         Properly terminate dominator walk when crossing the exit edge not
9288         when visiting its source block.
9290 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9292         PR c++/83918
9293         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9294         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9296 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9298         PR tree-optimization/83957
9299         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9300         semicolon after for body surrounded by braces.
9302         PR tree-optimization/83081
9303         * profile-count.h (profile_probability::split): New method.
9304         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9305         Use profile_probability::split.
9306         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9307         when splitting a single conditional jump into 2.
9309 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9311         PR tree-optimization/69452
9312         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9313         decl.
9315 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9317         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9318         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9319         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9321 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9323         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9324         * config/rl78/rl78.md (movdi): New define_expand.
9325         * config/rl78/rl78.c (rl78_split_movdi): New function.
9327 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9329         PR target/83862
9330         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9331         no longer used.
9332         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9333         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9334         128-bit to produce an UNSPEC move to get the double word with the
9335         signbit and then a shift directly to do signbit.
9336         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9337         implementation with a new version that just does either a direct
9338         move or a regular move.  Move memory interface to separate insns.
9339         Move insns so they are next to the expander.
9340         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9341         with signbit move.  Split big and little endian case.
9342         (signbit<mode>2_dm_mem_le): Likewise.
9343         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9344         (signbit<mode>2_dm2): Likewise.
9346 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9348         * config/rl78/rl78.md (anddi3): New define_expand.
9350 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9352         * config/rl78/rl78.md (umindi3): New define_expand.
9354 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9356         * config/rl78/rl78.md (smindi3): New define_expand.
9358 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9360         * config/rl78/rl78.md (smaxdi3): New define_expand.
9362 2018-01-22  Carl Love  <cel@us.ibm.com>
9364         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9365         LVX_V1TI): Add macro expansion.
9366         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9367         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9368         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9369         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9370         Change check to determine if the instruction is a byte reversing
9371         entry.  Fix typo in comment.
9372         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9373         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9374         Add def_builtin calls for new builtins.
9375         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9376         Add define_insn expansion.
9378 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9380         * config/rl78/rl78.md (umaxdi3): New define_expand.
9382 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9384         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9385         for non-QImode registers.
9387 2018-01-22  Richard Biener  <rguenther@suse.de>
9389         PR tree-optimization/83963
9390         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9391         including the loop exit block.
9392         (scop_detection::merge_sese): Likewise.
9393         (scop_detection::add_scop): Do it here instead.
9395 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9397         * doc/sourcebuild.texi (arm_softfloat): Document.
9399 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9401         PR gcc/77734
9402         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9403         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9404         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9406 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9407             David Edelsohn  <dje.gcc@gmail.com>
9409         PR target/83946
9410         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9411         Change "crset eq" to "crset 2".
9412         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9413         (*call_indirect_aix<mode>_nospec): Likewise.
9414         (*call_value_indirect_aix<mode>_nospec): Likewise.
9415         (*call_indirect_elfv2<mode>_nospec): Likewise.
9416         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9417         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9418         change assembly output from . to $.
9419         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9420         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9421         (*tablejump<mode>_internal1_nospec): Likewise.
9423 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9425         PR target/80870
9426         * config/sh/sh_optimize_sett_clrt.cc:
9427         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9429 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9431         PR tree-optimization/83940
9432         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9433         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9434         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9435         use it to pass back the definition type.
9436         (vect_check_store_rhs): Likewise rhs_dt_out.
9437         (vect_build_gather_load_calls): Add a mask_dt argument and use
9438         it instead of a call to vect_is_simple_use.
9439         (vectorizable_store): Update calls to vect_check_load_store_mask
9440         and vect_check_store_rhs.  Use the dt returned by the latter instead
9441         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9442         instead of calls to vect_is_simple_use.  Pass the scalar rather
9443         than the vector operand to vect_is_simple_use when handling
9444         second and subsequent copies of an rhs value.
9445         (vectorizable_load): Update calls to vect_check_load_store_mask
9446         and vect_build_gather_load_calls.  Use the cached mask_dt and
9447         gs_info.offset_dt instead of calls to vect_is_simple_use.
9449 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9451         PR middle-end/83945
9452         * tree-emutls.c: Include gimplify.h.
9453         (lower_emutls_2): New function.
9454         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9455         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9456         it before further processing.
9458         PR target/83930
9459         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9460         UINTVAL (trueop1) instead of INTVAL (op1).
9462 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9464         PR debug/81570
9465         PR debug/83728
9466         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9467         INCOMING_FRAME_SP_OFFSET if not defined.
9468         (scan_trace): Add ENTRY argument.  If true and
9469         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9470         emit a note to adjust the CFA offset.
9471         (create_cfi_notes): Adjust scan_trace callers.
9472         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9473         INCOMING_FRAME_SP_OFFSET in the CIE.
9474         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9475         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9476         Likewise.
9477         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9478         * doc/tm.texi: Regenerated.
9480 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9482         PR rtl-optimization/83147
9483         * lra-constraints.c (remove_inheritance_pseudos): Use
9484         lra_substitute_pseudo_within_insn.
9486 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9487             Cesar Philippidis  <cesar@codesourcery.com>
9489         PR target/83920
9490         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9492 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9494         PR target/83790
9495         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9496         spaces for function labels.
9498 2018-01-19  Martin Liska  <mliska@suse.cz>
9500         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9501         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9502         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9503         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9504         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9505         (PRED_CONST_RETURN): Change from 69 to 65.
9506         (PRED_NULL_RETURN): Change from 91 to 71.
9507         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9508         (PRED_LOOP_GUARD): Change from 66 to 73.
9510 2018-01-19  Martin Liska  <mliska@suse.cz>
9512         * predict.c (predict_insn_def): Add new assert.
9513         (struct branch_predictor): Change type to signed integer.
9514         (test_prediction_value_range): Amend test to cover
9515         PROB_UNINITIALIZED.
9516         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9517         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9518         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9519         (PRED_LOOP_IV_COMPARE): Likewise.
9520         * predict.h (PROB_UNINITIALIZED): Define new constant.
9522 2018-01-19  Martin Liska  <mliska@suse.cz>
9524         * predict.c (dump_prediction): Add new format for
9525         analyze_brprob.py script which is enabled with -details
9526         suboption.
9527         * profile-count.h (precise_p): New function.
9529 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9531         PR tree-optimization/83922
9532         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9533         there are no statements that need masking.
9534         (vect_active_double_reduction_p): New function.
9535         (vect_analyze_loop_operations): Use it when handling phis that
9536         are not in the loop header.
9538 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9540         PR tree-optimization/83914
9541         * tree-vect-loop.c (vectorizable_induction): Don't convert
9542         init_expr or apply the peeling adjustment for inductions
9543         that are nested within the vectorized loop.
9545 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9547         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9548         instead of NEG.
9550 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9552         PR sanitizer/81715
9553         PR testsuite/83882
9554         * function.h (gimplify_parameters): Add gimple_seq * argument.
9555         * function.c: Include gimple.h and options.h.
9556         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9557         for the added local temporaries if needed.
9558         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9559         if there are any parameter cleanups, wrap whole body into a
9560         try/finally with the cleanups.
9562 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9564         PR target/82964
9565         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9566         Use GET_MODE_CLASS for scalar floating point.
9568 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9570         PR ipa/82256
9571         patch by PaX Team
9572         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9573         Fix call of call_cgraph_insertion_hooks.
9575 2018-01-18  Martin Sebor  <msebor@redhat.com>
9577         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9579 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9581         PR ipa/83619
9582         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9583         frequencies.
9585 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9587         PR other/70268
9588         * common.opt: (-ffile-prefix-map): New option.
9589         * opts.c (common_handle_option): Defer it.
9590         * opts-global.c (handle_common_deferred_options): Handle it.
9591         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9592         * file-prefix-map.h: New file.
9593         (remap_debug_filename, add_debug_prefix_map): ...here.
9594         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9595         * final.c (debug_prefix_map, add_debug_prefix_map
9596         remap_debug_filename): Move to...
9597         * file-prefix-map.c: New file.
9598         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9599         generalize, get rid of alloca(), use strrchr() instead of strchr().
9600         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9601         Implement in terms of add_prefix_map().
9602         (remap_macro_filename, remap_debug_filename): Implement in term of
9603         remap_filename().
9604         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9605         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9606         * dbxout.c: Include file-prefix-map.h.
9607         * varasm.c: Likewise.
9608         * vmsdbgout.c: Likewise.
9609         * xcoffout.c: Likewise.
9610         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9611         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9612         * doc/invoke.texi (-ffile-prefix-map): Document.
9613         (-fdebug-prefix-map): Update description.
9615 2018-01-18  Martin Liska  <mliska@suse.cz>
9617         * config/i386/i386.c (indirect_thunk_name): Document that also
9618         lfence is emitted.
9619         (output_indirect_thunk): Document why both instructions
9620         (pause and lfence) are generated.
9622 2018-01-18  Richard Biener  <rguenther@suse.de>
9624         PR tree-optimization/83887
9625         * graphite-scop-detection.c
9626         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9627         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9628         (scop_detection::merge_sese): Re-implement with a flood-fill
9629         algorithm that properly finds a SESE region if it exists.
9631 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9633         PR c/61240
9634         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9635         pointer_diff optimizations use view_convert instead of convert.
9637 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9639         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9640         Generate different code for -mno-speculate-indirect-jumps.
9641         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9642         (*call_indirect_aix<mode>): Disable for
9643         -mno-speculate-indirect-jumps.
9644         (*call_indirect_aix<mode>_nospec): New define_insn.
9645         (*call_value_indirect_aix<mode>): Disable for
9646         -mno-speculate-indirect-jumps.
9647         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9648         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9649         -mno-speculate-indirect-jumps.
9650         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9652 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9654         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9655         long double type, set the flags for noting the default long double
9656         type, even if we don't pass or return a long double type.
9658 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9660         PR ipa/83051
9661         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9662         failure.
9664 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9666         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9667         support for merge[hl].
9668         (fold_mergehl_helper): New helper function.
9669         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9670         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9671         (altivec_vmrglw_direct): Add xxmrglw insn.
9673 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9675         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9676         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9678 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9680         PR lto/83121
9681         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9682         call the lto_location_cache before reading the
9683         DECL_SOURCE_LOCATION of the types.
9685 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9686             Richard Sandiford  <richard.sandiford@linaro.org>
9688         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9689         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9690         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9691         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9692         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9693         Add declaration.
9694         * config/aarch64/constraints.md (aarch64_movti_operand):
9695         Limit immediates.
9696         * config/aarch64/predicates.md (Uti): Add new constraint.
9698 2018-01-17 Carl Love  <cel@us.ibm.com>
9700         * config/rs6000/vsx.md (define_expand xl_len_r,
9701         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9702         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9703         lxvll.
9704         (define_expand, define_insn): Move the shift left from  the
9705         define_insn to the define_expand for lxvl and stxvl instructions.
9706         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9707         and XL_LEN_R definitions to PURE.
9709 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9711         * config/i386/i386.c (indirect_thunk_name): Declare regno
9712         as unsigned int.  Compare regno with INVALID_REGNUM.
9713         (output_indirect_thunk): Ditto.
9714         (output_indirect_thunk_function): Ditto.
9715         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9716         in the call to output_indirect_thunk_function.
9718 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9720         PR middle-end/83884
9721         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9722         rather than the size of inner_type to determine the stack slot size
9723         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9725 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9727         PR target/83546
9728         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9729         to PTA_SILVERMONT.
9731 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9733         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9734         endian Linux systems to optionally enable multilibs for selecting
9735         the long double type if the user configured an explicit type.
9736         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9737         have no long double multilibs if not defined.
9738         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9739         warn if the user used -mabi={ieee,ibm}longdouble and we built
9740         multilibs for long double.
9741         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9742         appropriate multilib option.
9743         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9744         multilib options.
9745         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9746         for building long double multilibs.
9747         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9749 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
9751         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9752         copies.
9754         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9755         64 bits.
9756         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9757         128 bits.
9759         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
9760         variables.
9762         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
9763         return value.
9765 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9767         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
9768         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
9770 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9772         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
9773         different rtl trees depending on TARGET_64BIT.
9774         (rs6000_gen_lvx): Likewise.
9776 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9778         * config/visium/visium.md (nop): Tweak comment.
9779         (hazard_nop): Likewise.
9781 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9783         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
9784         -mspeculate-indirect-jumps.
9785         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
9786         for -mno-speculate-indirect-jumps.
9787         (*call_indirect_elfv2<mode>_nospec): New define_insn.
9788         (*call_value_indirect_elfv2<mode>): Disable for
9789         -mno-speculate-indirect-jumps.
9790         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
9791         (indirect_jump): Emit different RTL for
9792         -mno-speculate-indirect-jumps.
9793         (*indirect_jump<mode>): Disable for
9794         -mno-speculate-indirect-jumps.
9795         (*indirect_jump<mode>_nospec): New define_insn.
9796         (tablejump): Emit different RTL for
9797         -mno-speculate-indirect-jumps.
9798         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
9799         (tablejumpsi_nospec): New define_expand.
9800         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
9801         (tablejumpdi_nospec): New define_expand.
9802         (*tablejump<mode>_internal1): Disable for
9803         -mno-speculate-indirect-jumps.
9804         (*tablejump<mode>_internal1_nospec): New define_insn.
9805         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9806         option.
9808 2018-01-16  Artyom Skrobov tyomitch@gmail.com
9810         * caller-save.c (insert_save): Drop unnecessary parameter.  All
9811         callers updated.
9813 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9814             Richard Biener  <rguenth@suse.de>
9816         PR libgomp/83590
9817         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9818         return early, inline manually is_gimple_sizepos.  Make sure if we
9819         call gimplify_expr we don't end up with a gimple constant.
9820         * tree.c (variably_modified_type_p): Don't return true for
9821         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
9822         * gimplify.h (is_gimple_sizepos): Remove.
9824 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9826         PR tree-optimization/83857
9827         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9828         vectorizable_live_operation for pure SLP statements.
9829         (vectorizable_live_operation): Handle PHIs.
9831 2018-01-16  Richard Biener  <rguenther@suse.de>
9833         PR tree-optimization/83867
9834         * tree-vect-stmts.c (vect_transform_stmt): Precompute
9835         nested_in_vect_loop_p since the scalar stmt may get invalidated.
9837 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9839         PR c/83844
9840         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9841         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9842         If off is not INTEGER_CST, issue a may not be aligned warning
9843         rather than isn't aligned.  Use isn%'t rather than isn't.
9844         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9845         into MULT_EXPR.
9846         <case MULT_EXPR>: Improve the case when bottom and one of the
9847         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9848         operand, in that case check if the other operand is multiple of
9849         bottom divided by the INTEGER_CST operand.
9851 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9853         PR target/83858
9854         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9855         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9856         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9857         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9858         * config/pa/pa.c (pa_function_arg_advance): Likewise.
9859         (pa_function_arg, pa_arg_partial_bytes): Likewise.
9860         (pa_function_arg_size): New function.
9862 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9864         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9865         in a separate statement.
9867 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9869         PR tree-optimization/83847
9870         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9871         group gathers and scatters.
9873 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9875         PR rtl-optimization/86620
9876         * params.def (max-sched-ready-insns): Bump minimum value to 1.
9878         PR rtl-optimization/83213
9879         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9880         to last if both are JUMP_INSNs.
9882         PR tree-optimization/83843
9883         * gimple-ssa-store-merging.c
9884         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9885         store_immediate_info for bswap/nop orig_stores.
9887 2018-01-15  Andrew Waterman  <andrew@sifive.com>
9889         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9890         !TARGET_MUL.
9891         <UDIV>: Increase cost if !TARGET_DIV.
9893 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
9895         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9896         (define_attr "cr_logical_3op"): New.
9897         (cceq_ior_compare): Adjust.
9898         (cceq_ior_compare_complement): Adjust.
9899         (*cceq_rev_compare): Adjust.
9900         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9901         (is_cracked_insn): Adjust.
9902         (insn_must_be_first_in_group): Adjust.
9903         * config/rs6000/40x.md: Adjust.
9904         * config/rs6000/440.md: Adjust.
9905         * config/rs6000/476.md: Adjust.
9906         * config/rs6000/601.md: Adjust.
9907         * config/rs6000/603.md: Adjust.
9908         * config/rs6000/6xx.md: Adjust.
9909         * config/rs6000/7450.md: Adjust.
9910         * config/rs6000/7xx.md: Adjust.
9911         * config/rs6000/8540.md: Adjust.
9912         * config/rs6000/cell.md: Adjust.
9913         * config/rs6000/e300c2c3.md: Adjust.
9914         * config/rs6000/e500mc.md: Adjust.
9915         * config/rs6000/e500mc64.md: Adjust.
9916         * config/rs6000/e5500.md: Adjust.
9917         * config/rs6000/e6500.md: Adjust.
9918         * config/rs6000/mpc.md: Adjust.
9919         * config/rs6000/power4.md: Adjust.
9920         * config/rs6000/power5.md: Adjust.
9921         * config/rs6000/power6.md: Adjust.
9922         * config/rs6000/power7.md: Adjust.
9923         * config/rs6000/power8.md: Adjust.
9924         * config/rs6000/power9.md: Adjust.
9925         * config/rs6000/rs64.md: Adjust.
9926         * config/rs6000/titan.md: Adjust.
9928 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9930         * config/i386/predicates.md (indirect_branch_operand): Rewrite
9931         ix86_indirect_branch_register logic.
9933 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9935         * config/i386/constraints.md (Bs): Update
9936         ix86_indirect_branch_register check.  Don't check
9937         ix86_indirect_branch_register with GOT_memory_operand.
9938         (Bw): Likewise.
9939         * config/i386/predicates.md (GOT_memory_operand): Don't check
9940         ix86_indirect_branch_register here.
9941         (GOT32_symbol_operand): Likewise.
9943 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9945         * config/i386/predicates.md (constant_call_address_operand):
9946         Rewrite ix86_indirect_branch_register logic.
9947         (sibcall_insn_operand): Likewise.
9949 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9951         * config/i386/constraints.md (Bs): Replace
9952         ix86_indirect_branch_thunk_register with
9953         ix86_indirect_branch_register.
9954         (Bw): Likewise.
9955         * config/i386/i386.md (indirect_jump): Likewise.
9956         (tablejump): Likewise.
9957         (*sibcall_memory): Likewise.
9958         (*sibcall_value_memory): Likewise.
9959         Peepholes of indirect call and jump via memory: Likewise.
9960         * config/i386/i386.opt: Likewise.
9961         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9962         (GOT_memory_operand): Likewise.
9963         (call_insn_operand): Likewise.
9964         (sibcall_insn_operand): Likewise.
9965         (GOT32_symbol_operand): Likewise.
9967 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9969         PR middle-end/83837
9970         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9971         type rather than type addr's type points to.
9972         (expand_omp_atomic_mutex): Likewise.
9973         (expand_omp_atomic): Likewise.
9975 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9977         PR target/83839
9978         * config/i386/i386.c (output_indirect_thunk_function): Use
9979         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9980         for  __x86_return_thunk.
9982 2018-01-15  Richard Biener  <rguenther@suse.de>
9984         PR middle-end/83850
9985         * expmed.c (extract_bit_field_1): Fix typo.
9987 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9989         PR target/83687
9990         * config/arm/iterators.md (VF): New mode iterator.
9991         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9992         Remove integer-related logic from pattern.
9993         (neon_vabd<mode>_3): Likewise.
9995 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9997         PR middle-end/82694
9998         * common.opt (fstrict-overflow): No longer an alias.
9999         (fwrapv-pointer): New option.
10000         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10001         also for pointer types based on flag_wrapv_pointer.
10002         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10003         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10004         opts->x_flag_wrapv got set.
10005         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10006         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10007         POINTER_TYPE_OVERFLOW_UNDEFINED.
10008         * match.pd: Likewise in address comparison pattern.
10009         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10011 2018-01-15  Richard Biener  <rguenther@suse.de>
10013         PR lto/83804
10014         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10015         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10016         Reset type names to their identifier if their TYPE_DECL doesn't
10017         have linkage (and thus is used for ODR and devirt).
10018         (save_debug_info_for_decl): Remove.
10019         (save_debug_info_for_type): Likewise.
10020         (add_tree_to_fld_list): Adjust.
10021         * tree-pretty-print.c (dump_generic_node): Make dumping of
10022         type names more robust.
10024 2018-01-15  Richard Biener  <rguenther@suse.de>
10026         * BASE-VER: Bump to 8.0.1.
10028 2018-01-14  Martin Sebor  <msebor@redhat.com>
10030         PR other/83508
10031         * builtins.c (check_access): Avoid warning when the no-warning bit
10032         is set.
10034 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10036         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10037         * ira-color (allocno_hard_regs_compare): Likewise.
10039 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10041         PR target/83013
10042         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10043         Use .pushsection/.popsection.
10045 2018-01-14  Martin Sebor  <msebor@redhat.com>
10047         PR c++/81327
10048         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10050 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10052         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10053         entry from extra_headers.
10054         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10055         extra_headers, make the list bitwise identical to the i?86-*-* one.
10057 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10059         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10060         -mcmodel=large with -mindirect-branch=thunk,
10061         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10062         -mfunction-return=thunk-extern.
10063         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10064         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10065         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10067 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10069         * config/i386/i386.c (print_reg): Print the name of the full
10070         integer register without '%'.
10071         (ix86_print_operand): Handle 'V'.
10072          * doc/extend.texi: Document 'V' modifier.
10074 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10076         * config/i386/constraints.md (Bs): Disallow memory operand for
10077         -mindirect-branch-register.
10078         (Bw): Likewise.
10079         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10080         (GOT_memory_operand): Likewise.
10081         (call_insn_operand): Likewise.
10082         (sibcall_insn_operand): Likewise.
10083         (GOT32_symbol_operand): Likewise.
10084         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10085         for -mindirect-branch-register.
10086         (tablejump): Likewise.
10087         (*sibcall_memory): Likewise.
10088         (*sibcall_value_memory): Likewise.
10089         Disallow peepholes of indirect call and jump via memory for
10090         -mindirect-branch-register.
10091         (*call_pop): Replace m with Bw.
10092         (*call_value_pop): Likewise.
10093         (*sibcall_pop_memory): Replace m with Bs.
10094         * config/i386/i386.opt (mindirect-branch-register): New option.
10095         * doc/invoke.texi: Document -mindirect-branch-register option.
10097 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10099         * config/i386/i386-protos.h (ix86_output_function_return): New.
10100         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10101         set function_return_type.
10102         (indirect_thunk_name): Add ret_p to indicate thunk for function
10103         return.
10104         (output_indirect_thunk_function): Pass false to
10105         indirect_thunk_name.
10106         (ix86_output_indirect_branch_via_reg): Likewise.
10107         (ix86_output_indirect_branch_via_push): Likewise.
10108         (output_indirect_thunk_function): Create alias for function
10109         return thunk if regno < 0.
10110         (ix86_output_function_return): New function.
10111         (ix86_handle_fndecl_attribute): Handle function_return.
10112         (ix86_attribute_table): Add function_return.
10113         * config/i386/i386.h (machine_function): Add
10114         function_return_type.
10115         * config/i386/i386.md (simple_return_internal): Use
10116         ix86_output_function_return.
10117         (simple_return_internal_long): Likewise.
10118         * config/i386/i386.opt (mfunction-return=): New option.
10119         (indirect_branch): Mention -mfunction-return=.
10120         * doc/extend.texi: Document function_return function attribute.
10121         * doc/invoke.texi: Document -mfunction-return= option.
10123 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10125         * config/i386/i386-opts.h (indirect_branch): New.
10126         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10127         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10128         with local indirect jump when converting indirect call and jump.
10129         (ix86_set_indirect_branch_type): New.
10130         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10131         (indirectlabelno): New.
10132         (indirect_thunk_needed): Likewise.
10133         (indirect_thunk_bnd_needed): Likewise.
10134         (indirect_thunks_used): Likewise.
10135         (indirect_thunks_bnd_used): Likewise.
10136         (INDIRECT_LABEL): Likewise.
10137         (indirect_thunk_name): Likewise.
10138         (output_indirect_thunk): Likewise.
10139         (output_indirect_thunk_function): Likewise.
10140         (ix86_output_indirect_branch_via_reg): Likewise.
10141         (ix86_output_indirect_branch_via_push): Likewise.
10142         (ix86_output_indirect_branch): Likewise.
10143         (ix86_output_indirect_jmp): Likewise.
10144         (ix86_code_end): Call output_indirect_thunk_function if needed.
10145         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10146         needed.
10147         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10148         (ix86_attribute_table): Add indirect_branch.
10149         * config/i386/i386.h (machine_function): Add indirect_branch_type
10150         and has_local_indirect_jump.
10151         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10152         to true.
10153         (tablejump): Likewise.
10154         (*indirect_jump): Use ix86_output_indirect_jmp.
10155         (*tablejump_1): Likewise.
10156         (simple_return_indirect_internal): Likewise.
10157         * config/i386/i386.opt (mindirect-branch=): New option.
10158         (indirect_branch): New.
10159         (keep): Likewise.
10160         (thunk): Likewise.
10161         (thunk-inline): Likewise.
10162         (thunk-extern): Likewise.
10163         * doc/extend.texi: Document indirect_branch function attribute.
10164         * doc/invoke.texi: Document -mindirect-branch= option.
10166 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10168         PR ipa/83051
10169         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10171 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10173         * ipa-inline.c (want_inline_small_function_p): Return false if
10174         inlining has already failed with CIF_FINAL_ERROR.
10175         (update_caller_keys): Call want_inline_small_function_p before
10176         can_inline_edge_p.
10177         (update_callee_keys): Likewise.
10179 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10181         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10182         New function.
10183         (rs6000_quadword_masked_address_p): Likewise.
10184         (quad_aligned_load_p): Likewise.
10185         (quad_aligned_store_p): Likewise.
10186         (const_load_sequence_p): Add comment to describe the outer-most loop.
10187         (mimic_memory_attributes_and_flags): New function.
10188         (rs6000_gen_stvx): Likewise.
10189         (replace_swapped_aligned_store): Likewise.
10190         (rs6000_gen_lvx): Likewise.
10191         (replace_swapped_aligned_load): Likewise.
10192         (replace_swapped_load_constant): Capitalize argument name in
10193         comment describing this function.
10194         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10195         and stores that access quad-word aligned addresses and replace
10196         with stvx or lvx instructions when appropriate.
10197         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10198         New function prototype.
10199         (rs6000_quadword_masked_address_p): Likewise.
10200         (rs6000_gen_lvx): Likewise.
10201         (rs6000_gen_stvx): Likewise.
10202         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10203         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10204         when memory address is aligned.
10205         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10206         this split to select lvx instruction when memory address is aligned.
10207         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10208         instruction when memory address is aligned.
10209         (*vsx_le_perm_load_v16qi): Likewise.
10210         (four unnamed splitters): Modify to select the stvx instruction
10211         when memory is aligned.
10213 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10215         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10216         which appears in the queue multiple times.
10218 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10219             Alan Hayward  <alan.hayward@arm.com>
10220             David Sherwood  <david.sherwood@arm.com>
10222         * tree-vectorizer.h (vec_lower_bound): New structure.
10223         (_loop_vec_info): Add check_nonzero and lower_bounds.
10224         (LOOP_VINFO_CHECK_NONZERO): New macro.
10225         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10226         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10227         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10228         fields.  Make seg_len the distance travelled, not including the
10229         access size.
10230         (dr_direction_indicator): Declare.
10231         (dr_zero_step_indicator): Likewise.
10232         (dr_known_forward_stride_p): Likewise.
10233         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10234         tree-ssanames.h.
10235         (runtime_alias_check_p): Allow runtime alias checks with
10236         variable strides.
10237         (operator ==): Compare access_size and align.
10238         (prune_runtime_alias_test_list): Rework for new distinction between
10239         the access_size and seg_len.
10240         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10241         segment lengths.
10242         (get_segment_min_max): New function.
10243         (create_intersect_range_checks): Use it.
10244         (dr_step_indicator): New function.
10245         (dr_direction_indicator): Likewise.
10246         (dr_zero_step_indicator): Likewise.
10247         (dr_known_forward_stride_p): Likewise.
10248         * tree-loop-distribution.c (data_ref_segment_size): Return
10249         DR_STEP * (niters - 1).
10250         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10251         constructor.
10252         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10253         (vect_preserves_scalar_order_p): New function, split out from...
10254         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10255         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10256         (vect_vfa_access_size): New function.
10257         (vect_vfa_align): Likewise.
10258         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10259         (dump_lower_bound): New function.
10260         (vect_check_lower_bound): Likewise.
10261         (vect_small_gap_p): Likewise.
10262         (vectorizable_with_step_bound_p): Likewise.
10263         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10264         depencies if the vectorization factor is 1.  Convert the checks
10265         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10266         a bunds check for variable steps if the minimum required step is
10267         relatively small. Update calls to the dr_with_seg_len
10268         constructor and to vect_compile_time_alias.
10269         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10270         function.
10271         (vect_loop_versioning): Call it.
10272         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10273         when retrying.
10274         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10277             Alan Hayward  <alan.hayward@arm.com>
10278             David Sherwood  <david.sherwood@arm.com>
10280         * doc/sourcebuild.texi (vect_scatter_store): Document.
10281         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10282         optabs.
10283         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10284         Document.
10285         * genopinit.c (main): Add supports_vec_scatter_store and
10286         supports_vec_scatter_store_cached to target_optabs.
10287         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10288         IFN_MASK_SCATTER_STORE.
10289         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10290         functions.
10291         * internal-fn.h (internal_store_fn_p): Declare.
10292         (internal_fn_stored_value_index): Likewise.
10293         * internal-fn.c (scatter_store_direct): New macro.
10294         (expand_scatter_store_optab_fn): New function.
10295         (direct_scatter_store_optab_supported_p): New macro.
10296         (internal_store_fn_p): New function.
10297         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10298         IFN_MASK_SCATTER_STORE.
10299         (internal_fn_mask_index): Likewise.
10300         (internal_fn_stored_value_index): New function.
10301         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10302         for scatter stores.
10303         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10304         * optabs-query.c (supports_vec_scatter_store_p): New function.
10305         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10306         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10307         true for scatter stores.
10308         (vect_gather_scatter_fn_p): Handle scatter stores too.
10309         (vect_check_gather_scatter): Consider using scatter stores if
10310         supports_vec_scatter_store_p.
10311         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10312         scatter stores too.
10313         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10314         internal_fn_stored_value_index.
10315         (check_load_store_masking): Handle scatter stores too.
10316         (vect_get_store_rhs): Make public.
10317         (vectorizable_call): Use internal_store_fn_p.
10318         (vectorizable_store): Handle scatter store internal functions.
10319         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10320         when deciding whether the end of the group has been reached.
10321         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10322         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10323         (mask_scatter_store<mode>): New insns.
10325 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10326             Alan Hayward  <alan.hayward@arm.com>
10327             David Sherwood  <david.sherwood@arm.com>
10329         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10330         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10331         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10332         function.
10333         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10334         Use vect_truncate_gather_scatter_offset if we can't treat the
10335         operation as a normal gather load or scatter store.
10336         (get_group_load_store_type): Take the gather_scatter_info
10337         as argument.  Try using a gather load or scatter store for
10338         single-element groups.
10339         (get_load_store_type): Update calls to get_group_load_store_type
10340         and vect_use_strided_gather_scatters_p.
10342 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10343             Alan Hayward  <alan.hayward@arm.com>
10344             David Sherwood  <david.sherwood@arm.com>
10346         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10347         optional tree argument.
10348         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10349         null target hooks.
10350         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10351         but continue to use the current value as a fallback.
10352         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10353         to compare the updates.
10354         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10355         (get_load_store_type): Use it when handling a strided access.
10356         (vect_get_strided_load_store_ops): New function.
10357         (vect_get_data_ptr_increment): Likewise.
10358         (vectorizable_load): Handle strided gather loads.  Always pass
10359         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10361 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10362             Alan Hayward  <alan.hayward@arm.com>
10363             David Sherwood  <david.sherwood@arm.com>
10365         * doc/md.texi (gather_load@var{m}): Document.
10366         (mask_gather_load@var{m}): Likewise.
10367         * genopinit.c (main): Add supports_vec_gather_load and
10368         supports_vec_gather_load_cached to target_optabs.
10369         * optabs-tree.c (init_tree_optimization_optabs): Use
10370         ggc_cleared_alloc to allocate target_optabs.
10371         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10372         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10373         functions.
10374         * internal-fn.h (internal_load_fn_p): Declare.
10375         (internal_gather_scatter_fn_p): Likewise.
10376         (internal_fn_mask_index): Likewise.
10377         (internal_gather_scatter_fn_supported_p): Likewise.
10378         * internal-fn.c (gather_load_direct): New macro.
10379         (expand_gather_load_optab_fn): New function.
10380         (direct_gather_load_optab_supported_p): New macro.
10381         (direct_internal_fn_optab): New function.
10382         (internal_load_fn_p): Likewise.
10383         (internal_gather_scatter_fn_p): Likewise.
10384         (internal_fn_mask_index): Likewise.
10385         (internal_gather_scatter_fn_supported_p): Likewise.
10386         * optabs-query.c (supports_at_least_one_mode_p): New function.
10387         (supports_vec_gather_load_p): Likewise.
10388         * optabs-query.h (supports_vec_gather_load_p): Declare.
10389         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10390         and memory_type field.
10391         (NUM_PATTERNS): Bump to 15.
10392         * tree-vect-data-refs.c: Include internal-fn.h.
10393         (vect_gather_scatter_fn_p): New function.
10394         (vect_describe_gather_scatter_call): Likewise.
10395         (vect_check_gather_scatter): Try using internal functions for
10396         gather loads.  Recognize existing calls to a gather load function.
10397         (vect_analyze_data_refs): Consider using gather loads if
10398         supports_vec_gather_load_p.
10399         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10400         (vect_get_gather_scatter_offset_type): Likewise.
10401         (vect_convert_mask_for_vectype): Likewise.
10402         (vect_add_conversion_to_patterm): Likewise.
10403         (vect_try_gather_scatter_pattern): Likewise.
10404         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10405         (vect_vect_recog_func_ptrs): Add it.
10406         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10407         internal_fn_mask_index and internal_gather_scatter_fn_p.
10408         (check_load_store_masking): Take the gather_scatter_info as an
10409         argument and handle gather loads.
10410         (vect_get_gather_scatter_ops): New function.
10411         (vectorizable_call): Check internal_load_fn_p.
10412         (vectorizable_load): Likewise.  Handle gather load internal
10413         functions.
10414         (vectorizable_store): Update call to check_load_store_masking.
10415         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10416         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10417         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10418         (aarch64_gather_scale_operand_d): New predicates.
10419         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10420         (mask_gather_load<mode>): New insns.
10422 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10423             Alan Hayward  <alan.hayward@arm.com>
10424             David Sherwood  <david.sherwood@arm.com>
10426         * optabs.def (fold_left_plus_optab): New optab.
10427         * doc/md.texi (fold_left_plus_@var{m}): Document.
10428         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10429         * internal-fn.c (fold_left_direct): Define.
10430         (expand_fold_left_optab_fn): Likewise.
10431         (direct_fold_left_optab_supported_p): Likewise.
10432         * fold-const-call.c (fold_const_fold_left): New function.
10433         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10434         * tree-parloops.c (valid_reduction_p): New function.
10435         (gather_scalar_reductions): Use it.
10436         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10437         (vect_finish_replace_stmt): Declare.
10438         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10439         (needs_fold_left_reduction_p): New function, split out from...
10440         (vect_is_simple_reduction): ...here.  Accept reductions that
10441         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10442         (vect_force_simple_reduction): Also store the reduction type in
10443         the assignment's STMT_VINFO_REDUC_TYPE.
10444         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10445         (merge_with_identity): New function.
10446         (vect_expand_fold_left): Likewise.
10447         (vectorize_fold_left_reduction): Likewise.
10448         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10449         scalar phi in place for it.  Check for target support and reject
10450         cases that would reassociate the operation.  Defer the transform
10451         phase to vectorize_fold_left_reduction.
10452         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10453         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10454         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10456 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10458         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10459         call to ifc_temp_var.
10461 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10462             Alan Hayward  <alan.hayward@arm.com>
10463             David Sherwood  <david.sherwood@arm.com>
10465         * target.def (legitimize_address_displacement): Take the original
10466         offset as a poly_int.
10467         * targhooks.h (default_legitimize_address_displacement): Update
10468         accordingly.
10469         * targhooks.c (default_legitimize_address_displacement): Likewise.
10470         * doc/tm.texi: Regenerate.
10471         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10472         as an argument, moving assert of ad->disp == ad->disp_term to...
10473         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10474         Try calling targetm.legitimize_address_displacement before expanding
10475         the address rather than afterwards, and adjust for the new interface.
10476         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10477         Match the new hook interface.  Handle SVE addresses.
10478         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10479         new hook interface.
10481 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10483         * Makefile.in (OBJS): Add early-remat.o.
10484         * target.def (select_early_remat_modes): New hook.
10485         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10486         * doc/tm.texi: Regenerate.
10487         * targhooks.h (default_select_early_remat_modes): Declare.
10488         * targhooks.c (default_select_early_remat_modes): New function.
10489         * timevar.def (TV_EARLY_REMAT): New timevar.
10490         * passes.def (pass_early_remat): New pass.
10491         * tree-pass.h (make_pass_early_remat): Declare.
10492         * early-remat.c: New file.
10493         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10494         function.
10495         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10497 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10498             Alan Hayward  <alan.hayward@arm.com>
10499             David Sherwood  <david.sherwood@arm.com>
10501         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10502         vfm1 with a bound_epilog parameter.
10503         (vect_do_peeling): Update calls accordingly, and move the prologue
10504         call earlier in the function.  Treat the base bound_epilog as 0 for
10505         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10506         this base when peeling for gaps.
10507         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10508         with fully-masked loops.
10509         (vect_estimate_min_profitable_iters): Handle the single peeled
10510         iteration in that case.
10512 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10513             Alan Hayward  <alan.hayward@arm.com>
10514             David Sherwood  <david.sherwood@arm.com>
10516         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10517         single-element interleaving even if the size is not a power of 2.
10518         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10519         accesses for single-element interleaving if the group size is
10520         not a power of 2.
10522 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10523             Alan Hayward  <alan.hayward@arm.com>
10524             David Sherwood  <david.sherwood@arm.com>
10526         * doc/md.texi (fold_extract_last_@var{m}): Document.
10527         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10528         * optabs.def (fold_extract_last_optab): New optab.
10529         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10530         * internal-fn.c (fold_extract_direct): New macro.
10531         (expand_fold_extract_optab_fn): Likewise.
10532         (direct_fold_extract_optab_supported_p): Likewise.
10533         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10534         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10535         EXTRACT_LAST_REDUCTION.
10536         (get_initial_def_for_reduction): Do not create an initial vector
10537         for EXTRACT_LAST_REDUCTION reductions.
10538         (vectorizable_reduction): Leave the scalar phi in place for
10539         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10540         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10541         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10542         transform phase to vectorizable_condition.
10543         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10544         split out from...
10545         (vect_finish_stmt_generation): ...here.
10546         (vect_finish_replace_stmt): New function.
10547         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10548         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10549         pattern.
10550         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10552 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10553             Alan Hayward  <alan.hayward@arm.com>
10554             David Sherwood  <david.sherwood@arm.com>
10556         * doc/md.texi (extract_last_@var{m}): Document.
10557         * optabs.def (extract_last_optab): New optab.
10558         * internal-fn.def (EXTRACT_LAST): New internal function.
10559         * internal-fn.c (cond_unary_direct): New macro.
10560         (expand_cond_unary_optab_fn): Likewise.
10561         (direct_cond_unary_optab_supported_p): Likewise.
10562         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10563         loops using EXTRACT_LAST.
10564         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10565         (extract_last_<mode>): ...this optab.
10566         (vec_extract<mode><Vel>): Update accordingly.
10568 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10569             Alan Hayward  <alan.hayward@arm.com>
10570             David Sherwood  <david.sherwood@arm.com>
10572         * target.def (empty_mask_is_expensive): New hook.
10573         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10574         * doc/tm.texi: Regenerate.
10575         * targhooks.h (default_empty_mask_is_expensive): Declare.
10576         * targhooks.c (default_empty_mask_is_expensive): New function.
10577         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10578         if the target says that empty masks are expensive.
10579         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10580         New function.
10581         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10584             Alan Hayward  <alan.hayward@arm.com>
10585             David Sherwood  <david.sherwood@arm.com>
10587         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10588         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10589         (vect_use_loop_mask_for_alignment_p): New function.
10590         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10591         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10592         niters_skip argument.  Make sure that the first niters_skip elements
10593         of the first iteration are inactive.
10594         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10595         Update call to vect_set_loop_masks_directly.
10596         (get_misalign_in_elems): New function, split out from...
10597         (vect_gen_prolog_loop_niters): ...here.
10598         (vect_update_init_of_dr): Take a code argument that specifies whether
10599         the adjustment should be added or subtracted.
10600         (vect_update_init_of_drs): Likewise.
10601         (vect_prepare_for_masked_peels): New function.
10602         (vect_do_peeling): Skip prologue peeling if we're using a mask
10603         instead.  Update call to vect_update_inits_of_drs.
10604         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10605         mask_skip_niters.
10606         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10607         alignment.  Do not include the number of peeled iterations in
10608         the minimum threshold in that case.
10609         (vectorizable_induction): Adjust the start value down by
10610         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10611         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10612         Take the number of skipped iterations into account when calculating
10613         the loop bounds.
10614         * tree-vect-stmts.c (vect_gen_while_not): New function.
10616 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10617             Alan Hayward  <alan.hayward@arm.com>
10618             David Sherwood  <david.sherwood@arm.com>
10620         * doc/sourcebuild.texi (vect_fully_masked): Document.
10621         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10622         default value to 0.
10623         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10624         split out from...
10625         (vect_analyze_loop_2): ...here. Don't check the vectorization
10626         factor against the number of loop iterations if the loop is
10627         fully-masked.
10629 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10630             Alan Hayward  <alan.hayward@arm.com>
10631             David Sherwood  <david.sherwood@arm.com>
10633         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10634         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10635         (dump_groups): Update accordingly.
10636         (iv_use::mem_type): New member variable.
10637         (address_p): New function.
10638         (record_use): Add a mem_type argument and initialize the new
10639         mem_type field.
10640         (record_group_use): Add a mem_type argument.  Use address_p.
10641         Remove obsolete null checks of base_object.  Update call to record_use.
10642         (find_interesting_uses_op): Update call to record_group_use.
10643         (find_interesting_uses_cond): Likewise.
10644         (find_interesting_uses_address): Likewise.
10645         (get_mem_type_for_internal_fn): New function.
10646         (find_address_like_use): Likewise.
10647         (find_interesting_uses_stmt): Try find_address_like_use before
10648         calling find_interesting_uses_op.
10649         (addr_offset_valid_p): Use the iv mem_type field as the type
10650         of the addressed memory.
10651         (add_autoinc_candidates): Likewise.
10652         (get_address_cost): Likewise.
10653         (split_small_address_groups_p): Use address_p.
10654         (split_address_groups): Likewise.
10655         (add_iv_candidate_for_use): Likewise.
10656         (autoinc_possible_for_pair): Likewise.
10657         (rewrite_groups): Likewise.
10658         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10659         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10660         (get_alias_ptr_type_for_ptr_address): New function.
10661         (rewrite_use_address): Rewrite address uses in calls that were
10662         identified by find_address_like_use.
10664 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10665             Alan Hayward  <alan.hayward@arm.com>
10666             David Sherwood  <david.sherwood@arm.com>
10668         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10669         TARGET_MEM_REFs.
10670         * gimple-expr.h (is_gimple_addressable: Likewise.
10671         * gimple-expr.c (is_gimple_address): Likewise.
10672         * internal-fn.c (expand_call_mem_ref): New function.
10673         (expand_mask_load_optab_fn): Use it.
10674         (expand_mask_store_optab_fn): Likewise.
10676 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10677             Alan Hayward  <alan.hayward@arm.com>
10678             David Sherwood  <david.sherwood@arm.com>
10680         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10681         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10682         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10683         (cond_umax@var{mode}): Document.
10684         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10685         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10686         (cond_umin_optab, cond_umax_optab): New optabs.
10687         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10688         (COND_IOR, COND_XOR): New internal functions.
10689         * internal-fn.h (get_conditional_internal_fn): Declare.
10690         * internal-fn.c (cond_binary_direct): New macro.
10691         (expand_cond_binary_optab_fn): Likewise.
10692         (direct_cond_binary_optab_supported_p): Likewise.
10693         (get_conditional_internal_fn): New function.
10694         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10695         Cope with reduction statements that are vectorized as calls rather
10696         than assignments.
10697         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10698         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10699         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10700         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10701         (UNSPEC_COND_EOR): New unspecs.
10702         (optab): Add mappings for them.
10703         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10704         (sve_int_op, sve_fp_op): New int attributes.
10706 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10707             Alan Hayward  <alan.hayward@arm.com>
10708             David Sherwood  <david.sherwood@arm.com>
10710         * optabs.def (while_ult_optab): New optab.
10711         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10712         * internal-fn.def (WHILE_ULT): New internal function.
10713         * internal-fn.h (direct_internal_fn_supported_p): New override
10714         that takes two types as argument.
10715         * internal-fn.c (while_direct): New macro.
10716         (expand_while_optab_fn): New function.
10717         (convert_optab_supported_p): Likewise.
10718         (direct_while_optab_supported_p): New macro.
10719         * wide-int.h (wi::udiv_ceil): New function.
10720         * tree-vectorizer.h (rgroup_masks): New structure.
10721         (vec_loop_masks): New typedef.
10722         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10723         and fully_masked_p.
10724         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10725         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10726         (vect_max_vf): New function.
10727         (slpeel_make_loop_iterate_ntimes): Delete.
10728         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10729         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10730         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10731         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10732         internal-fn.h, stor-layout.h and optabs-query.h.
10733         (vect_set_loop_mask): New function.
10734         (add_preheader_seq): Likewise.
10735         (add_header_seq): Likewise.
10736         (interleave_supported_p): Likewise.
10737         (vect_maybe_permute_loop_masks): Likewise.
10738         (vect_set_loop_masks_directly): Likewise.
10739         (vect_set_loop_condition_masked): Likewise.
10740         (vect_set_loop_condition_unmasked): New function, split out from
10741         slpeel_make_loop_iterate_ntimes.
10742         (slpeel_make_loop_iterate_ntimes): Rename to..
10743         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10744         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10745         (vect_do_peeling): Update call accordingly.
10746         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10747         loops.
10748         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10749         mask_compare_type, can_fully_mask_p and fully_masked_p.
10750         (release_vec_loop_masks): New function.
10751         (_loop_vec_info): Use it to free the loop masks.
10752         (can_produce_all_loop_masks_p): New function.
10753         (vect_get_max_nscalars_per_iter): Likewise.
10754         (vect_verify_full_masking): Likewise.
10755         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10756         retries, and free the mask rgroups before retrying.  Check loop-wide
10757         reasons for disallowing fully-masked loops.  Make the final decision
10758         about whether use a fully-masked loop or not.
10759         (vect_estimate_min_profitable_iters): Do not assume that peeling
10760         for the number of iterations will be needed for fully-masked loops.
10761         (vectorizable_reduction): Disable fully-masked loops.
10762         (vectorizable_live_operation): Likewise.
10763         (vect_halve_mask_nunits): New function.
10764         (vect_double_mask_nunits): Likewise.
10765         (vect_record_loop_mask): Likewise.
10766         (vect_get_loop_mask): Likewise.
10767         (vect_transform_loop): Handle the case in which the final loop
10768         iteration might handle a partial vector.  Call vect_set_loop_condition
10769         instead of slpeel_make_loop_iterate_ntimes.
10770         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
10771         (check_load_store_masking): New function.
10772         (prepare_load_store_mask): Likewise.
10773         (vectorizable_store): Handle fully-masked loops.
10774         (vectorizable_load): Likewise.
10775         (supportable_widening_operation): Use vect_halve_mask_nunits for
10776         booleans.
10777         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
10778         (vect_gen_while): New function.
10779         * config/aarch64/aarch64.md (umax<mode>3): New expander.
10780         (aarch64_uqdec<mode>): New insn.
10782 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10783             Alan Hayward  <alan.hayward@arm.com>
10784             David Sherwood  <david.sherwood@arm.com>
10786         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
10787         (reduc_xor_scal_optab): New optabs.
10788         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
10789         (reduc_xor_scal_@var{m}): Document.
10790         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
10791         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
10792         internal functions.
10793         * fold-const-call.c (fold_const_call): Handle them.
10794         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
10795         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
10796         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
10797         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
10798         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
10799         (UNSPEC_XORV): New unspecs.
10800         (optab): Add entries for them.
10801         (BITWISEV): New int iterator.
10802         (bit_reduc_op): New int attributes.
10804 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10805             Alan Hayward  <alan.hayward@arm.com>
10806             David Sherwood  <david.sherwood@arm.com>
10808         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10809         * internal-fn.def (VEC_SHL_INSERT): New internal function.
10810         * optabs.def (vec_shl_insert_optab): New optab.
10811         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10812         (duplicate_and_interleave): Likewise.
10813         * tree-vect-loop.c: Include internal-fn.h.
10814         (neutral_op_for_slp_reduction): New function, split out from
10815         get_initial_defs_for_reduction.
10816         (get_initial_def_for_reduction): Handle option 2 for variable-length
10817         vectors by loading the neutral value into a vector and then shifting
10818         the initial value into element 0.
10819         (get_initial_defs_for_reduction): Replace the code argument with
10820         the neutral value calculated by neutral_op_for_slp_reduction.
10821         Use gimple_build_vector for constant-length vectors.
10822         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10823         but the first group_size elements have a neutral value.
10824         Use duplicate_and_interleave otherwise.
10825         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10826         Update call to get_initial_defs_for_reduction.  Handle SLP
10827         reductions for variable-length vectors by creating one vector
10828         result for each scalar result, with the elements associated
10829         with other scalar results stubbed out with the neutral value.
10830         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10831         Require IFN_VEC_SHL_INSERT for double reductions on
10832         variable-length vectors, or SLP reductions that have
10833         a neutral value.  Require can_duplicate_and_interleave_p
10834         support for variable-length unchained SLP reductions if there
10835         is no neutral value, such as for MIN/MAX reductions.  Also require
10836         the number of vector elements to be a multiple of the number of
10837         SLP statements when doing variable-length unchained SLP reductions.
10838         Update call to vect_create_epilog_for_reduction.
10839         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10840         and remove initial values.
10841         (duplicate_and_interleave): Make public.
10842         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10843         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10845 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10846             Alan Hayward  <alan.hayward@arm.com>
10847             David Sherwood  <david.sherwood@arm.com>
10849         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10850         (can_duplicate_and_interleave_p): New function.
10851         (vect_get_and_check_slp_defs): Take the vector of statements
10852         rather than just the current one.  Remove excess parentheses.
10853         Restriction rejectinon of vect_constant_def and vect_external_def
10854         for variable-length vectors to boolean types, or types for which
10855         can_duplicate_and_interleave_p is false.
10856         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10857         (duplicate_and_interleave): New function.
10858         (vect_get_constant_vectors): Use gimple_build_vector for
10859         constant-length vectors and suitable variable-length constant
10860         vectors.  Use duplicate_and_interleave for other variable-length
10861         vectors.  Don't defer the update when inserting new statements.
10863 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10864             Alan Hayward  <alan.hayward@arm.com>
10865             David Sherwood  <david.sherwood@arm.com>
10867         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10868         min_profitable_iters doesn't go negative.
10870 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10871             Alan Hayward  <alan.hayward@arm.com>
10872             David Sherwood  <david.sherwood@arm.com>
10874         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10875         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10876         * optabs.def (vec_mask_load_lanes_optab): New optab.
10877         (vec_mask_store_lanes_optab): Likewise.
10878         * internal-fn.def (MASK_LOAD_LANES): New internal function.
10879         (MASK_STORE_LANES): Likewise.
10880         * internal-fn.c (mask_load_lanes_direct): New macro.
10881         (mask_store_lanes_direct): Likewise.
10882         (expand_mask_load_optab_fn): Handle masked operations.
10883         (expand_mask_load_lanes_optab_fn): New macro.
10884         (expand_mask_store_optab_fn): Handle masked operations.
10885         (expand_mask_store_lanes_optab_fn): New macro.
10886         (direct_mask_load_lanes_optab_supported_p): Likewise.
10887         (direct_mask_store_lanes_optab_supported_p): Likewise.
10888         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10889         parameter.
10890         (vect_load_lanes_supported): Likewise.
10891         * tree-vect-data-refs.c (strip_conversion): New function.
10892         (can_group_stmts_p): Likewise.
10893         (vect_analyze_data_ref_accesses): Use it instead of checking
10894         for a pair of assignments.
10895         (vect_store_lanes_supported): Take a masked_p parameter.
10896         (vect_load_lanes_supported): Likewise.
10897         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10898         vect_store_lanes_supported and vect_load_lanes_supported.
10899         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10900         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10901         parameter.  Don't allow gaps for masked accesses.
10902         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
10903         and vect_load_lanes_supported.
10904         (get_load_store_type): Take a masked_p parameter and update
10905         call to get_group_load_store_type.
10906         (vectorizable_store): Update call to get_load_store_type.
10907         Handle IFN_MASK_STORE_LANES.
10908         (vectorizable_load): Update call to get_load_store_type.
10909         Handle IFN_MASK_LOAD_LANES.
10911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10912             Alan Hayward  <alan.hayward@arm.com>
10913             David Sherwood  <david.sherwood@arm.com>
10915         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10916         modes for SVE.
10917         * config/aarch64/aarch64-protos.h
10918         (aarch64_sve_struct_memory_operand_p): Declare.
10919         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10920         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10921         (VPRED, vpred): Handle SVE structure modes.
10922         * config/aarch64/constraints.md (Utx): New constraint.
10923         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10924         (aarch64_sve_struct_nonimmediate_operand): New predicates.
10925         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10926         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10927         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10928         structure modes.  Split into pieces after RA.
10929         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10930         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10931         New patterns.
10932         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10933         SVE structure modes.
10934         (aarch64_classify_address): Likewise.
10935         (sizetochar): Move earlier in file.
10936         (aarch64_print_operand): Handle SVE register lists.
10937         (aarch64_array_mode): New function.
10938         (aarch64_sve_struct_memory_operand_p): Likewise.
10939         (TARGET_ARRAY_MODE): Redefine.
10941 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10942             Alan Hayward  <alan.hayward@arm.com>
10943             David Sherwood  <david.sherwood@arm.com>
10945         * target.def (array_mode): New target hook.
10946         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10947         * doc/tm.texi: Regenerate.
10948         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10949         * hooks.c (hook_optmode_mode_uhwi_none): New function.
10950         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10951         targetm.array_mode.
10952         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
10953         type sizes.
10955 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10956             Alan Hayward  <alan.hayward@arm.com>
10957             David Sherwood  <david.sherwood@arm.com>
10959         * fold-const.c (fold_binary_loc): Check the argument types
10960         rather than the result type when testing for a vector operation.
10962 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10964         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10965         * doc/tm.texi: Regenerate.
10967 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10968             Alan Hayward  <alan.hayward@arm.com>
10969             David Sherwood  <david.sherwood@arm.com>
10971         * doc/invoke.texi (-msve-vector-bits=): Document new option.
10972         (sve): Document new AArch64 extension.
10973         * doc/md.texi (w): Extend the description of the AArch64
10974         constraint to include SVE vectors.
10975         (Upl, Upa): Document new AArch64 predicate constraints.
10976         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10977         enum.
10978         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10979         (msve-vector-bits=): New option.
10980         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10981         SVE when these are disabled.
10982         (sve): New extension.
10983         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10984         modes.  Adjust their number of units based on aarch64_sve_vg.
10985         (MAX_BITSIZE_MODE_ANY_MODE): Define.
10986         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10987         aarch64_addr_query_type.
10988         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10989         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10990         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10991         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10992         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10993         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10994         (aarch64_simd_imm_zero_p): Delete.
10995         (aarch64_check_zero_based_sve_index_immediate): Declare.
10996         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10997         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10998         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10999         (aarch64_sve_float_mul_immediate_p): Likewise.
11000         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11001         rather than an rtx.
11002         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11003         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11004         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11005         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11006         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11007         (aarch64_regmode_natural_size): Likewise.
11008         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11009         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11010         left one place.
11011         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11012         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11013         for VG and the SVE predicate registers.
11014         (V_ALIASES): Add a "z"-prefixed alias.
11015         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11016         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11017         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11018         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11019         (REG_CLASS_NAMES): Add entries for them.
11020         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11021         and the predicate registers.
11022         (aarch64_sve_vg): Declare.
11023         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11024         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11025         (REGMODE_NATURAL_SIZE): Define.
11026         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11027         SVE macros.
11028         * config/aarch64/aarch64.c: Include cfgrtl.h.
11029         (simd_immediate_info): Add a constructor for series vectors,
11030         and an associated step field.
11031         (aarch64_sve_vg): New variable.
11032         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11033         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11034         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11035         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11036         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11037         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11038         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11039         (aarch64_get_mask_mode): New functions.
11040         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11041         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11042         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11043         predicate modes and predicate registers.  Explicitly restrict
11044         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11045         to store a vector mode if it is recognized by
11046         aarch64_classify_vector_mode.
11047         (aarch64_regmode_natural_size): New function.
11048         (aarch64_hard_regno_caller_save_mode): Return the original mode
11049         for predicates.
11050         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11051         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11052         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11053         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11054         functions.
11055         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11056         does not overlap dest if the function is frame-related.  Handle
11057         SVE constants.
11058         (aarch64_split_add_offset): New function.
11059         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11060         them aarch64_add_offset.
11061         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11062         and update call to aarch64_sub_sp.
11063         (aarch64_add_cfa_expression): New function.
11064         (aarch64_expand_prologue): Pass extra temporary registers to the
11065         functions above.  Handle the case in which we need to emit new
11066         DW_CFA_expressions for registers that were originally saved
11067         relative to the stack pointer, but now have to be expressed
11068         relative to the frame pointer.
11069         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11070         functions above.
11071         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11072         IP0 and IP1 values for SVE frames.
11073         (aarch64_expand_vec_series): New function.
11074         (aarch64_expand_sve_widened_duplicate): Likewise.
11075         (aarch64_expand_sve_const_vector): Likewise.
11076         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11077         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11078         into the register, rather than emitting a SET directly.
11079         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11080         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11081         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11082         (offset_9bit_signed_scaled_p): New functions.
11083         (aarch64_replicate_bitmask_imm): New function.
11084         (aarch64_bitmask_imm): Use it.
11085         (aarch64_cannot_force_const_mem): Reject expressions involving
11086         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11087         (aarch64_classify_index): Handle SVE indices, by requiring
11088         a plain register index with a scale that matches the element size.
11089         (aarch64_classify_address): Handle SVE addresses.  Assert that
11090         the mode of the address is VOIDmode or an integer mode.
11091         Update call to aarch64_classify_symbol.
11092         (aarch64_classify_symbolic_expression): Update call to
11093         aarch64_classify_symbol.
11094         (aarch64_const_vec_all_in_range_p): New function.
11095         (aarch64_print_vector_float_operand): Likewise.
11096         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11097         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11098         and the FP immediates 1.0 and 0.5.
11099         (aarch64_print_address_internal): Handle SVE addresses.
11100         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11101         (aarch64_regno_regclass): Handle predicate registers.
11102         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11103         data modes.
11104         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11105         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11106         (aarch64_convert_sve_vector_bits): New function.
11107         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11108         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11109         rather than an rtx.
11110         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11111         Handle SVE vector and predicate modes.  Accept VL-based constants
11112         that need only one temporary register, and VL offsets that require
11113         no temporary registers.
11114         (aarch64_conditional_register_usage): Mark the predicate registers
11115         as fixed if SVE isn't available.
11116         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11117         Return true for SVE vector and predicate modes.
11118         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11119         rather than an unsigned int.  Handle SVE modes.
11120         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11121         SVE modes.
11122         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11123         if SVE is enabled.
11124         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11125         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11126         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11127         (aarch64_sve_float_mul_immediate_p): New functions.
11128         (aarch64_sve_valid_immediate): New function.
11129         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11130         Explicitly reject structure modes.  Check for INDEX constants.
11131         Handle PTRUE and PFALSE constants.
11132         (aarch64_check_zero_based_sve_index_immediate): New function.
11133         (aarch64_simd_imm_zero_p): Delete.
11134         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11135         vector modes.  Accept constants in the range of CNT[BHWD].
11136         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11137         ask for an Advanced SIMD mode.
11138         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11139         (aarch64_simd_vector_alignment): Handle SVE predicates.
11140         (aarch64_vectorize_preferred_vector_alignment): New function.
11141         (aarch64_simd_vector_alignment_reachable): Use it instead of
11142         the vector size.
11143         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11144         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11145         functions.
11146         (MAX_VECT_LEN): Delete.
11147         (expand_vec_perm_d): Add a vec_flags field.
11148         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11149         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11150         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11151         for SVE modes.
11152         (aarch64_evpc_rev): Rename to...
11153         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11154         (aarch64_evpc_rev_global): New function.
11155         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11156         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11157         MAX_VECT_LEN.
11158         (aarch64_evpc_sve_tbl): New function.
11159         (aarch64_expand_vec_perm_const_1): Update after rename of
11160         aarch64_evpc_rev.  Handle SVE permutes too, trying
11161         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11162         than aarch64_evpc_tbl.
11163         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11164         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11165         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11166         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11167         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11168         (aarch64_expand_sve_vcond): New functions.
11169         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11170         of aarch64_vector_mode_p.
11171         (aarch64_dwarf_poly_indeterminate_value): New function.
11172         (aarch64_compute_pressure_classes): Likewise.
11173         (aarch64_can_change_mode_class): Likewise.
11174         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11175         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11176         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11177         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11178         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11179         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11180         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11181         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11182         constraints.
11183         (Dn, Dl, Dr): Accept const as well as const_vector.
11184         (Dz): Likewise.  Compare against CONST0_RTX.
11185         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11186         of "vector" where appropriate.
11187         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11188         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11189         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11190         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11191         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11192         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11193         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11194         (v_int_equiv): Extend to SVE modes.
11195         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11196         mode attributes.
11197         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11198         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11199         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11200         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11201         (SVE_COND_FP_CMP): New int iterators.
11202         (perm_hilo): Handle the new unpack unspecs.
11203         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11204         attributes.
11205         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11206         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11207         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11208         (aarch64_equality_operator, aarch64_constant_vector_operand)
11209         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11210         (aarch64_sve_nonimmediate_operand): Likewise.
11211         (aarch64_sve_general_operand): Likewise.
11212         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11213         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11214         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11215         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11216         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11217         (aarch64_sve_float_arith_immediate): Likewise.
11218         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11219         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11220         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11221         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11222         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11223         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11224         (aarch64_sve_float_arith_operand): Likewise.
11225         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11226         (aarch64_sve_float_mul_operand): Likewise.
11227         (aarch64_sve_vec_perm_operand): Likewise.
11228         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11229         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11230         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11231         as well as const_vector.
11232         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11233         in file.  Use CONST0_RTX and CONSTM1_RTX.
11234         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11235         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11236         Use aarch64_simd_imm_zero.
11237         * config/aarch64/aarch64-sve.md: New file.
11238         * config/aarch64/aarch64.md: Include it.
11239         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11240         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11241         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11242         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11243         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11244         (sve): New attribute.
11245         (enabled): Disable instructions with the sve attribute unless
11246         TARGET_SVE.
11247         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11248         aarch64_expand_mov_immediate.
11249         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11250         CNT[BHSD] immediates.
11251         (movti): Split CONST_POLY_INT moves into two halves.
11252         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11253         Split additions that need a temporary here if the destination
11254         is the stack pointer.
11255         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11256         (*add<mode>3_poly_1): New instruction.
11257         (set_clobber_cc): New expander.
11259 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11261         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11262         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11263         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11264         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11265         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11266         Change innermode from fixed_mode_size to machine_mode.
11267         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11268         subreg of a variable-length CONST_VECTOR.
11270 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11271             Alan Hayward  <alan.hayward@arm.com>
11272             David Sherwood  <david.sherwood@arm.com>
11274         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11275         (add_offset_to_base): New function, split out from...
11276         (create_mem_ref): ...here.  When handling a scale other than 1,
11277         check first whether the address is valid without the offset.
11278         Add it into the base if so, leaving the index and scale as-is.
11280 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11282         PR c++/83778
11283         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11284         fold_for_warn before checking if arg2 is INTEGER_CST.
11286 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11288         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11289         (store_multiple_operation): Delete.
11290         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11291         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11292         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11293         guarded by TARGET_STRING.
11294         (rs6000_output_load_multiple): Delete.
11295         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11296         OPTION_MASK_STRING / TARGET_STRING handling.
11297         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11298         (const rs6000_opt_masks) <"string">: Change mask to 0.
11299         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11300         (MASK_STRING): Delete.
11301         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11302         parts.  Simplify.
11303         (load_multiple): Delete.
11304         (*ldmsi8): Delete.
11305         (*ldmsi7): Delete.
11306         (*ldmsi6): Delete.
11307         (*ldmsi5): Delete.
11308         (*ldmsi4): Delete.
11309         (*ldmsi3): Delete.
11310         (store_multiple): Delete.
11311         (*stmsi8): Delete.
11312         (*stmsi7): Delete.
11313         (*stmsi6): Delete.
11314         (*stmsi5): Delete.
11315         (*stmsi4): Delete.
11316         (*stmsi3): Delete.
11317         (movmemsi_8reg): Delete.
11318         (corresponding unnamed define_insn): Delete.
11319         (movmemsi_6reg): Delete.
11320         (corresponding unnamed define_insn): Delete.
11321         (movmemsi_4reg): Delete.
11322         (corresponding unnamed define_insn): Delete.
11323         (movmemsi_2reg): Delete.
11324         (corresponding unnamed define_insn): Delete.
11325         (movmemsi_1reg): Delete.
11326         (corresponding unnamed define_insn): Delete.
11327         * config/rs6000/rs6000.opt (mno-string): New.
11328         (mstring): Replace by deprecation warning stub.
11329         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11331 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11333         * regrename.c (regrename_do_replace): If replacing the same
11334         reg multiple times, try to reuse last created gen_raw_REG.
11336         PR debug/81155
11337         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11338         main to workaround a bug in GDB.
11340 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11342         PR target/83737
11343         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11345 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11347         PR rtl-optimization/80481
11348         * ira-color.c (get_cap_member): New function.
11349         (allocnos_conflict_by_live_ranges_p): Use it.
11350         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11351         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11353 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11355         PR target/83628
11356         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11357         (*saddl_se_1): Ditto.
11358         (*ssubsi_1): Ditto.
11359         (*ssubl_se_1): Ditto.
11361 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11363         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11364         rather than wi::to_widest for DR_INITs.
11365         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11366         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11367         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11368         INTEGER_CSTs.
11369         (vect_analyze_group_access_1): Note that here.
11371 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11373         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11374         polynomial type sizes.
11376 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11378         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11379         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11380         (gimple_add_tmp_var): Likewise.
11382 2018-01-12  Martin Liska  <mliska@suse.cz>
11384         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11385         (gimple_alloc_sizes): Likewise.
11386         (dump_gimple_statistics): Use PRIu64 in printf format.
11387         * gimple.h: Change uint64_t to int.
11389 2018-01-12  Martin Liska  <mliska@suse.cz>
11391         * tree-core.h: Use uint64_t instead of int.
11392         * tree.c (tree_node_counts): Likewise.
11393         (tree_node_sizes): Likewise.
11394         (dump_tree_statistics): Use PRIu64 in printf format.
11396 2018-01-12  Martin Liska  <mliska@suse.cz>
11398         * Makefile.in: As qsort_chk is implemented in vec.c, add
11399         vec.o to linkage of gencfn-macros.
11400         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11401         passing the info to record_node_allocation_statistics.
11402         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11403         and pass the info.
11404         * ggc-common.c (struct ggc_usage): Add operator== and use
11405         it in operator< and compare function.
11406         * mem-stats.h (struct mem_usage): Likewise.
11407         * vec.c (struct vec_usage): Remove operator< and compare
11408         function. Can be simply inherited.
11410 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11412         PR target/81616
11413         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11414         * tree-ssa-math-opts.c: Include domwalk.h.
11415         (convert_mult_to_fma_1): New function.
11416         (fma_transformation_info): New type.
11417         (fma_deferring_state): Likewise.
11418         (cancel_fma_deferring): New function.
11419         (result_of_phi): Likewise.
11420         (last_fma_candidate_feeds_initial_phi): Likewise.
11421         (convert_mult_to_fma): Added deferring logic, split actual
11422         transformation to convert_mult_to_fma_1.
11423         (math_opts_dom_walker): New type.
11424         (math_opts_dom_walker::after_dom_children): New method, body moved
11425         here from pass_optimize_widening_mul::execute, added deferring logic
11426         bits.
11427         (pass_optimize_widening_mul::execute): Moved most of code to
11428         math_opts_dom_walker::after_dom_children.
11429         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11430         * config/i386/i386.c (ix86_option_override_internal): Added
11431         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11433 2018-01-12  Richard Biener  <rguenther@suse.de>
11435         PR debug/83157
11436         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11437         inline instance vars.
11439 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11441         PR target/81819
11442         * config/rx/rx.c (rx_is_restricted_memory_address):
11443         Handle SUBREG case.
11445 2018-01-12  Richard Biener  <rguenther@suse.de>
11447         PR tree-optimization/80846
11448         * target.def (split_reduction): New target hook.
11449         * targhooks.c (default_split_reduction): New function.
11450         * targhooks.h (default_split_reduction): Declare.
11451         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11452         target requests first reduce vectors by combining low and high
11453         parts.
11454         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11455         (get_vectype_for_scalar_type_and_size): Export.
11456         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11457         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11458         * doc/tm.texi: Regenerate.
11459         * config/i386/i386.c (ix86_split_reduction): Implement
11460         TARGET_VECTORIZE_SPLIT_REDUCTION.
11462 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11464         PR target/83368
11465         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11466         in PIC mode except for TARGET_VXWORKS_RTP.
11467         * config/sparc/sparc.c: Include cfgrtl.h.
11468         (TARGET_INIT_PIC_REG): Define.
11469         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11470         (sparc_pic_register_p): New predicate.
11471         (sparc_legitimate_address_p): Use it.
11472         (sparc_legitimize_pic_address): Likewise.
11473         (sparc_delegitimize_address): Likewise.
11474         (sparc_mode_dependent_address_p): Likewise.
11475         (gen_load_pcrel_sym): Remove 4th parameter.
11476         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11477         (sparc_expand_prologue): Do not call load_got_register here.
11478         (sparc_flat_expand_prologue): Likewise.
11479         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11480         (sparc_use_pseudo_pic_reg): New function.
11481         (sparc_init_pic_reg): Likewise.
11482         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11483         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11485 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11487         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11488         Add item for branch_cost.
11490 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11492         PR rtl-optimization/83565
11493         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11494         not extend the result to a larger mode for rotate operations.
11495         (num_sign_bit_copies1): Likewise.
11497 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11499         PR target/40411
11500         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11501         -symbolic.
11502         Use values-Xc.o for -pedantic.
11503         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11505 2018-01-12  Martin Liska  <mliska@suse.cz>
11507         PR ipa/83054
11508         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11509         New function.
11510         (possible_polymorphic_call_targets): Use it.
11511         (ipa_devirt): Likewise.
11513 2018-01-12  Martin Liska  <mliska@suse.cz>
11515         * profile-count.h (enum profile_quality): Use 0 as invalid
11516         enum value of profile_quality.
11518 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11520         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11521         -mext-string options.
11523 2018-01-12  Richard Biener  <rguenther@suse.de>
11525         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11526         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11527         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11528         Likewise.
11529         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11531 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11533         * configure.ac (--with-long-double-format): Add support for the
11534         configuration option to change the default long double format on
11535         PowerPC systems.
11536         * config.gcc (powerpc*-linux*-*): Likewise.
11537         * configure: Regenerate.
11538         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11539         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11540         used without modification.
11542 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11544         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11545         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11546         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11547         MISC_BUILTIN_SPEC_BARRIER.
11548         (rs6000_init_builtins): Likewise.
11549         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11550         enum value.
11551         (speculation_barrier): New define_insn.
11552         * doc/extend.texi: Document __builtin_speculation_barrier.
11554 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11556         PR target/83203
11557         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11558         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11559         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11560         iterators.
11561         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11562         integral modes instead of "ss" and "sd".
11563         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11564         vectors with 32-bit and 64-bit elements.
11565         (vecdupssescalarmodesuffix): New mode attribute.
11566         (vec_dup<mode>): Use it.
11568 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11570         PR target/83330
11571         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11572         frame if argument is passed on stack.
11574 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11576         PR target/82682
11577         * ree.c (combine_reaching_defs): Optimize also
11578         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11579         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11581 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11583         PR middle-end/83189
11584         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11586 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11588         PR middle-end/83718
11589         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11590         after they are computed.
11592 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11594         PR tree-optimization/83695
11595         * gimple-loop-linterchange.cc
11596         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11597         reset cached scev information after interchange.
11598         (pass_linterchange::execute): Remove call to scev_reset_htab.
11600 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11602         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11603         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11604         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11605         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11606         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11607         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11608         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11609         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11610         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11611         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11612         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11613         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11614         (V_lane_reg): Likewise.
11615         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11616         New define_expand.
11617         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11618         (vfmal_lane_low<mode>_intrinsic,
11619         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11620         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11621         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11622         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11623         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11624         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11626 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11628         * config/arm/arm-cpus.in (fp16fml): New feature.
11629         (ALL_SIMD): Add fp16fml.
11630         (armv8.2-a): Add fp16fml as an option.
11631         (armv8.3-a): Likewise.
11632         (armv8.4-a): Add fp16fml as part of fp16.
11633         * config/arm/arm.h (TARGET_FP16FML): Define.
11634         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11635         when appropriate.
11636         * config/arm/arm-modes.def (V2HF): Define.
11637         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11638         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11639         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11640         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11641         vfmsl_low, vfmsl_high): New set of builtins.
11642         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11643         (vfml_op): New code attribute.
11644         (VFMLHALVES): New int iterator.
11645         (VFML, VFMLSEL): New mode attributes.
11646         (V_reg): Define mapping for V2HF.
11647         (V_hi, V_lo): New mode attributes.
11648         (VF_constraint): Likewise.
11649         (vfml_half, vfml_half_selector): New int attributes.
11650         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11651         define_expand.
11652         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11653         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11654         New define_insn.
11655         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11656         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11657         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11658         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11659         documentation.
11660         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11661         Document new effective target and option set.
11663 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11665         * config/arm/arm-cpus.in (armv8_4): New feature.
11666         (ARMv8_4a): New fgroup.
11667         (armv8.4-a): New arch.
11668         * config/arm/arm-tables.opt: Regenerate.
11669         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11670         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11671         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11672         Add matching rules for -march=armv8.4-a and extensions.
11673         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11675 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11677         PR target/81821
11678         * config/rx/rx.md (BW): New mode attribute.
11679         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11681 2018-01-11  Richard Biener  <rguenther@suse.de>
11683         PR tree-optimization/83435
11684         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11685         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11686         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11688 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11689             Alan Hayward  <alan.hayward@arm.com>
11690             David Sherwood  <david.sherwood@arm.com>
11692         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11693         field.
11694         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11695         (aarch64_print_address_internal): Use it to check for a zero offset.
11697 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11698             Alan Hayward  <alan.hayward@arm.com>
11699             David Sherwood  <david.sherwood@arm.com>
11701         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11702         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11703         Return a poly_int64 rather than a HOST_WIDE_INT.
11704         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11705         rather than a HOST_WIDE_INT.
11706         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11707         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11708         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11709         final_offset from HOST_WIDE_INT to poly_int64.
11710         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11711         to_constant when getting the number of units in an Advanced SIMD
11712         mode.
11713         (aarch64_builtin_vectorized_function): Check for a constant number
11714         of units.
11715         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11716         GET_MODE_SIZE.
11717         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11718         attribute instead of GET_MODE_NUNITS.
11719         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11720         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11721         GET_MODE_SIZE for fixed-size registers.
11722         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11723         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11724         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11725         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11726         (aarch64_print_operand, aarch64_print_address_internal)
11727         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11728         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11729         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11730         Handle polynomial GET_MODE_SIZE.
11731         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11732         wider than SImode without modification.
11733         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11734         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11735         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11736         passing and returning SVE modes.
11737         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11738         rather than GEN_INT.
11739         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11740         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11741         (aarch64_allocate_and_probe_stack_space): Likewise.
11742         (aarch64_layout_frame): Cope with polynomial offsets.
11743         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11744         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11745         polynomial offsets.
11746         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11747         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11748         poly_int64 rather than a HOST_WIDE_INT.
11749         (aarch64_get_separate_components, aarch64_process_components)
11750         (aarch64_expand_prologue, aarch64_expand_epilogue)
11751         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11752         (aarch64_anchor_offset): New function, split out from...
11753         (aarch64_legitimize_address): ...here.
11754         (aarch64_builtin_vectorization_cost): Handle polynomial
11755         TYPE_VECTOR_SUBPARTS.
11756         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11757         GET_MODE_NUNITS.
11758         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
11759         number of elements from the PARALLEL rather than the mode.
11760         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
11761         rather than GET_MODE_BITSIZE.
11762         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
11763         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
11764         (aarch64_expand_vec_perm_const_1): Handle polynomial
11765         d->perm.length () and d->perm elements.
11766         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
11767         Apply to_constant to d->perm elements.
11768         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
11769         polynomial CONST_VECTOR_NUNITS.
11770         (aarch64_move_pointer): Take amount as a poly_int64 rather
11771         than an int.
11772         (aarch64_progress_pointer): Avoid temporary variable.
11773         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
11774         the mode attribute instead of GET_MODE.
11776 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11777             Alan Hayward  <alan.hayward@arm.com>
11778             David Sherwood  <david.sherwood@arm.com>
11780         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
11781         x exists before using it.
11782         (aarch64_add_constant_internal): Rename to...
11783         (aarch64_add_offset_1): ...this.  Replace regnum with separate
11784         src and dest rtxes.  Handle the case in which they're different,
11785         including when the offset is zero.  Replace scratchreg with an rtx.
11786         Use 2 additions if there is no spare register into which we can
11787         move a 16-bit constant.
11788         (aarch64_add_constant): Delete.
11789         (aarch64_add_offset): Replace reg with separate src and dest
11790         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
11791         Use aarch64_add_offset_1.
11792         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
11793         an rtx rather than an int.  Take the delta as a poly_int64
11794         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
11795         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
11796         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
11797         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
11798         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
11799         and aarch64_add_sp.
11800         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
11801         aarch64_add_constant.
11803 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11805         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11806         Use scalar_float_mode.
11808 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11810         * config/aarch64/aarch64-simd.md
11811         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11812         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11813         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11814         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11815         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11816         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11817         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11818         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11819         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11820         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11822 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11824         PR target/83514
11825         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11826         targ_options->x_arm_arch_string is non NULL.
11828 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
11830         * config/aarch64/aarch64.h
11831         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
11833 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
11835         PR target/82096
11836         * expmed.c (emit_store_flag_force): Swap if const op0
11837         and change VOIDmode to mode of op0.
11839 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11841         PR rtl-optimization/83761
11842         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11843         than bytes to mode_for_size.
11845 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11847         PR middle-end/83189
11848         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11849         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11850         profile.
11852 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11854         PR middle-end/83575
11855         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11856         when in layout mode.
11857         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11858         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11859         partition fixup.
11861 2018-01-10  Michael Collison  <michael.collison@arm.com>
11863         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11864         * config/aarch64/aarch64-option-extension.def: Add
11865         AARCH64_OPT_EXTENSION of 'fp16fml'.
11866         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11867         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11868         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11869         * config/aarch64/constraints.md (Ui7): New constraint.
11870         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11871         (VFMLA_SEL_W): Ditto.
11872         (f16quad): Ditto.
11873         (f16mac1): Ditto.
11874         (VFMLA16_LOW): New int iterator.
11875         (VFMLA16_HIGH): Ditto.
11876         (UNSPEC_FMLAL): New unspec.
11877         (UNSPEC_FMLSL): Ditto.
11878         (UNSPEC_FMLAL2): Ditto.
11879         (UNSPEC_FMLSL2): Ditto.
11880         (f16mac): New code attribute.
11881         * config/aarch64/aarch64-simd-builtins.def
11882         (aarch64_fmlal_lowv2sf): Ditto.
11883         (aarch64_fmlsl_lowv2sf): Ditto.
11884         (aarch64_fmlalq_lowv4sf): Ditto.
11885         (aarch64_fmlslq_lowv4sf): Ditto.
11886         (aarch64_fmlal_highv2sf): Ditto.
11887         (aarch64_fmlsl_highv2sf): Ditto.
11888         (aarch64_fmlalq_highv4sf): Ditto.
11889         (aarch64_fmlslq_highv4sf): Ditto.
11890         (aarch64_fmlal_lane_lowv2sf): Ditto.
11891         (aarch64_fmlsl_lane_lowv2sf): Ditto.
11892         (aarch64_fmlal_laneq_lowv2sf): Ditto.
11893         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11894         (aarch64_fmlalq_lane_lowv4sf): Ditto.
11895         (aarch64_fmlsl_lane_lowv4sf): Ditto.
11896         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11897         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11898         (aarch64_fmlal_lane_highv2sf): Ditto.
11899         (aarch64_fmlsl_lane_highv2sf): Ditto.
11900         (aarch64_fmlal_laneq_highv2sf): Ditto.
11901         (aarch64_fmlsl_laneq_highv2sf): Ditto.
11902         (aarch64_fmlalq_lane_highv4sf): Ditto.
11903         (aarch64_fmlsl_lane_highv4sf): Ditto.
11904         (aarch64_fmlalq_laneq_highv4sf): Ditto.
11905         (aarch64_fmlsl_laneq_highv4sf): Ditto.
11906         * config/aarch64/aarch64-simd.md:
11907         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11908         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11909         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11910         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11911         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11912         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11913         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11914         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11915         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11916         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11917         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11918         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11919         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11920         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11921         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11922         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11923         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11924         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11925         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11926         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11927         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11928         (vfmlsl_low_u32): Ditto.
11929         (vfmlalq_low_u32): Ditto.
11930         (vfmlslq_low_u32): Ditto.
11931         (vfmlal_high_u32): Ditto.
11932         (vfmlsl_high_u32): Ditto.
11933         (vfmlalq_high_u32): Ditto.
11934         (vfmlslq_high_u32): Ditto.
11935         (vfmlal_lane_low_u32): Ditto.
11936         (vfmlsl_lane_low_u32): Ditto.
11937         (vfmlal_laneq_low_u32): Ditto.
11938         (vfmlsl_laneq_low_u32): Ditto.
11939         (vfmlalq_lane_low_u32): Ditto.
11940         (vfmlslq_lane_low_u32): Ditto.
11941         (vfmlalq_laneq_low_u32): Ditto.
11942         (vfmlslq_laneq_low_u32): Ditto.
11943         (vfmlal_lane_high_u32): Ditto.
11944         (vfmlsl_lane_high_u32): Ditto.
11945         (vfmlal_laneq_high_u32): Ditto.
11946         (vfmlsl_laneq_high_u32): Ditto.
11947         (vfmlalq_lane_high_u32): Ditto.
11948         (vfmlslq_lane_high_u32): Ditto.
11949         (vfmlalq_laneq_high_u32): Ditto.
11950         (vfmlslq_laneq_high_u32): Ditto.
11951         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11952         (AARCH64_FL_FOR_ARCH8_4): New.
11953         (AARCH64_ISA_F16FML): New ISA flag.
11954         (TARGET_F16FML): New feature flag for fp16fml.
11955         (doc/invoke.texi): Document new fp16fml option.
11957 2018-01-10  Michael Collison  <michael.collison@arm.com>
11959         * config/aarch64/aarch64-builtins.c:
11960         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11961         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11962         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11963         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11964         (AARCH64_ISA_SHA3): New ISA flag.
11965         (TARGET_SHA3): New feature flag for sha3.
11966         * config/aarch64/iterators.md (sha512_op): New int attribute.
11967         (CRYPTO_SHA512): New int iterator.
11968         (UNSPEC_SHA512H): New unspec.
11969         (UNSPEC_SHA512H2): Ditto.
11970         (UNSPEC_SHA512SU0): Ditto.
11971         (UNSPEC_SHA512SU1): Ditto.
11972         * config/aarch64/aarch64-simd-builtins.def
11973         (aarch64_crypto_sha512hqv2di): New builtin.
11974         (aarch64_crypto_sha512h2qv2di): Ditto.
11975         (aarch64_crypto_sha512su0qv2di): Ditto.
11976         (aarch64_crypto_sha512su1qv2di): Ditto.
11977         (aarch64_eor3qv8hi): Ditto.
11978         (aarch64_rax1qv2di): Ditto.
11979         (aarch64_xarqv2di): Ditto.
11980         (aarch64_bcaxqv8hi): Ditto.
11981         * config/aarch64/aarch64-simd.md:
11982         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11983         (aarch64_crypto_sha512su0qv2di): Ditto.
11984         (aarch64_crypto_sha512su1qv2di): Ditto.
11985         (aarch64_eor3qv8hi): Ditto.
11986         (aarch64_rax1qv2di): Ditto.
11987         (aarch64_xarqv2di): Ditto.
11988         (aarch64_bcaxqv8hi): Ditto.
11989         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11990         (vsha512h2q_u64): Ditto.
11991         (vsha512su0q_u64): Ditto.
11992         (vsha512su1q_u64): Ditto.
11993         (veor3q_u16): Ditto.
11994         (vrax1q_u64): Ditto.
11995         (vxarq_u64): Ditto.
11996         (vbcaxq_u16): Ditto.
11997         * config/arm/types.md (crypto_sha512): New type attribute.
11998         (crypto_sha3): Ditto.
11999         (doc/invoke.texi): Document new sha3 option.
12001 2018-01-10  Michael Collison  <michael.collison@arm.com>
12003         * config/aarch64/aarch64-builtins.c:
12004         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12005         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12006         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12007         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12008         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12009         (AARCH64_ISA_SM4): New ISA flag.
12010         (TARGET_SM4): New feature flag for sm4.
12011         * config/aarch64/aarch64-simd-builtins.def
12012         (aarch64_sm3ss1qv4si): Ditto.
12013         (aarch64_sm3tt1aq4si): Ditto.
12014         (aarch64_sm3tt1bq4si): Ditto.
12015         (aarch64_sm3tt2aq4si): Ditto.
12016         (aarch64_sm3tt2bq4si): Ditto.
12017         (aarch64_sm3partw1qv4si): Ditto.
12018         (aarch64_sm3partw2qv4si): Ditto.
12019         (aarch64_sm4eqv4si): Ditto.
12020         (aarch64_sm4ekeyqv4si): Ditto.
12021         * config/aarch64/aarch64-simd.md:
12022         (aarch64_sm3ss1qv4si): Ditto.
12023         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12024         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12025         (aarch64_sm4eqv4si): Ditto.
12026         (aarch64_sm4ekeyqv4si): Ditto.
12027         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12028         (sm3part_op): Ditto.
12029         (CRYPTO_SM3TT): Ditto.
12030         (CRYPTO_SM3PART): Ditto.
12031         (UNSPEC_SM3SS1): New unspec.
12032         (UNSPEC_SM3TT1A): Ditto.
12033         (UNSPEC_SM3TT1B): Ditto.
12034         (UNSPEC_SM3TT2A): Ditto.
12035         (UNSPEC_SM3TT2B): Ditto.
12036         (UNSPEC_SM3PARTW1): Ditto.
12037         (UNSPEC_SM3PARTW2): Ditto.
12038         (UNSPEC_SM4E): Ditto.
12039         (UNSPEC_SM4EKEY): Ditto.
12040         * config/aarch64/constraints.md (Ui2): New constraint.
12041         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12042         * config/arm/types.md (crypto_sm3): New type attribute.
12043         (crypto_sm4): Ditto.
12044         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12045         (vsm3tt1aq_u32): Ditto.
12046         (vsm3tt1bq_u32): Ditto.
12047         (vsm3tt2aq_u32): Ditto.
12048         (vsm3tt2bq_u32): Ditto.
12049         (vsm3partw1q_u32): Ditto.
12050         (vsm3partw2q_u32): Ditto.
12051         (vsm4eq_u32): Ditto.
12052         (vsm4ekeyq_u32): Ditto.
12053         (doc/invoke.texi): Document new sm4 option.
12055 2018-01-10  Michael Collison  <michael.collison@arm.com>
12057         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12058         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12059         (AARCH64_FL_FOR_ARCH8_4): New.
12060         (AARCH64_FL_V8_4): New flag.
12061         (doc/invoke.texi): Document new armv8.4-a option.
12063 2018-01-10  Michael Collison  <michael.collison@arm.com>
12065         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12066         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12067         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12068         * config/aarch64/aarch64-option-extension.def: Add
12069         AARCH64_OPT_EXTENSION of 'sha2'.
12070         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12071         (crypto): Disable sha2 and aes if crypto disabled.
12072         (crypto): Enable aes and sha2 if enabled.
12073         (simd): Disable sha2 and aes if simd disabled.
12074         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12075         New flags.
12076         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12077         (TARGET_SHA2): New feature flag for sha2.
12078         (TARGET_AES): New feature flag for aes.
12079         * config/aarch64/aarch64-simd.md:
12080         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12081         conditional on TARGET_AES.
12082         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12083         (aarch64_crypto_sha1hsi): Make pattern conditional
12084         on TARGET_SHA2.
12085         (aarch64_crypto_sha1hv4si): Ditto.
12086         (aarch64_be_crypto_sha1hv4si): Ditto.
12087         (aarch64_crypto_sha1su1v4si): Ditto.
12088         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12089         (aarch64_crypto_sha1su0v4si): Ditto.
12090         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12091         (aarch64_crypto_sha256su0v4si): Ditto.
12092         (aarch64_crypto_sha256su1v4si): Ditto.
12093         (doc/invoke.texi): Document new aes and sha2 options.
12095 2018-01-10  Martin Sebor  <msebor@redhat.com>
12097         PR tree-optimization/83781
12098         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12099         as string arrays.
12101 2018-01-11  Martin Sebor  <msebor@gmail.com>
12102             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12104         PR tree-optimization/83501
12105         PR tree-optimization/81703
12107         * tree-ssa-strlen.c (get_string_cst): Rename...
12108         (get_string_len): ...to this.  Handle global constants.
12109         (handle_char_store): Adjust.
12111 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12112             Jim Wilson  <jimw@sifive.com>
12114         * config/riscv/riscv-protos.h (riscv_output_return): New.
12115         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12116         (riscv_attribute_table, riscv_output_return),
12117         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12118         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12119         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12120         function.
12121         (riscv_expand_prologue): Add early return for naked function.
12122         (riscv_expand_epilogue): Likewise.
12123         (riscv_function_ok_for_sibcall): Return false for naked function.
12124         (riscv_set_current_function): New.
12125         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12126         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12127         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12128         * doc/extend.texi (RISC-V Function Attributes): New.
12130 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12132         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12133         check for 128-bit long double before checking TCmode.
12134         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12135         128-bit long doubles before checking TFmode or TCmode.
12136         (FLOAT128_IBM_P): Likewise.
12138 2018-01-10  Martin Sebor  <msebor@redhat.com>
12140         PR tree-optimization/83671
12141         * builtins.c (c_strlen): Unconditionally return zero for the empty
12142         string.
12143         Use -Warray-bounds for warnings.
12144         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12145         for non-constant array indices with COMPONENT_REF, arrays of
12146         arrays, and pointers to arrays.
12147         (gimple_fold_builtin_strlen): Determine and set length range for
12148         non-constant character arrays.
12150 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12152         PR middle-end/81897
12153         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12154         empty blocks.
12156 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12158         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12160 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12162         PR target/83399
12163         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12164         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12165         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12166         indexed_or_indirect_operand predicate.
12167         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12168         (*vsx_le_perm_load_v8hi): Likewise.
12169         (*vsx_le_perm_load_v16qi): Likewise.
12170         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12171         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12172         (*vsx_le_perm_store_v8hi): Likewise.
12173         (*vsx_le_perm_store_v16qi): Likewise.
12174         (eight unnamed splitters): Likewise.
12176 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12178         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12179         * config/rs6000/emmintrin.h: Likewise.
12180         * config/rs6000/mmintrin.h: Likewise.
12181         * config/rs6000/xmmintrin.h: Likewise.
12183 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12185         PR c++/43486
12186         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12187         "public_flag".
12188         * tree.c (tree_nop_conversion): Return true for location wrapper
12189         nodes.
12190         (maybe_wrap_with_location): New function.
12191         (selftest::check_strip_nops): New function.
12192         (selftest::test_location_wrappers): New function.
12193         (selftest::tree_c_tests): Call it.
12194         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12195         (maybe_wrap_with_location): New decl.
12196         (EXPR_LOCATION_WRAPPER_P): New macro.
12197         (location_wrapper_p): New inline function.
12198         (tree_strip_any_location_wrapper): New inline function.
12200 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12202         PR target/83735
12203         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12204         stack_realign_offset for the largest alignment of stack slot
12205         actually used.
12206         (ix86_find_max_used_stack_alignment): New function.
12207         (ix86_finalize_stack_frame_flags): Use it.  Set
12208         max_used_stack_alignment if we don't realign stack.
12209         * config/i386/i386.h (machine_function): Add
12210         max_used_stack_alignment.
12212 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12214         * config/arm/arm.opt (-mbranch-cost): New option.
12215         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12216         account.
12218 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12220         PR target/83629
12221         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12222         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12224 2018-01-10  Richard Biener  <rguenther@suse.de>
12226         PR debug/83765
12227         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12228         early out so it also covers the case where we have a non-NULL
12229         origin.
12231 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12233         PR tree-optimization/83753
12234         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12235         for non-strided grouped accesses if the number of elements is 1.
12237 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12239         PR target/81616
12240         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12241         * i386.h (TARGET_USE_GATHER): Define.
12242         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12244 2018-01-10  Martin Liska  <mliska@suse.cz>
12246         PR bootstrap/82831
12247         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12248         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12249         partitioning.
12250         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12251         CLEANUP_NO_PARTITIONING is not set.
12253 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12255         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12256         for vectors, as a partial revert of r254296.
12257         * rtl.h (const_vec_p): Delete.
12258         (const_vec_duplicate_p): Don't test for vector CONSTs.
12259         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12260         * expmed.c (make_tree): Likewise.
12262         Revert:
12263         * common.md (E, F): Use CONSTANT_P instead of checking for
12264         CONST_VECTOR.
12265         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12266         checking for CONST_VECTOR.
12268 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12270         PR middle-end/83575
12271         * predict.c (force_edge_cold): Handle in more sane way edges
12272         with no prediction.
12274 2018-01-09  Carl Love  <cel@us.ibm.com>
12276         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12277         V4SI, V4SF types.
12278         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12279         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12280         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12281         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12282         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12283         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12284         * config/rs6000/rs6000-protos.h: Add extern defition for
12285         rs6000_generate_float2_double_code.
12286         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12287         function.
12288         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12289         (float2_v2df): Add define_expand.
12291 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12293         PR target/83628
12294         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12295         op_mode in the force_to_mode call.
12297 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12299         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12300         instead of checking each element individually.
12301         (aarch64_evpc_uzp): Likewise.
12302         (aarch64_evpc_zip): Likewise.
12303         (aarch64_evpc_ext): Likewise.
12304         (aarch64_evpc_rev): Likewise.
12305         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12306         instead of checking each element individually.  Return true without
12307         generating rtl if
12308         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12309         whether all selected elements come from the same input, instead of
12310         checking each element individually.  Remove calls to gen_rtx_REG,
12311         start_sequence and end_sequence and instead assert that no rtl is
12312         generated.
12314 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12316         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12317         order of HIGH and CONST checks.
12319 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12321         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12322         if the destination isn't an SSA_NAME.
12324 2018-01-09  Richard Biener  <rguenther@suse.de>
12326         PR tree-optimization/83668
12327         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12328         move prologue...
12329         (canonicalize_loop_form): ... here, renamed from ...
12330         (canonicalize_loop_closed_ssa_form): ... this and amended to
12331         swap successor edges for loop exit blocks to make us use
12332         the RPO order we need for initial schedule generation.
12334 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12336         PR tree-optimization/64811
12337         * match.pd: When optimizing comparisons with Inf, avoid
12338         introducing or losing exceptions from comparisons with NaN.
12340 2018-01-09  Martin Liska  <mliska@suse.cz>
12342         PR sanitizer/82517
12343         * asan.c (shadow_mem_size): Add gcc_assert.
12345 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12347         Don't save registers in main().
12349         PR target/83738
12350         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12351         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12352         * config/avr/avr.c (avr_set_current_function): Don't error if
12353         naked, OS_task or OS_main are specified at the same time.
12354         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12355         OS_main.
12356         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12357         attribute.
12358         * common/config/avr/avr-common.c (avr_option_optimization_table):
12359         Switch on -mmain-is-OS_task for optimizing compilations.
12361 2018-01-09  Richard Biener  <rguenther@suse.de>
12363         PR tree-optimization/83572
12364         * graphite.c: Include cfganal.h.
12365         (graphite_transform_loops): Connect infinite loops to exit
12366         and remove fake edges at the end.
12368 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12370         * ipa-inline.c (edge_badness): Revert accidental checkin.
12372 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12374         PR ipa/80763
12375         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12376         symbols; not inline clones.
12378 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12380         PR target/83507
12381         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12382         hard registers.  Formatting fixes.
12384         PR preprocessor/83722
12385         * gcc.c (try_generate_repro): Pass
12386         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12387         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12388         do_report_bug.
12390 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12391             Kito Cheng  <kito.cheng@gmail.com>
12393         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12394         (riscv_leaf_function_p): Delete.
12395         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12397 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12399         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12400         function.
12401         (do_ifelse): New function.
12402         (do_isel): New function.
12403         (do_sub3): New function.
12404         (do_add3): New function.
12405         (do_load_mask_compare): New function.
12406         (do_overlap_load_compare): New function.
12407         (expand_compare_loop): New function.
12408         (expand_block_compare): Call expand_compare_loop() when appropriate.
12409         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12410         option description.
12411         (-mblock-compare-inline-loop-limit): New option.
12413 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12415         PR target/83677
12416         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12417         Reverse order of second and third operands in first alternative.
12418         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12419         of first and second elements in UNSPEC_VPERMR vector.
12420         (altivec_expand_vec_perm_le): Likewise.
12422 2018-01-08  Jeff Law  <law@redhat.com>
12424         PR rtl-optimizatin/81308
12425         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12426         (process_switch): If group_case_labels makes a change, then set
12427         cfg_altered.
12428         (pass_convert_switch::execute): If a switch is converted, then
12429         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12431         PR rtl-optimization/81308
12432         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12433         splitting insns.
12435 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12437         PR target/83663 - Revert r255946
12438         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12439         generation for cases where splatting a value is not useful.
12440         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12441         across a vec_duplicate and a paradoxical subreg forming a vector
12442         mode to a vec_concat.
12444 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12446         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12447         -march=armv8.3-a variants.
12448         * config/arm/t-multilib: Likewise.
12449         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12451 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12453         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12454         to generate rtl.
12455         (cceq_ior_compare_complement): Give it a name so I can use it, and
12456         change boolean_or_operator predicate to boolean_operator so it can
12457         be used to generate a crand.
12458         (eqne): New code iterator.
12459         (bd/bd_neg): New code_attrs.
12460         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12461         a single define_insn.
12462         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12463         decrement (bdnzt/bdnzf/bdzt/bdzf).
12464         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12465         with the new names of the branch decrement patterns, and added the
12466         names of the branch decrement conditional patterns.
12468 2018-01-08  Richard Biener  <rguenther@suse.de>
12470         PR tree-optimization/83563
12471         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12472         cache.
12474 2018-01-08  Richard Biener  <rguenther@suse.de>
12476         PR middle-end/83713
12477         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12479 2018-01-08  Richard Biener  <rguenther@suse.de>
12481         PR tree-optimization/83685
12482         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12483         references to abnormals.
12485 2018-01-08  Richard Biener  <rguenther@suse.de>
12487         PR lto/83719
12488         * dwarf2out.c (output_indirect_strings): Handle empty
12489         skeleton_debug_str_hash.
12490         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12492 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12494         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12495         (emit_store_direct): Likewise.
12496         (arc_trampoline_adjust_address): Likewise.
12497         (arc_asm_trampoline_template): New function.
12498         (arc_initialize_trampoline): Use asm_trampoline_template.
12499         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12500         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12501         * config/arc/arc.md (flush_icache): Delete pattern.
12503 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12505         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12506         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12507         munaligned-access.
12509 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12511         PR target/83681
12512         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12513         by not USED_FOR_TARGET.
12514         (make_pass_resolve_sw_modes): Likewise.
12516 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12518         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12519         USED_FOR_TARGET.
12521 2018-01-08  Richard Biener  <rguenther@suse.de>
12523         PR middle-end/83580
12524         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12526 2018-01-08  Richard Biener  <rguenther@suse.de>
12528         PR middle-end/83517
12529         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12531 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12533         PR middle-end/81897
12534         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12535         basic blocks with a small number of successors.
12536         (convert_control_dep_chain_into_preds): Improve handling of
12537         forwarder blocks.
12538         (dump_predicates): Split apart into...
12539         (dump_pred_chain): ...here...
12540         (dump_pred_info): ...and here.
12541         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12542         (can_chain_union_be_invalidated_p): Improve check for invalidation
12543         of paths.
12544         (uninit_uses_cannot_happen): Avoid unnecessary if
12545         convert_control_dep_chain_into_preds yielded nothing.
12547 2018-01-06  Martin Sebor  <msebor@redhat.com>
12549         PR tree-optimization/83640
12550         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12551         subtracting negative offset from size.
12552         (builtin_access::overlap): Adjust offset bounds of the access to fall
12553         within the size of the object if possible.
12555 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12557         PR rtl-optimization/83699
12558         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12559         extract_bit_field_as_subreg to cases in which the extracted
12560         value is also a vector.
12562         * lra-constraints.c (process_alt_operands): Test for the equivalence
12563         substitutions when detecting a possible reload cycle.
12565 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12567         PR debug/83480
12568         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12569         by default if flag_selective_schedling{,2}.  Formatting fixes.
12571         PR rtl-optimization/83682
12572         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12573         if it has non-VECTOR_MODE element mode.
12574         (vec_duplicate_p): Likewise.
12576         PR middle-end/83694
12577         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12578         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12580 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12582         PR target/83604
12583         * config/i386/i386-builtin.def
12584         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12585         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12586         Require also OPTION_MASK_ISA_AVX512F in addition to
12587         OPTION_MASK_ISA_GFNI.
12588         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12589         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12590         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12591         to OPTION_MASK_ISA_GFNI.
12592         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12593         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12594         OPTION_MASK_ISA_AVX512BW.
12595         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12596         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12597         addition to OPTION_MASK_ISA_GFNI.
12598         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12599         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12600         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12601         to OPTION_MASK_ISA_GFNI.
12602         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12603         a requirement for all ISAs rather than any of them with a few
12604         exceptions.
12605         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12606         processing.
12607         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12608         bitmasks to be enabled with 3 exceptions, instead of requiring any
12609         enabled ISA with lots of exceptions.
12610         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12611         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12612         Change avx512bw in isa attribute to avx512f.
12613         * config/i386/sgxintrin.h: Add license boilerplate.
12614         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12615         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12616         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12617         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12618         defined.
12619         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12620         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12621         temporarily sse2 rather than sse if not enabled already.
12623         PR target/83604
12624         * config/i386/sse.md (VI248_VLBW): Rename to ...
12625         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12626         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12627         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12628         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12629         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12630         mode iterator instead of VI248_VLBW.
12632 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12634         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12635         (record_modified): Skip clobbers; add debug output.
12636         (param_change_prob): Use sreal frequencies.
12638 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12640         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12641         punt for user-aligned variables.
12643 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12645         * tree-chrec.c (chrec_contains_symbols): Return true for
12646         POLY_INT_CST.
12648 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12650         PR target/82439
12651         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12652         of (x|y) == x for BICS pattern.
12654 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12656         PR tree-optimization/83605
12657         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12658         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12659         can throw.
12661 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12663         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12664         * config/epiphany/rtems.h: New file.
12666 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12667             Uros Bizjak  <ubizjak@gmail.com>
12669         PR target/83554
12670         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12671         QIreg_operand instead of register_operand predicate.
12672         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12673         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12674         comments instead of -fmitigate[-_]rop.
12676 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12678         PR bootstrap/81926
12679         * cgraphunit.c (symbol_table::compile): Switch to text_section
12680         before calling assembly_start debug hook.
12681         * run-rtl-passes.c (run_rtl_passes): Likewise.
12682         Include output.h.
12684 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12686         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12687         range_int_cst_p rather than !symbolic_range_p before calling
12688         extract_range_from_multiplicative_op_1.
12690 2018-01-04  Jeff Law  <law@redhat.com>
12692         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12693         redundant test in assertion.
12695 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12697         * doc/rtl.texi: Document machine_mode wrapper classes.
12699 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12701         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12702         using tree_to_uhwi.
12704 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12706         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12707         the VEC_PERM_EXPR fold to fail.
12709 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12711         PR debug/83585
12712         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12713         to switched_sections.
12715 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12717         PR target/83680
12718         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12719         test for d.testing.
12721 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12723         PR target/83387
12724         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12725         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12727 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12729         PR debug/83666
12730         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12731         is BLKmode and bitpos not zero or mode change is needed.
12733 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12735         PR target/83675
12736         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12737         TARGET_VIS2.
12739 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12741         PR target/83628
12742         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12743         instead of MULT rtx.  Update all corresponding splitters.
12744         (*saddl_se): Ditto.
12745         (*ssub<modesuffix>): Ditto.
12746         (*ssubl_se): Ditto.
12747         (*cmp_sadd_di): Update split patterns.
12748         (*cmp_sadd_si): Ditto.
12749         (*cmp_sadd_sidi): Ditto.
12750         (*cmp_ssub_di): Ditto.
12751         (*cmp_ssub_si): Ditto.
12752         (*cmp_ssub_sidi): Ditto.
12753         * config/alpha/predicates.md (const23_operand): New predicate.
12754         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12755         Look for ASHIFT, not MULT inner operand.
12756         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
12758 2018-01-04  Martin Liska  <mliska@suse.cz>
12760         PR gcov-profile/83669
12761         * gcov.c (output_intermediate_file): Add version to intermediate
12762         gcov file.
12763         * doc/gcov.texi: Document new field 'version' in intermediate
12764         file format. Fix location of '-k' option of gcov command.
12766 2018-01-04  Martin Liska  <mliska@suse.cz>
12768         PR ipa/82352
12769         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
12771 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12773         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
12775 2018-01-03  Martin Sebor  <msebor@redhat.com>
12777         PR tree-optimization/83655
12778         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
12779         checking calls with invalid arguments.
12781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12783         * tree-vect-stmts.c (vect_get_store_rhs): New function.
12784         (vectorizable_mask_load_store): Delete.
12785         (vectorizable_call): Return false for masked loads and stores.
12786         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
12787         instead of gimple_assign_rhs1.
12788         (vectorizable_load): Handle IFN_MASK_LOAD.
12789         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
12791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12793         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
12794         split out from..,
12795         (vectorizable_mask_load_store): ...here.
12796         (vectorizable_load): ...and here.
12798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12800         * tree-vect-stmts.c (vect_build_all_ones_mask)
12801         (vect_build_zero_merge_argument): New functions, split out from...
12802         (vectorizable_load): ...here.
12804 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12806         * tree-vect-stmts.c (vect_check_store_rhs): New function,
12807         split out from...
12808         (vectorizable_mask_load_store): ...here.
12809         (vectorizable_store): ...and here.
12811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12813         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12814         split out from...
12815         (vectorizable_mask_load_store): ...here.
12817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12819         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12820         (vect_model_store_cost): Take a vec_load_store_type instead of a
12821         vect_def_type.
12822         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12823         (vect_model_store_cost): Take a vec_load_store_type instead of a
12824         vect_def_type.
12825         (vectorizable_mask_load_store): Update accordingly.
12826         (vectorizable_store): Likewise.
12827         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12829 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12831         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12832         IFN_MASK_LOAD calls here rather than...
12833         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12835 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12836             Alan Hayward  <alan.hayward@arm.com>
12837             David Sherwood  <david.sherwood@arm.com>
12839         * expmed.c (extract_bit_field_1): For vector extracts,
12840         fall back to extract_bit_field_as_subreg if vec_extract
12841         isn't available.
12843 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12844             Alan Hayward  <alan.hayward@arm.com>
12845             David Sherwood  <david.sherwood@arm.com>
12847         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12848         they are variable or constant sized.
12849         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12850         slots for constant-sized data.
12852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12853             Alan Hayward  <alan.hayward@arm.com>
12854             David Sherwood  <david.sherwood@arm.com>
12856         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12857         handling COND_EXPRs with boolean comparisons, try to find a better
12858         basis for the mask type than the boolean itself.
12860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12862         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12863         is calculated and how it can be overridden.
12864         * genmodes.c (max_bitsize_mode_any_mode): New variable.
12865         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12866         if defined.
12867         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12868         if nonzero.
12870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12871             Alan Hayward  <alan.hayward@arm.com>
12872             David Sherwood  <david.sherwood@arm.com>
12874         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12875         Remove the mode argument.
12876         (aarch64_simd_valid_immediate): Remove the mode and inverse
12877         arguments.
12878         * config/aarch64/iterators.md (bitsize): New iterator.
12879         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12880         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12881         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12882         aarch64_simd_valid_immediate.
12883         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12884         (aarch64_reg_or_bic_imm): Likewise.
12885         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12886         with an insn_type enum and msl with a modifier_type enum.
12887         Replace element_width with a scalar_mode.  Change the shift
12888         to unsigned int.  Add constructors for scalar_float_mode and
12889         scalar_int_mode elements.
12890         (aarch64_vect_float_const_representable_p): Delete.
12891         (aarch64_can_const_movi_rtx_p)
12892         (aarch64_simd_scalar_immediate_valid_for_move)
12893         (aarch64_simd_make_constant): Update call to
12894         aarch64_simd_valid_immediate.
12895         (aarch64_advsimd_valid_immediate_hs): New function.
12896         (aarch64_advsimd_valid_immediate): Likewise.
12897         (aarch64_simd_valid_immediate): Remove mode and inverse
12898         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
12899         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12900         and aarch64_float_const_representable_p on the result.
12901         (aarch64_output_simd_mov_immediate): Remove mode argument.
12902         Update call to aarch64_simd_valid_immediate and use of
12903         simd_immediate_info.
12904         (aarch64_output_scalar_simd_mov_immediate): Update call
12905         accordingly.
12907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12908             Alan Hayward  <alan.hayward@arm.com>
12909             David Sherwood  <david.sherwood@arm.com>
12911         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12912         (mode_nunits): Likewise CONST_MODE_NUNITS.
12913         * machmode.def (ADJUST_NUNITS): Document.
12914         * genmodes.c (mode_data::need_nunits_adj): New field.
12915         (blank_mode): Update accordingly.
12916         (adj_nunits): New variable.
12917         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12918         parameter.
12919         (emit_mode_size_inline): Set need_bytesize_adj for all modes
12920         listed in adj_nunits.
12921         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12922         listed in adj_nunits.  Don't emit case statements for such modes.
12923         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12924         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
12925         nothing if adj_nunits is nonnull.
12926         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12927         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12928         (emit_mode_fbit): Update use of print_maybe_const_decl.
12929         (emit_move_size): Likewise.  Treat the array as non-const
12930         if adj_nunits.
12931         (emit_mode_adjustments): Handle adj_nunits.
12933 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12935         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12936         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12937         (VECTOR_MODES): Use it.
12938         (make_vector_modes): Take the prefix as an argument.
12940 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12941             Alan Hayward  <alan.hayward@arm.com>
12942             David Sherwood  <david.sherwood@arm.com>
12944         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12945         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12946         for MODE_VECTOR_BOOL.
12947         * machmode.def (VECTOR_BOOL_MODE): Document.
12948         * genmodes.c (VECTOR_BOOL_MODE): New macro.
12949         (make_vector_bool_mode): New function.
12950         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12951         MODE_VECTOR_BOOL.
12952         * lto-streamer-in.c (lto_input_mode_table): Likewise.
12953         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12954         Likewise.
12955         * stor-layout.c (int_mode_for_mode): Likewise.
12956         * tree.c (build_vector_type_for_mode): Likewise.
12957         * varasm.c (output_constant_pool_2): Likewise.
12958         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12959         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
12960         for MODE_VECTOR_BOOL.
12961         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12962         of mode class checks.
12963         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12964         instead of a list of mode class checks.
12965         (expand_vector_scalar_condition): Likewise.
12966         (type_for_widest_vector_mode): Handle BImode as an inner mode.
12968 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12969             Alan Hayward  <alan.hayward@arm.com>
12970             David Sherwood  <david.sherwood@arm.com>
12972         * machmode.h (mode_size): Change from unsigned short to
12973         poly_uint16_pod.
12974         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12975         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12976         or if measurement_type is not polynomial.
12977         (fixed_size_mode::includes_p): Check for constant-sized modes.
12978         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12979         return a poly_uint16 rather than an unsigned short.
12980         (emit_mode_size): Change the type of mode_size from unsigned short
12981         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
12982         (emit_mode_adjustments): Cope with polynomial vector sizes.
12983         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12984         for GET_MODE_SIZE.
12985         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12986         for GET_MODE_SIZE.
12987         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12988         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12989         * caller-save.c (setup_save_areas): Likewise.
12990         (replace_reg_with_saved_mem): Likewise.
12991         * calls.c (emit_library_call_value_1): Likewise.
12992         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12993         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12994         (gen_lowpart_for_combine): Likewise.
12995         * convert.c (convert_to_integer_1): Likewise.
12996         * cse.c (equiv_constant, cse_insn): Likewise.
12997         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
12998         (cselib_subst_to_values): Likewise.
12999         * dce.c (word_dce_process_block): Likewise.
13000         * df-problems.c (df_word_lr_mark_ref): Likewise.
13001         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13002         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13003         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13004         (rtl_for_decl_location): Likewise.
13005         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13006         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13007         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13008         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13009         (expand_expr_real_1): Likewise.
13010         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13011         (pad_below): Likewise.
13012         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13013         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13014         * ira.c (get_subreg_tracking_sizes): Likewise.
13015         * ira-build.c (ira_create_allocno_objects): Likewise.
13016         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13017         (ira_sort_regnos_for_alter_reg): Likewise.
13018         * ira-costs.c (record_operand_costs): Likewise.
13019         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13020         (resolve_simple_move): Likewise.
13021         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13022         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13023         (lra_constraints): Likewise.
13024         (CONST_POOL_OK_P): Reject variable-sized modes.
13025         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13026         (add_pseudo_to_slot, lra_spill): Likewise.
13027         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13028         * optabs-query.c (get_best_extraction_insn): Likewise.
13029         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13030         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13031         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13032         * recog.c (offsettable_address_addr_space_p): Likewise.
13033         * regcprop.c (maybe_mode_change): Likewise.
13034         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13035         * regrename.c (build_def_use): Likewise.
13036         * regstat.c (dump_reg_info): Likewise.
13037         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13038         (find_reloads, find_reloads_subreg_address): Likewise.
13039         * reload1.c (eliminate_regs_1): Likewise.
13040         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13041         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13042         (simplify_binary_operation_1, simplify_subreg): Likewise.
13043         * targhooks.c (default_function_arg_padding): Likewise.
13044         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13045         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13046         (verify_gimple_assign_ternary): Likewise.
13047         * tree-inline.c (estimate_move_cost): Likewise.
13048         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13049         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13050         (get_address_cost_ainc): Likewise.
13051         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13052         (vect_supportable_dr_alignment): Likewise.
13053         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13054         (vectorizable_reduction): Likewise.
13055         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13056         (vectorizable_operation, vectorizable_load): Likewise.
13057         * tree.c (build_same_sized_truth_vector_type): Likewise.
13058         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13059         * var-tracking.c (emit_note_insn_var_location): Likewise.
13060         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13061         (ADDR_VEC_ALIGN): Likewise.
13063 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13064             Alan Hayward  <alan.hayward@arm.com>
13065             David Sherwood  <david.sherwood@arm.com>
13067         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13068         unsigned short.
13069         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13070         or if measurement_type is polynomial.
13071         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13072         * combine.c (make_extraction): Likewise.
13073         * dse.c (find_shift_sequence): Likewise.
13074         * dwarf2out.c (mem_loc_descriptor): Likewise.
13075         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13076         (extract_bit_field, extract_low_bits): Likewise.
13077         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13078         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13079         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13080         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13081         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13082         * reload.c (find_reloads): Likewise.
13083         * reload1.c (alter_reg): Likewise.
13084         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13085         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13086         * tree-if-conv.c (predicate_mem_writes): Likewise.
13087         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13088         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13089         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13090         * valtrack.c (dead_debug_insert_temp): Likewise.
13091         * varasm.c (mergeable_constant_section): Likewise.
13092         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13094 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13095             Alan Hayward  <alan.hayward@arm.com>
13096             David Sherwood  <david.sherwood@arm.com>
13098         * expr.c (expand_assignment): Cope with polynomial mode sizes
13099         when assigning to a CONCAT.
13101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13102             Alan Hayward  <alan.hayward@arm.com>
13103             David Sherwood  <david.sherwood@arm.com>
13105         * machmode.h (mode_precision): Change from unsigned short to
13106         poly_uint16_pod.
13107         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13108         short.
13109         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13110         or if measurement_type is not polynomial.
13111         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13112         in which the mode is already known to be a scalar_int_mode.
13113         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13114         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13115         initializer.
13116         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13117         for GET_MODE_PRECISION.
13118         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13119         for GET_MODE_PRECISION.
13120         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13121         as polynomial.
13122         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13123         (expand_field_assignment, make_extraction): Likewise.
13124         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13125         (get_last_value): Likewise.
13126         * convert.c (convert_to_integer_1): Likewise.
13127         * cse.c (cse_insn): Likewise.
13128         * expr.c (expand_expr_real_1): Likewise.
13129         * lra-constraints.c (simplify_operand_subreg): Likewise.
13130         * optabs-query.c (can_atomic_load_p): Likewise.
13131         * optabs.c (expand_atomic_load): Likewise.
13132         (expand_atomic_store): Likewise.
13133         * ree.c (combine_reaching_defs): Likewise.
13134         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13135         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13136         * tree.h (type_has_mode_precision_p): Likewise.
13137         * ubsan.c (instrument_si_overflow): Likewise.
13139 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13140             Alan Hayward  <alan.hayward@arm.com>
13141             David Sherwood  <david.sherwood@arm.com>
13143         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13144         polynomial numbers of units.
13145         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13146         (valid_vector_subparts_p): New function.
13147         (build_vector_type): Remove temporary shim and take the number
13148         of units as a poly_uint64 rather than an int.
13149         (build_opaque_vector_type): Take the number of units as a
13150         poly_uint64 rather than an int.
13151         * tree.c (build_vector_from_ctor): Handle polynomial
13152         TYPE_VECTOR_SUBPARTS.
13153         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13154         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13155         (build_vector_from_val): If the number of units is variable,
13156         use build_vec_duplicate_cst for constant operands and
13157         VEC_DUPLICATE_EXPR otherwise.
13158         (make_vector_type): Remove temporary is_constant ().
13159         (build_vector_type, build_opaque_vector_type): Take the number of
13160         units as a poly_uint64 rather than an int.
13161         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13162         VECTOR_CST_NELTS.
13163         * cfgexpand.c (expand_debug_expr): Likewise.
13164         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13165         (store_constructor, expand_expr_real_1): Likewise.
13166         (const_scalar_mask_from_tree): Likewise.
13167         * fold-const-call.c (fold_const_reduction): Likewise.
13168         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13169         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13170         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13171         (fold_relational_const): Likewise.
13172         (native_interpret_vector): Likewise.  Change the size from an
13173         int to an unsigned int.
13174         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13175         TYPE_VECTOR_SUBPARTS.
13176         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13177         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13178         duplicating a non-constant operand into a variable-length vector.
13179         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13180         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13181         * ipa-icf.c (sem_variable::equals): Likewise.
13182         * match.pd: Likewise.
13183         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13184         * print-tree.c (print_node): Likewise.
13185         * stor-layout.c (layout_type): Likewise.
13186         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13187         * tree-cfg.c (verify_gimple_comparison): Likewise.
13188         (verify_gimple_assign_binary): Likewise.
13189         (verify_gimple_assign_ternary): Likewise.
13190         (verify_gimple_assign_single): Likewise.
13191         * tree-pretty-print.c (dump_generic_node): Likewise.
13192         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13193         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13194         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13195         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13196         (vect_shift_permute_load_chain): Likewise.
13197         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13198         (expand_vector_condition, optimize_vector_constructor): Likewise.
13199         (lower_vec_perm, get_compute_type): Likewise.
13200         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13201         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13202         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13203         (vect_recog_mask_conversion_pattern): Likewise.
13204         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13205         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13206         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13207         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13208         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13209         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13210         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13211         (supportable_widening_operation): Likewise.
13212         (supportable_narrowing_operation): Likewise.
13213         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13214         Likewise.
13215         * varasm.c (output_constant): Likewise.
13217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13218             Alan Hayward  <alan.hayward@arm.com>
13219             David Sherwood  <david.sherwood@arm.com>
13221         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13222         so that both the length == 3 and length != 3 cases set up their
13223         own permute vectors.  Add comments explaining why we know the
13224         number of elements is constant.
13225         (vect_permute_load_chain): Likewise.
13227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13228             Alan Hayward  <alan.hayward@arm.com>
13229             David Sherwood  <david.sherwood@arm.com>
13231         * machmode.h (mode_nunits): Change from unsigned char to
13232         poly_uint16_pod.
13233         (ONLY_FIXED_SIZE_MODES): New macro.
13234         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13235         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13236         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13237         New typedefs.
13238         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13239         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13240         or if measurement_type is not polynomial.
13241         * genmodes.c (ZERO_COEFFS): New macro.
13242         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13243         poly_uint16.
13244         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13245         Use ZERO_COEFFS when emitting initializers.
13246         * data-streamer.h (bp_pack_poly_value): New function.
13247         (bp_unpack_poly_value): Likewise.
13248         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13249         for GET_MODE_NUNITS.
13250         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13251         for GET_MODE_NUNITS.
13252         * tree.c (make_vector_type): Remove temporary shim and make
13253         the real function take the number of units as a poly_uint64
13254         rather than an int.
13255         (build_vector_type_for_mode): Handle polynomial nunits.
13256         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13257         * emit-rtl.c (const_vec_series_p_1): Likewise.
13258         (gen_rtx_CONST_VECTOR): Likewise.
13259         * fold-const.c (test_vec_duplicate_folding): Likewise.
13260         * genrecog.c (validate_pattern): Likewise.
13261         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13262         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13263         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13264         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13265         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13266         * rtlanal.c (subreg_get_info): Likewise.
13267         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13268         (vect_grouped_load_supported): Likewise.
13269         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13270         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13271         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13272         (simplify_const_unary_operation, simplify_binary_operation_1)
13273         (simplify_const_binary_operation, simplify_ternary_operation)
13274         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13275         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13276         instead of CONST_VECTOR_NUNITS.
13277         * varasm.c (output_constant_pool_2): Likewise.
13278         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13279         explicit-encoded elements in the XVEC for variable-length vectors.
13281 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13283         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13285 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13286             Alan Hayward  <alan.hayward@arm.com>
13287             David Sherwood  <david.sherwood@arm.com>
13289         * coretypes.h (fixed_size_mode): Declare.
13290         (fixed_size_mode_pod): New typedef.
13291         * builtins.h (target_builtins::x_apply_args_mode)
13292         (target_builtins::x_apply_result_mode): Change type to
13293         fixed_size_mode_pod.
13294         * builtins.c (apply_args_size, apply_result_size, result_vector)
13295         (expand_builtin_apply_args_1, expand_builtin_apply)
13296         (expand_builtin_return): Update accordingly.
13298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13300         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13301         * cselib.c (cselib_hash_rtx): Likewise.
13302         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13303         CONST_VECTOR encoding.
13305 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13306             Jeff Law  <law@redhat.com>
13308         PR target/83641
13309         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13310         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13311         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13312         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13314         PR target/83641
13315         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13316         explicitly probe *sp in a noreturn function if there were any callee
13317         register saves or frame pointer is needed.
13319 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13321         PR debug/83621
13322         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13323         BLKmode for ternary, binary or unary expressions.
13325         PR debug/83645
13326         * var-tracking.c (delete_vta_debug_insn): New inline function.
13327         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13328         insns from get_insns () to NULL instead of each bb separately.
13329         Use delete_vta_debug_insn.  No longer static.
13330         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13331         delete_vta_debug_insns callers.
13332         * rtl.h (delete_vta_debug_insns): Declare.
13333         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13334         instead of variable_tracking_main.
13336 2018-01-03  Martin Sebor  <msebor@redhat.com>
13338         PR tree-optimization/83603
13339         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13340         arguments past the endof the argument list in functions declared
13341         without a prototype.
13342         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13343         Avoid checking when arguments are null.
13345 2018-01-03  Martin Sebor  <msebor@redhat.com>
13347         PR c/83559
13348         * doc/extend.texi (attribute const): Fix a typo.
13349         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13350         issuing -Wsuggest-attribute for void functions.
13352 2018-01-03  Martin Sebor  <msebor@redhat.com>
13354         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13355         offset_int::from instead of wide_int::to_shwi.
13356         (maybe_diag_overlap): Remove assertion.
13357         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13358         * gimple-ssa-sprintf.c (format_directive): Same.
13359         (parse_directive): Same.
13360         (sprintf_dom_walker::compute_format_length): Same.
13361         (try_substitute_return_value): Same.
13363 2018-01-03  Jeff Law  <law@redhat.com>
13365         PR middle-end/83654
13366         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13367         non-constant residual for zero at runtime and avoid probing in
13368         that case.  Reorganize code for trailing problem to mirror handling
13369         of the residual.
13371 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13373         PR tree-optimization/83501
13374         * tree-ssa-strlen.c (get_string_cst): New.
13375         (handle_char_store): Call get_string_cst.
13377 2018-01-03  Martin Liska  <mliska@suse.cz>
13379         PR tree-optimization/83593
13380         * tree-ssa-strlen.c: Include tree-cfg.h.
13381         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13382         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13383         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13384         to false.
13385         (strlen_dom_walker::before_dom_children): Call
13386         gimple_purge_dead_eh_edges. Dump tranformation with details
13387         dump flags.
13388         (strlen_dom_walker::before_dom_children): Update call by adding
13389         new argument cleanup_eh.
13390         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13392 2018-01-03  Martin Liska  <mliska@suse.cz>
13394         PR ipa/83549
13395         * cif-code.def (VARIADIC_THUNK): New enum value.
13396         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13397         thunks.
13399 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13401         * sse.md (mov<mode>_internal): Tighten condition for when to use
13402         vmovdqu<ssescalarsize> for TI and OI modes.
13404 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13406         Update copyright years.
13408 2018-01-03  Martin Liska  <mliska@suse.cz>
13410         PR ipa/83594
13411         * ipa-visibility.c (function_and_variable_visibility): Skip
13412         functions with noipa attribure.
13414 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13416         * gcc.c (process_command): Update copyright notice dates.
13417         * gcov-dump.c (print_version): Ditto.
13418         * gcov.c (print_version): Ditto.
13419         * gcov-tool.c (print_version): Ditto.
13420         * gengtype.c (create_file): Ditto.
13421         * doc/cpp.texi: Bump @copying's copyright year.
13422         * doc/cppinternals.texi: Ditto.
13423         * doc/gcc.texi: Ditto.
13424         * doc/gccint.texi: Ditto.
13425         * doc/gcov.texi: Ditto.
13426         * doc/install.texi: Ditto.
13427         * doc/invoke.texi: Ditto.
13429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13431         * vector-builder.h (vector_builder::m_full_nelts): Change from
13432         unsigned int to poly_uint64.
13433         (vector_builder::full_nelts): Update prototype accordingly.
13434         (vector_builder::new_vector): Likewise.
13435         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13436         (vector_builder::operator ==): Likewise.
13437         (vector_builder::finalize): Likewise.
13438         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13439         Take the number of elements as a poly_uint64 rather than an
13440         unsigned int.
13441         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13442         from unsigned int to poly_uint64.
13443         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13444         (vec_perm_indices::new_vector): Likewise.
13445         (vec_perm_indices::length): Likewise.
13446         (vec_perm_indices::nelts_per_input): Likewise.
13447         (vec_perm_indices::input_nelts): Likewise.
13448         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13449         number of elements per input as a poly_uint64 rather than an
13450         unsigned int.  Use the original encoding for variable-length
13451         vectors, rather than clamping each individual element.
13452         For the second and subsequent elements in each pattern,
13453         clamp the step and base before clamping their sum.
13454         (vec_perm_indices::series_p): Handle polynomial element counts.
13455         (vec_perm_indices::all_in_range_p): Likewise.
13456         (vec_perm_indices_to_tree): Likewise.
13457         (vec_perm_indices_to_rtx): Likewise.
13458         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13459         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13460         (tree_vector_builder::new_binary_operation): Handle polynomial
13461         element counts.  Return false if we need to know the number
13462         of elements at compile time.
13463         * fold-const.c (fold_vec_perm): Punt if the number of elements
13464         isn't known at compile time.
13466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13468         * vec-perm-indices.h (vec_perm_builder): Change element type
13469         from HOST_WIDE_INT to poly_int64.
13470         (vec_perm_indices::element_type): Update accordingly.
13471         (vec_perm_indices::clamp): Handle polynomial element_types.
13472         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13473         (vec_perm_indices::all_in_range_p): Likewise.
13474         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13475         than shwi trees.
13476         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13477         polynomial vec_perm_indices element types.
13478         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13479         * fold-const.c (fold_vec_perm): Likewise.
13480         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13481         * tree-vect-generic.c (lower_vec_perm): Likewise.
13482         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13483         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13484         element type to HOST_WIDE_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         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13491         rather than an int.  Use plus_constant.
13492         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13493         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13495 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13496             Alan Hayward  <alan.hayward@arm.com>
13497             David Sherwood  <david.sherwood@arm.com>
13499         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13500         a HOST_WIDE_INT to a poly_int64.
13502 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13503             Alan Hayward  <alan.hayward@arm.com>
13504             David Sherwood  <david.sherwood@arm.com>
13506         * calls.c (load_register_parameters): Cope with polynomial
13507         mode sizes.  Require a constant size for BLKmode parameters
13508         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13509         forces a parameter to be padded at the lsb end in order to
13510         fill a complete number of words, require the parameter size
13511         to be ordered wrt UNITS_PER_WORD.
13513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13514             Alan Hayward  <alan.hayward@arm.com>
13515             David Sherwood  <david.sherwood@arm.com>
13517         * reload1.c (spill_stack_slot_width): Change element type
13518         from unsigned int to poly_uint64_pod.
13519         (alter_reg): Treat mode sizes as polynomial.
13521 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13522             Alan Hayward  <alan.hayward@arm.com>
13523             David Sherwood  <david.sherwood@arm.com>
13525         * reload.c (complex_word_subreg_p): New function.
13526         (reload_inner_reg_of_subreg, push_reload): Use it.
13528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13529             Alan Hayward  <alan.hayward@arm.com>
13530             David Sherwood  <david.sherwood@arm.com>
13532         * lra-constraints.c (process_alt_operands): Reject matched
13533         operands whose sizes aren't ordered.
13534         (match_reload): Refer to this check here.
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         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13541         that the mode size is in the set {1, 2, 4, 8, 16}.
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         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13548         Use plus_constant instead of gen_rtx_PLUS.
13550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13551             Alan Hayward  <alan.hayward@arm.com>
13552             David Sherwood  <david.sherwood@arm.com>
13554         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13555         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13556         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13557         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13558         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13559         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13560         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13561         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13562         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13563         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13564         a poly_int64.
13565         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13566         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13567         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13568         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13569         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13570         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13571         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13572         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13573         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13574         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13575         function.
13576         * expr.c (emit_move_resolve_push): Treat the input and result
13577         of PUSH_ROUNDING as a poly_int64.
13578         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13579         (emit_push_insn): Likewise.
13580         * lra-eliminations.c (mark_not_eliminable): Likewise.
13581         * recog.c (push_operand): Likewise.
13582         * reload1.c (elimination_effects): Likewise.
13583         * rtlanal.c (nonzero_bits1): Likewise.
13584         * calls.c (store_one_arg): Likewise.  Require the padding to be
13585         known at compile time.
13587 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13588             Alan Hayward  <alan.hayward@arm.com>
13589             David Sherwood  <david.sherwood@arm.com>
13591         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13592         Use plus_constant instead of gen_rtx_PLUS.
13594 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13595             Alan Hayward  <alan.hayward@arm.com>
13596             David Sherwood  <david.sherwood@arm.com>
13598         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13599         rather than an int.
13601 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13602             Alan Hayward  <alan.hayward@arm.com>
13603             David Sherwood  <david.sherwood@arm.com>
13605         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13606         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13607         via stack temporaries.  Treat the mode size as polynomial too.
13609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13610             Alan Hayward  <alan.hayward@arm.com>
13611             David Sherwood  <david.sherwood@arm.com>
13613         * expr.c (expand_expr_real_2): When handling conversions involving
13614         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13615         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13616         as a poly_uint64 too.
13618 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13619             Alan Hayward  <alan.hayward@arm.com>
13620             David Sherwood  <david.sherwood@arm.com>
13622         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13624 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13625             Alan Hayward  <alan.hayward@arm.com>
13626             David Sherwood  <david.sherwood@arm.com>
13628         * combine.c (can_change_dest_mode): Handle polynomial
13629         REGMODE_NATURAL_SIZE.
13630         * expmed.c (store_bit_field_1): Likewise.
13631         * expr.c (store_constructor): Likewise.
13632         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13633         and polynomial REGMODE_NATURAL_SIZE.
13634         (gen_lowpart_common): Likewise.
13635         * reginfo.c (record_subregs_of_mode): Likewise.
13636         * rtlanal.c (read_modify_subreg_p): Likewise.
13638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13639             Alan Hayward  <alan.hayward@arm.com>
13640             David Sherwood  <david.sherwood@arm.com>
13642         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13643         numbers of elements.
13645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13646             Alan Hayward  <alan.hayward@arm.com>
13647             David Sherwood  <david.sherwood@arm.com>
13649         * match.pd: Cope with polynomial numbers of vector elements.
13651 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13652             Alan Hayward  <alan.hayward@arm.com>
13653             David Sherwood  <david.sherwood@arm.com>
13655         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13656         in a POINTER_PLUS_EXPR.
13658 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13659             Alan Hayward  <alan.hayward@arm.com>
13660             David Sherwood  <david.sherwood@arm.com>
13662         * omp-simd-clone.c (simd_clone_subparts): New function.
13663         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13664         (ipa_simd_modify_function_body): Likewise.
13666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13667             Alan Hayward  <alan.hayward@arm.com>
13668             David Sherwood  <david.sherwood@arm.com>
13670         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13671         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13672         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13673         (expand_vector_condition, vector_element): Likewise.
13674         (subparts_gt): New function.
13675         (get_compute_type): Use subparts_gt.
13676         (count_type_subparts): Delete.
13677         (expand_vector_operations_1): Use subparts_gt instead of
13678         count_type_subparts.
13680 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13681             Alan Hayward  <alan.hayward@arm.com>
13682             David Sherwood  <david.sherwood@arm.com>
13684         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13685         (vect_compile_time_alias): ...this new function.  Do the calculation
13686         on poly_ints rather than trees.
13687         (vect_prune_runtime_alias_test_list): Update call accordingly.
13689 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13690             Alan Hayward  <alan.hayward@arm.com>
13691             David Sherwood  <david.sherwood@arm.com>
13693         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13694         numbers of units.
13695         (vect_schedule_slp_instance): Likewise.
13697 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13698             Alan Hayward  <alan.hayward@arm.com>
13699             David Sherwood  <david.sherwood@arm.com>
13701         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13702         constant and extern definitions for variable-length vectors.
13703         (vect_get_constant_vectors): Note that the number of units
13704         is known to be constant.
13706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13707             Alan Hayward  <alan.hayward@arm.com>
13708             David Sherwood  <david.sherwood@arm.com>
13710         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13711         of units as polynomial.  Choose between WIDE and NARROW based
13712         on multiple_p.
13714 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13715             Alan Hayward  <alan.hayward@arm.com>
13716             David Sherwood  <david.sherwood@arm.com>
13718         * tree-vect-stmts.c (simd_clone_subparts): New function.
13719         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13722             Alan Hayward  <alan.hayward@arm.com>
13723             David Sherwood  <david.sherwood@arm.com>
13725         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13726         vectors as polynomial.  Use build_index_vector for
13727         IFN_GOMP_SIMD_LANE.
13729 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13730             Alan Hayward  <alan.hayward@arm.com>
13731             David Sherwood  <david.sherwood@arm.com>
13733         * tree-vect-stmts.c (get_load_store_type): Treat the number of
13734         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13735         for variable-length vectors.
13736         (vectorizable_mask_load_store): Treat the number of units as
13737         polynomial, asserting that it is constant if the condition has
13738         already been enforced.
13739         (vectorizable_store, vectorizable_load): Likewise.
13741 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13742             Alan Hayward  <alan.hayward@arm.com>
13743             David Sherwood  <david.sherwood@arm.com>
13745         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13746         of units as polynomial.  Punt if we can't tell at compile time
13747         which vector contains the final result.
13749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13750             Alan Hayward  <alan.hayward@arm.com>
13751             David Sherwood  <david.sherwood@arm.com>
13753         * tree-vect-loop.c (vectorizable_induction): Treat the number
13754         of units as polynomial.  Punt on SLP inductions.  Use an integer
13755         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
13756         cast of such a series for variable-length floating-point
13757         reductions.
13759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13760             Alan Hayward  <alan.hayward@arm.com>
13761             David Sherwood  <david.sherwood@arm.com>
13763         * tree.h (build_index_vector): Declare.
13764         * tree.c (build_index_vector): New function.
13765         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
13766         of units as polynomial, forcibly converting it to a constant if
13767         vectorizable_reduction has already enforced the condition.
13768         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
13769         to create a {1,2,3,...} vector.
13770         (vectorizable_reduction): Treat the number of units as polynomial.
13771         Choose vectype_in based on the largest scalar element size rather
13772         than the smallest number of units.  Enforce the restrictions
13773         relied on above.
13775 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13776             Alan Hayward  <alan.hayward@arm.com>
13777             David Sherwood  <david.sherwood@arm.com>
13779         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
13780         number of units as polynomial.
13782 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13783             Alan Hayward  <alan.hayward@arm.com>
13784             David Sherwood  <david.sherwood@arm.com>
13786         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
13787         * target.def (autovectorize_vector_sizes): Return the vector sizes
13788         by pointer, using vector_sizes rather than a bitmask.
13789         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
13790         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
13791         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
13792         Likewise.
13793         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
13794         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
13795         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
13796         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
13797         * omp-general.c (omp_max_vf): Likewise.
13798         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13799         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
13800         * tree-vect-loop.c (vect_analyze_loop): Likewise.
13801         * tree-vect-slp.c (vect_slp_bb): Likewise.
13802         * doc/tm.texi: Regenerate.
13803         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
13804         to a poly_uint64.
13805         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13806         the vector size as a poly_uint64 rather than an unsigned int.
13807         (current_vector_size): Change from an unsigned int to a poly_uint64.
13808         (get_vectype_for_scalar_type): Update accordingly.
13809         * tree.h (build_truth_vector_type): Take the size and number of
13810         units as a poly_uint64 rather than an unsigned int.
13811         (build_vector_type): Add a temporary overload that takes
13812         the number of units as a poly_uint64 rather than an unsigned int.
13813         * tree.c (make_vector_type): Likewise.
13814         (build_truth_vector_type): Take the number of units as a poly_uint64
13815         rather than an unsigned int.
13817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13818             Alan Hayward  <alan.hayward@arm.com>
13819             David Sherwood  <david.sherwood@arm.com>
13821         * target.def (get_mask_mode): Take the number of units and length
13822         as poly_uint64s rather than unsigned ints.
13823         * targhooks.h (default_get_mask_mode): Update accordingly.
13824         * targhooks.c (default_get_mask_mode): Likewise.
13825         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13826         * doc/tm.texi: Regenerate.
13828 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13829             Alan Hayward  <alan.hayward@arm.com>
13830             David Sherwood  <david.sherwood@arm.com>
13832         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13833         * omp-general.c (omp_max_vf): Likewise.
13834         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13835         (expand_omp_simd): Handle polynomial safelen.
13836         * omp-low.c (omplow_simd_context): Add a default constructor.
13837         (omplow_simd_context::max_vf): Change from int to poly_uint64.
13838         (lower_rec_simd_input_clauses): Update accordingly.
13839         (lower_rec_input_clauses): Likewise.
13841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13842             Alan Hayward  <alan.hayward@arm.com>
13843             David Sherwood  <david.sherwood@arm.com>
13845         * tree-vectorizer.h (vect_nunits_for_cost): New function.
13846         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13847         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13848         (vect_analyze_slp_cost): Likewise.
13849         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13850         (vect_model_load_cost): Likewise.
13852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13853             Alan Hayward  <alan.hayward@arm.com>
13854             David Sherwood  <david.sherwood@arm.com>
13856         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13857         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13858         from an unsigned int * to a poly_uint64_pod *.
13859         (calculate_unrolling_factor): New function.
13860         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
13862 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13863             Alan Hayward  <alan.hayward@arm.com>
13864             David Sherwood  <david.sherwood@arm.com>
13866         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13867         from an unsigned int to a poly_uint64.
13868         (_loop_vec_info::slp_unrolling_factor): Likewise.
13869         (_loop_vec_info::vectorization_factor): Change from an int
13870         to a poly_uint64.
13871         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13872         (vect_get_num_vectors): New function.
13873         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13874         (vect_get_num_copies): Use vect_get_num_vectors.
13875         (vect_analyze_data_ref_dependences): Change max_vf from an int *
13876         to an unsigned int *.
13877         (vect_analyze_data_refs): Change min_vf from an int * to a
13878         poly_uint64 *.
13879         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13880         than an unsigned HOST_WIDE_INT.
13881         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13882         (vect_analyze_data_ref_dependence): Change max_vf from an int *
13883         to an unsigned int *.
13884         (vect_analyze_data_ref_dependences): Likewise.
13885         (vect_compute_data_ref_alignment): Handle polynomial vf.
13886         (vect_enhance_data_refs_alignment): Likewise.
13887         (vect_prune_runtime_alias_test_list): Likewise.
13888         (vect_shift_permute_load_chain): Likewise.
13889         (vect_supportable_dr_alignment): Likewise.
13890         (dependence_distance_ge_vf): Take the vectorization factor as a
13891         poly_uint64 rather than an unsigned HOST_WIDE_INT.
13892         (vect_analyze_data_refs): Change min_vf from an int * to a
13893         poly_uint64 *.
13894         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13895         vfm1 as a poly_uint64 rather than an int.  Make the same change
13896         for the returned bound_scalar.
13897         (vect_gen_vector_loop_niters): Handle polynomial vf.
13898         (vect_do_peeling): Likewise.  Update call to
13899         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13900         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13901         be constant.
13902         * tree-vect-loop.c (vect_determine_vectorization_factor)
13903         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13904         (vect_get_known_peeling_cost): Likewise.
13905         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13906         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13907         (vect_transform_loop): Likewise.  Use the lowest possible VF when
13908         updating the upper bounds of the loop.
13909         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
13910         rather than an int.
13911         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13912         polynomial unroll factors.
13913         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13914         (vect_make_slp_decision): Likewise.
13915         (vect_supported_load_permutation_p): Likewise, and polynomial
13916         vf too.
13917         (vect_analyze_slp_cost): Handle polynomial vf.
13918         (vect_slp_analyze_node_operations): Likewise.
13919         (vect_slp_analyze_bb_1): Likewise.
13920         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13921         than an unsigned HOST_WIDE_INT.
13922         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13923         (vectorizable_load): Handle polynomial vf.
13924         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13925         a poly_uint64.
13926         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13928 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13929             Alan Hayward  <alan.hayward@arm.com>
13930             David Sherwood  <david.sherwood@arm.com>
13932         * match.pd: Handle bit operations involving three constants
13933         and try to fold one pair.
13935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13937         * tree-vect-loop-manip.c: Include gimple-fold.h.
13938         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13939         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
13940         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13941         Add a path that uses a step of VF instead of 1, but disable it
13942         for now.
13943         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13944         and niters_no_overflow parameters.  Update calls to
13945         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13946         Create a new SSA name if the latter choses to use a ste other
13947         than zero, and return it via niters_vector_mult_vf_var.
13948         * tree-vect-loop.c (vect_transform_loop): Update calls to
13949         vect_do_peeling, vect_gen_vector_loop_niters and
13950         slpeel_make_loop_iterate_ntimes.
13951         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13952         (vect_gen_vector_loop_niters): Update declarations after above changes.
13954 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
13956         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13957         128-bit round to integer instructions.
13958         (ceil<mode>2): Likewise.
13959         (btrunc<mode>2): Likewise.
13960         (round<mode>2): Likewise.
13962 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13964         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13965         unaligned VSX load/store on P8/P9.
13966         (expand_block_clear): Allow the use of unaligned VSX
13967         load/store on P8/P9.
13969 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13971         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13972         New function.
13973         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13974         swap associated with both a load and a store.
13976 2018-01-02  Andrew Waterman  <andrew@sifive.com>
13978         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13979         * config/riscv/riscv.md (clear_cache): Use it.
13981 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
13983         * web.c: Remove out-of-date comment.
13985 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13987         * expr.c (fixup_args_size_notes): Check that any existing
13988         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13989         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13990         (emit_single_push_insn): ...here.
13992 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13994         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13995         (const_vector_encoded_nelts): New function.
13996         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
13997         (const_vector_int_elt, const_vector_elt): Declare.
13998         * emit-rtl.c (const_vector_int_elt_1): New function.
13999         (const_vector_elt): Likewise.
14000         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14001         of CONST_VECTOR_ELT.
14003 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14005         * expr.c: Include rtx-vector-builder.h.
14006         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14007         directly on the tree encoding.
14008         (const_vector_from_tree): Likewise.
14009         * optabs.c: Include rtx-vector-builder.h.
14010         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14011         sequence of "u" values.
14012         * vec-perm-indices.c: Include rtx-vector-builder.h.
14013         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14014         directly on the vec_perm_indices encoding.
14016 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14018         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14019         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14020         * rtx-vector-builder.h: New file.
14021         * rtx-vector-builder.c: Likewise.
14022         * rtl.h (rtx_def::u2): Add a const_vector field.
14023         (CONST_VECTOR_NPATTERNS): New macro.
14024         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14025         (CONST_VECTOR_DUPLICATE_P): Likewise.
14026         (CONST_VECTOR_STEPPED_P): Likewise.
14027         (CONST_VECTOR_ENCODED_ELT): Likewise.
14028         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14029         (unwrap_const_vec_duplicate): Likewise.
14030         (const_vec_series_p): Check for a non-duplicated vector encoding.
14031         Say that the function only returns true for integer vectors.
14032         * emit-rtl.c: Include rtx-vector-builder.h.
14033         (gen_const_vec_duplicate_1): Delete.
14034         (gen_const_vector): Call gen_const_vec_duplicate instead of
14035         gen_const_vec_duplicate_1.
14036         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14037         (gen_const_vec_duplicate): Use rtx_vector_builder.
14038         (gen_const_vec_series): Likewise.
14039         (gen_rtx_CONST_VECTOR): Likewise.
14040         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14041         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14042         Build a new vector rather than modifying a CONST_VECTOR in-place.
14043         (handle_special_swappables): Update call accordingly.
14044         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14045         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14046         Build a new vector rather than modifying a CONST_VECTOR in-place.
14047         (handle_special_swappables): Update call accordingly.
14049 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14051         * simplify-rtx.c (simplify_const_binary_operation): Use
14052         CONST_VECTOR_ELT instead of XVECEXP.
14054 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14056         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14057         the selector elements to be different from the data elements
14058         if the selector is a VECTOR_CST.
14059         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14060         ssizetype for the selector.
14062 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14064         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14065         before testing each element individually.
14066         * tree-vect-generic.c (lower_vec_perm): Likewise.
14068 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14070         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14071         * selftest-run-tests.c (selftest::run_tests): Call it.
14072         * vector-builder.h (vector_builder::operator ==): New function.
14073         (vector_builder::operator !=): Likewise.
14074         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14075         (vec_perm_indices::all_from_input_p): New function.
14076         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14077         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14078         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14079         instead of reading the VECTOR_CST directly.  Detect whether both
14080         vector inputs are the same before constructing the vec_perm_indices,
14081         and update the number of inputs argument accordingly.  Use the
14082         utility functions added above.  Only construct sel2 if we need to.
14084 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14086         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14087         the broadcast of the low byte.
14088         (expand_mult_highpart): Use an explicit encoding for the permutes.
14089         * optabs-query.c (can_mult_highpart_p): Likewise.
14090         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14091         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14092         (vectorizable_bswap): Likewise.
14093         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14094         explicit encoding for the power-of-2 permutes.
14095         (vect_permute_store_chain): Likewise.
14096         (vect_grouped_load_supported): Likewise.
14097         (vect_permute_load_chain): Likewise.
14099 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14101         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14102         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14103         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14104         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14105         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14106         (vect_gen_perm_mask_any): Likewise.
14108 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14110         * int-vector-builder.h: New file.
14111         * vec-perm-indices.h: Include int-vector-builder.h.
14112         (vec_perm_indices): Redefine as an int_vector_builder.
14113         (auto_vec_perm_indices): Delete.
14114         (vec_perm_builder): Redefine as a stand-alone class.
14115         (vec_perm_indices::vec_perm_indices): New function.
14116         (vec_perm_indices::clamp): Likewise.
14117         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14118         (vec_perm_indices::new_vector): New function.
14119         (vec_perm_indices::new_expanded_vector): Update for new
14120         vec_perm_indices class.
14121         (vec_perm_indices::rotate_inputs): New function.
14122         (vec_perm_indices::all_in_range_p): Operate directly on the
14123         encoded form, without computing elided elements.
14124         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14125         encoding.  Update for new vec_perm_indices class.
14126         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14127         the given vec_perm_builder.
14128         (expand_vec_perm_var): Update vec_perm_builder constructor.
14129         (expand_mult_highpart): Use vec_perm_builder instead of
14130         auto_vec_perm_indices.
14131         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14132         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14133         or double series encoding as appropriate.
14134         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14135         vec_perm_indices instead of auto_vec_perm_indices.
14136         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14137         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14138         (vect_permute_store_chain): Likewise.
14139         (vect_grouped_load_supported): Likewise.
14140         (vect_permute_load_chain): Likewise.
14141         (vect_shift_permute_load_chain): Likewise.
14142         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14143         (vect_transform_slp_perm_load): Likewise.
14144         (vect_schedule_slp_instance): Likewise.
14145         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14146         (vectorizable_mask_load_store): Likewise.
14147         (vectorizable_bswap): Likewise.
14148         (vectorizable_store): Likewise.
14149         (vectorizable_load): Likewise.
14150         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14151         vec_perm_indices instead of auto_vec_perm_indices.  Use
14152         tree_to_vec_perm_builder to read the vector from a tree.
14153         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14154         vec_perm_builder instead of a vec_perm_indices.
14155         (have_whole_vector_shift): Use vec_perm_builder and
14156         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14157         truncation to calc_vec_perm_mask_for_shift.
14158         (vect_create_epilog_for_reduction): Likewise.
14159         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14160         from auto_vec_perm_indices to vec_perm_indices.
14161         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14162         instead of changing individual elements.
14163         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14164         the vector in d.perm.
14165         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14166         from auto_vec_perm_indices to vec_perm_indices.
14167         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14168         instead of changing individual elements.
14169         (arm_vectorize_vec_perm_const): Use new_vector to install
14170         the vector in d.perm.
14171         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14172         Update vec_perm_builder constructor.
14173         (rs6000_expand_interleave): Likewise.
14174         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14175         (rs6000_expand_interleave): Likewise.
14177 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14179         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14180         to qimode could truncate the indices.
14181         * optabs.c (expand_vec_perm_var): Likewise.
14183 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14185         * Makefile.in (OBJS): Add vec-perm-indices.o.
14186         * vec-perm-indices.h: New file.
14187         * vec-perm-indices.c: Likewise.
14188         * target.h (vec_perm_indices): Replace with a forward class
14189         declaration.
14190         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14191         * optabs.h: Include vec-perm-indices.h.
14192         (expand_vec_perm): Delete.
14193         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14194         (expand_vec_perm_const): Declare.
14195         * target.def (vec_perm_const_ok): Replace with...
14196         (vec_perm_const): ...this new hook.
14197         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14198         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14199         * doc/tm.texi: Regenerate.
14200         * optabs.def (vec_perm_const): Delete.
14201         * doc/md.texi (vec_perm_const): Likewise.
14202         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14203         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14204         expand_vec_perm for constant permutation vectors.  Assert that
14205         the mode of variable permutation vectors is the integer equivalent
14206         of the mode that is being permuted.
14207         * optabs-query.h (selector_fits_mode_p): Declare.
14208         * optabs-query.c: Include vec-perm-indices.h.
14209         (selector_fits_mode_p): New function.
14210         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14211         is defined, instead of checking whether the vec_perm_const_optab
14212         exists.  Use targetm.vectorize.vec_perm_const instead of
14213         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14214         fit in the vector mode before using a variable permute.
14215         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14216         vec_perm_indices instead of an rtx.
14217         (expand_vec_perm): Replace with...
14218         (expand_vec_perm_const): ...this new function.  Take the selector
14219         as a vec_perm_indices rather than an rtx.  Also take the mode of
14220         the selector.  Update call to shift_amt_for_vec_perm_mask.
14221         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14222         Use vec_perm_indices::new_expanded_vector to expand the original
14223         selector into bytes.  Check whether the indices fit in the vector
14224         mode before using a variable permute.
14225         (expand_vec_perm_var): Make global.
14226         (expand_mult_highpart): Use expand_vec_perm_const.
14227         * fold-const.c: Includes vec-perm-indices.h.
14228         * tree-ssa-forwprop.c: Likewise.
14229         * tree-vect-data-refs.c: Likewise.
14230         * tree-vect-generic.c: Likewise.
14231         * tree-vect-loop.c: Likewise.
14232         * tree-vect-slp.c: Likewise.
14233         * tree-vect-stmts.c: Likewise.
14234         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14235         Delete.
14236         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14237         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14238         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14239         (aarch64_vectorize_vec_perm_const): ...this new function.
14240         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14241         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14242         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14243         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14244         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14245         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14246         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14247         into...
14248         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14249         check for NEON modes.
14250         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14251         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14252         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14253         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14254         into...
14255         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14256         the old VEC_PERM_CONST conditions.
14257         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14258         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14259         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14260         (ia64_vectorize_vec_perm_const_ok): Merge into...
14261         (ia64_vectorize_vec_perm_const): ...this new function.
14262         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14263         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14264         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14265         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14266         * config/mips/mips.c (mips_expand_vec_perm_const)
14267         (mips_vectorize_vec_perm_const_ok): Merge into...
14268         (mips_vectorize_vec_perm_const): ...this new function.
14269         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14270         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14271         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14272         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14273         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14274         (rs6000_expand_vec_perm_const): Delete.
14275         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14276         Delete.
14277         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14278         (altivec_expand_vec_perm_const_le): Take each operand individually.
14279         Operate on constant selectors rather than rtxes.
14280         (altivec_expand_vec_perm_const): Likewise.  Update call to
14281         altivec_expand_vec_perm_const_le.
14282         (rs6000_expand_vec_perm_const): Delete.
14283         (rs6000_vectorize_vec_perm_const_ok): Delete.
14284         (rs6000_vectorize_vec_perm_const): New function.
14285         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14286         an element count and rtx array.
14287         (rs6000_expand_extract_even): Update call accordingly.
14288         (rs6000_expand_interleave): Likewise.
14289         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14290         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14291         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14292         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14293         (rs6000_expand_vec_perm_const): Delete.
14294         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14295         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14296         (altivec_expand_vec_perm_const_le): Take each operand individually.
14297         Operate on constant selectors rather than rtxes.
14298         (altivec_expand_vec_perm_const): Likewise.  Update call to
14299         altivec_expand_vec_perm_const_le.
14300         (rs6000_expand_vec_perm_const): Delete.
14301         (rs6000_vectorize_vec_perm_const_ok): Delete.
14302         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14303         reference to the SPE evmerge intructions.
14304         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14305         an element count and rtx array.
14306         (rs6000_expand_extract_even): Update call accordingly.
14307         (rs6000_expand_interleave): Likewise.
14308         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14309         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14310         new function.
14311         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14313 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14315         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14316         vector mode and that that mode matches the mode of the data
14317         being permuted.
14318         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14319         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14320         directly using expand_vec_perm_1 when forcing selectors into
14321         registers.
14322         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14324 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14326         * optabs-query.h (can_vec_perm_p): Delete.
14327         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14328         * optabs-query.c (can_vec_perm_p): Split into...
14329         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14330         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14331         particular selector is valid.
14332         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14333         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14334         (vect_grouped_load_supported): Likewise.
14335         (vect_shift_permute_load_chain): Likewise.
14336         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14337         (vect_transform_slp_perm_load): Likewise.
14338         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14339         (vectorizable_bswap): Likewise.
14340         (vect_gen_perm_mask_checked): Likewise.
14341         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14342         implementations of variable permutation vectors into account
14343         when deciding which selector to use.
14344         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14345         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14346         with a false third argument.
14347         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14348         to test whether the constant selector is valid and can_vec_perm_var_p
14349         to test whether a variable selector is valid.
14351 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14353         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14354         * optabs-query.c (can_vec_perm_p): Likewise.
14355         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14356         instead of vec_perm_indices.
14357         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14358         (vect_gen_perm_mask_checked): Likewise,
14359         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14360         (vect_gen_perm_mask_checked): Likewise,
14362 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14364         * optabs-query.h (qimode_for_vec_perm): Declare.
14365         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14366         (qimode_for_vec_perm): ...this new function.
14367         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14369 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14371         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14372         does not have a conditional at the top.
14374 2018-01-02  Richard Biener  <rguenther@suse.de>
14376         * ipa-inline.c (big_speedup_p): Fix expression.
14378 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14380         PR target/81616
14381         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14382         for generic 4->6.
14384 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14386         PR target/81616
14387         Generic tuning.
14388         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14389         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14390         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14391         cond_taken_branch_cost 3->4.
14393 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14395         PR tree-optimization/83581
14396         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14397         TODO_cleanup_cfg if any changes have been made.
14399         PR middle-end/83608
14400         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14401         convert_modes if target mode has the right side, but different mode
14402         class.
14404         PR middle-end/83609
14405         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14406         last argument when extracting from CONCAT.  If either from_real or
14407         from_imag is NULL, use expansion through memory.  If result is not
14408         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14409         the parts directly to inner mode, if even that fails, use expansion
14410         through memory.
14412         PR middle-end/83623
14413         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14414         check for bswap in mode rather than HImode and use that in expand_unop
14415         too.
14417 Copyright (C) 2018 Free Software Foundation, Inc.
14419 Copying and distribution of this file, with or without modification,
14420 are permitted in any medium without royalty provided the copyright
14421 notice and this notice are preserved.