[NDS32] Implement bswapsi2 and bswaphi2 patterns.
[official-gcc.git] / gcc / ChangeLog
blob293856b0888876f76007382b46868a5043536380
1 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9         machine->attr_no_prologue_p.
10         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
12         (nds32_expand_epilogue): Consider attr_naked_p.
13         (nds32_expand_epilogue_v3pop): Likewise.
14         (nds32_can_use_return_insn): Likewise.
15         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16         attr_no_prologue_p fields.
17         * config/nds32/nds32.opt (mret-in-naked-func): New option.
19 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
21         PR target/85918
22         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
23         attributes.
24         * config/i386/sse.md
25         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
26         Rename to ...
27         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
28         ... this.
29         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
30         Rename to ...
31         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
32         ... this.
33         (*<floatsuffix>floatv2div2sf2): Rename to ...
34         (*float<floatunssuffix>v2div2sf2): ... this.
35         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
36         (float<floatunssuffix>v2div2sf2_mask): ... this.
37         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
38         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
39         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
40         to ...
41         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
42         ... this.
43         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
44         Rename to ...
45         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
46         ... this.
47         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
48         Rename to ...
49         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
50         ... this.
51         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
52         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
53         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
54         gen_ufix_truncv8dfv8si2.
55         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
56         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
57         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
58         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
59         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
60         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
61         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
62         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
64 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
66         PR target/85900
67         PR target/85345
68         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
70 2018-05-25  Jim Wilson  <jimw@sifive.com>
72         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
73         * config/riscv/riscv.c (struct machine_function): Add
74         interrupt_handler_p and attribute_checked_p fields.
75         (riscv_attribute_table): Add interrupt.
76         (riscv_interrupt_type_p): New.
77         (riscv_save_reg_p): Save extra regs for interrupt handler.
78         (riscv_use_save_libcall): Return false  for interrupt handler.
79         (riscv_first_stack_step): Add forward declaration.
80         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
81         for interrupt handler with large frame.  Use it for saved reg list.
82         (riscv_expand_prologue): Move flag_stack_usage_info support to
83         eliminate duplication.
84         (riscv_expand_epilogue): Generate mret for interrupt handler.
85         (riscv_epilogue_uses): New.
86         (riscv_can_use_return_insn): Return false for interrupt handler.
87         (riscv_function_ok_for_sibcall): Likewise.
88         (riscv_set_current_function): Add interrupt handler support.
89         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
90         * config/riscv/riscv.md (UNSPECV_MRET): New.
91         (GP_REGNUM): New.
92         (riscv_frflags, riscv_fsflags): Use tab after opcode.
93         (riscv_mret): New.
94         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
96 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
98         PR tree-optimization/85712
99         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
100         this candidate has already been replaced in-situ by a copy.
102 2018-05-25  Jason Merrill  <jason@redhat.com>
104         PR c++/80485 - inline function non-zero address.
105         * symtab.c (nonzero_address): Check DECL_COMDAT.
107 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
109         PR target/83628
110         * config/alpha/alpha.md (ashlsi3): New insn pattern.
111         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
112         extension of SImode operation.  Use const123_operand predicate.
113         (*saddsi_1): Remove.
114         (*saddl_se_1): Ditto.
115         (*ssubsi_1): Ditto.
116         (*ssubl_se_1): Ditto.
117         * config/alpha/predicates.md (const123_operand): New predicate.
118         * config/alpha/constraints.md (P): Use IN_RANGE.
120 2018-05-25  Richard Biener  <rguenther@suse.de>
122         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
123         defaulted to true.
124         (ref_maybe_used_by_stmt_p): Likewise.
125         (stmt_may_clobber_ref_p): Likewise.
126         (stmt_may_clobber_ref_p_1): Likewise.
127         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
128         and pass it along.
129         (ref_maybe_used_by_stmt_p): Likewise.
130         (stmt_may_clobber_ref_p): Likewise.
131         (stmt_may_clobber_ref_p_1): Likewise.
132         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
133         the alias oracle to disambiguate DRs with stmts DR analysis
134         couldn't handle.
135         (vect_analyze_data_refs): Do not give up on not analyzable
136         DRs for BB vectorization.  Remove code truncating the dataref
137         vector.
139 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
141         PR target/85832
142         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
143         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
144         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
146 2018-05-25  Richard Biener  <rguenther@suse.de>
148         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
149         function, combining stmt data ref gathering and fatal analysis
150         parts.
151         (vect_analyze_data_refs): Remove now redudnant code and simplify.
152         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
153         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
154         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
155         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
157 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
159         PR tree-optimization/85720
160         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
161         SCC if all partitions are builtins.
162         (version_loop_by_alias_check): New parameter.  Generate cancelable
163         runtime alias check if all partitions are builtins.
164         (distribute_loop): Update call to above function.
166 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
168         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
169         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
170         (parm_default_def_partition_arg): Ditto.
171         (set_parm_default_def_partition): Ditto.
172         (get_parm_default_def_partitions): Ditto and make it static.
173         (get_undefined_value_partitions): Ditto and make it static.
174         (remove_ssa_form): Refactor call to init_var_map here.
175         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
176         computation for loop region.
177         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
178         (register_default_def): Delete.
179         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
180         (parm_default_def_partition_arg): Ditto.
181         (set_parm_default_def_partition): Ditto.
182         (get_parm_default_def_partitions): Ditto and make it static.
183         (get_undefined_value_partitions): Ditto and make it static.
184         (coalesce_with_default, coalesce_with_default): Update comment.
185         (create_coalesce_list_for_region): New func factored out from
186         create_outofssa_var_map.
187         (populate_coalesce_list_for_outofssa): New func factored out from
188         create_outofssa_var_map and coalesce_ssa_name.
189         (create_outofssa_var_map): Delete.
190         (coalesce_ssa_name): Refactor to support live range computation.
191         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
192         (get_parm_default_def_partitions): Delete.
193         (get_undefined_value_partitions): Ditto.
194         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
195         computation for loop region.
196         (new_tree_live_info, loe_visit_block): Ditto.
197         (live_worklist, set_var_live_on_entry): Ditto.
198         (calculate_live_on_exit, verify_live_on_entry): Ditto.
199         * tree-ssa-live.h (struct _var_map): New fields.
200         (init_var_map): Change decl.
201         (region_contains_p): New.
203 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
205         * tree-ssa-live.h (live_merge_and_clear): Delete.
207 2018-05-25  Richard Biener  <rguenther@suse.de>
209         PR c++/85912
210         * tree-dump.c (dequeue_and_dump): Remove access to removed
211         operand 2 of a SWITCH_EXPR.
213 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
215         * doc/sourcebuild.texi (vect_double_cond_arith): Include
216         multiplication and division.
217         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
218         (cond_udiv@var{m}, cond_umod@var{m}): Document.
219         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
220         (cond_udiv_optab, cond_umod_optab): New optabs.
221         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
222         (IFN_COND_RDIV): New internal functions.
223         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
224         TRUNC_MOD_EXPR and RDIV_EXPR.
225         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
226         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
227         New unspecs.
228         (SVE_INT_BINARY): Include mult.
229         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
230         (optab, sve_int_op): Handle mult.
231         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
232         UNSPEC_COND_DIV.
233         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
234         for SVE_INT_BINARY_SD.
236 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
238         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
239         (optab, sve_int_op): Handle div and udiv.
240         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
241         for SVE_INT_BINARY_SD.
242         (*<optab><mode>3): New insn for the same.
244 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
246         * tree-vect-patterns.c: Include predict.h.
247         (vect_recog_divmod_pattern): Restrict check for division support
248         to when optimizing for size.
250 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
252         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
253         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
254         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
255         (gimple_match_op::set_op): Likewise.
256         (gimple_resimplify4): Declare.
257         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
258         (expr::gen_transform): Likewise.
259         (decision_tree::gen): Generate a simplification routine for 4 operands.
260         * gimple-match-head.c (gimple_simplify): Add an overload for
261         4 operands.  In the top-level function, handle up to 4 call
262         arguments and call gimple_resimplify4.
263         (gimple_resimplify4): New function.
264         (build_call_internal): Pass a fourth operand.
265         (maybe_push_to_seq): Likewise.
266         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
267         Fold VEC_COND_EXPRs of an operation and a default value into
268         an IFN_COND_* function if possible.
269         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
270         New unspecs.
271         (SVE_COND_FP_BINARY): Include them.
272         (optab, sve_fp_op): Handle them.
273         (SVE_INT_BINARY_REV): New code iterator.
274         (SVE_COND_FP_BINARY_REV): New int iterator.
275         (commutative): New int attribute.
276         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
277         Declare.
278         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
279         function.
280         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
281         (*cond_<optab><mode>): New patterns for reversed operands.
283 2018-05-25  Richard Biener  <rguenther@suse.de>
285         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
286         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
287         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
288         (STMT_VINFO_GROUPED_ACCESS): Adjust.
289         * tree-vect-data-refs.c (everywhere): Adjust users.
290         * tree-vect-loop.c (everywhere): Likewise.
291         * tree-vect-slp.c (everywhere): Likewise.
292         * tree-vect-stmts.c (everywhere): Likewise.
293         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
295 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
297         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
298         Rename to...
299         (gcc_cv_as_section_exclude): ... this.
300         Try Solaris as #exclude syntax.
301         * configure: Regenerate.
302         * config.in: Regenerate.
303         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
304         SECTION_EXCLUDE.
305         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
306         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
308         * varasm.c (default_elf_asm_named_section): Don't check if
309         HAVE_GAS_SECTION_EXCLUDE is defined.
311 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
313         * doc/md.texi: Update the documentation of the cond_* optabs
314         to mention the new final operand.  Fix GET_MODE_NUNITS call.
315         Describe the scalar case too.
316         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
317         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
318         instead of 2.
319         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
320         (get_conditional_internal_fn): Update comment.
321         * tree-vect-loop.c (vectorizable_reduction): Pass the original
322         accumulator value as a final argument to conditional functions.
323         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
324         a define_expand and add an "else" operand.  Assert for now that
325         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
326         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
327         (*cond_<optab><mode>): New patterns.
328         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
329         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
330         (UNSPEC_COND_EOR): Delete.
331         (optab): Remove associated mappings.
332         (SVE_INT_BINARY): New code iterator.
333         (sve_int_op): Remove int attribute and add "minus" to the code
334         attribute.
335         (SVE_COND_INT_OP): Delete.
336         (SVE_COND_FP_OP): Rename to...
337         (SVE_COND_FP_BINARY): ...this.
339 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
341         * optabs.c (can_reuse_operands_p): New function.
342         (maybe_legitimize_operands): Try to reuse the results for
343         earlier operands.
345 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
347         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
348         Add {q} suffix to insn mnemonic.
350 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
352         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
353         (msp430_warn_func_return): New.
355 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
357         * fold-const.c (tree_nonzero_bits): New function.
358         * fold-const.h (tree_nonzero_bits): Likewise.
359         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
360         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
362 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
364         PR target/85900
365         PR target/85345
366         * varasm.c (assemble_alias): Check ifunc_resolver only on
367         FUNCTION_DECL.
369 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
371         PR target/85903
372         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
373         when memory input operand is handled.
375 2018-05-24  Luis Machado  <luis.machado@linaro.org>
377         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
378         global.
379         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
381 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
383         * match.pd: Delay FMA folds until after vectorization.
385 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
387         PR target/83009
388         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
389         address check not strict.
391 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
393         * gimple-match.h (gimple_match_op): New class.
394         (mprts_hook): Replace parameters with a gimple_match_op *.
395         (maybe_build_generic_op): Likewise.
396         (gimple_simplified_result_is_gimple_val): Replace parameters with
397         a const gimple_match_op *.
398         (gimple_simplify): Replace code_helper * and tree * parameters with
399         a gimple_match_op * parameter.
400         (gimple_resimplify1): Replace code_helper *, tree and tree *
401         parameters with a gimple_match_op * parameter.
402         (gimple_resimplify2): Likewise.
403         (gimple_resimplify3): Likewise.
404         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
405         parameters with a gimple_match_op * parameter.
406         * gimple-match-head.c (gimple_simplify): Change prototypes of
407         auto-generated functions to take a gimple_match_op * instead of
408         separate code_helper * and tree * parameters.  Make the same
409         change in the top-level overload and update calls to the
410         gimple_resimplify routines.  Update calls to the auto-generated
411         functions and to maybe_push_res_to_seq in the publicly-facing
412         operation-specific gimple_simplify overloads.
413         (gimple_match_op::MAX_NUM_OPS): Define.
414         (gimple_resimplify1): Replace rcode and ops with a single res_op
415         parameter.  Update call to gimple_simplify.
416         (gimple_resimplify2): Likewise.
417         (gimple_resimplify3): Likewise.
418         (mprts_hook): Replace parameters with a gimple_match_op *.
419         (maybe_build_generic_op): Likewise.
420         (build_call_internal): Replace type, nargs and ops with
421         a gimple_match_op *.
422         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
423         with a single gimple_match_op *.  Update calls to mprts_hook,
424         build_call_internal and gimple_simplified_result_is_gimple_val.
425         Factor out code that is common to the tree_code and combined_fn cases.
426         * genmatch.c (expr::gen_transform): Replace tem_code and
427         tem_ops with a gimple_match_op called tem_op.  Update calls
428         to the gimple_resimplify functions and maybe_push_res_to_seq.
429         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
430         res_ops.  Update call to the gimple_resimplify functions.
431         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
432         (decision_tree::gen): Make the functions take a gimple_match_op *
433         called res_op instead of separate res_code and res_ops parameters.
434         Update call accordingly.
435         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
436         and ops with a single res_op parameter.  Update calls to
437         maybe_build_generic_op and maybe_push_res_to_seq.
438         (fold_stmt_1): Update calls to gimple_simplify and
439         replace_stmt_with_simplification.
440         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
441         and gimple_simplified_result_is_gimple_val.
442         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
443         gimple_simplify.
444         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
445         with a gimple_match_op *.
446         (vn_nary_build_or_lookup): Likewise.  Update call to
447         vn_nary_build_or_lookup_1.
448         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
449         gimple_match_op *.  Update calls to the gimple_resimplify routines
450         and to gimple_simplified_result_is_gimple_val.
451         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
452         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
453         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
454         (visit_nary_op): Likewise.
455         (visit_reference_op_load): Likewise.
457 2018-05-23  Luis Machado  <luis.machado@linaro.org>
459         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
460         modifier for printing the step amount.
462 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
464         PR target/78849
465         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
466         types.
468 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
470         * doc/sourcebuild.texi (Endianness): New subsubsection.
472 2018-05-23  Luis Machado  <luis.machado@linaro.org>
474         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
475         <prefetch_dynamic_strides>: New const bool field.
476         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
477         prefetch_dynamic_strides.
478         (exynosm1_prefetch_tune): Likewise.
479         (thunderxt88_prefetch_tune): Likewise.
480         (thunderx_prefetch_tune): Likewise.
481         (thunderx2t99_prefetch_tune): Likewise.
482         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
483         false.
484         (aarch64_override_options_internal): Update to set
485         PARAM_PREFETCH_DYNAMIC_STRIDES.
486         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
487         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
488         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
489         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
490         prefetch-dynamic-strides setting.
492 2018-05-23  Luis Machado  <luis.machado@linaro.org>
494         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
495         <minimum_stride>: New const int field.
496         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
497         minimum_stride field defaulting to -1.
498         (exynosm1_prefetch_tune): Likewise.
499         (thunderxt88_prefetch_tune): Likewise.
500         (thunderx_prefetch_tune): Likewise.
501         (thunderx2t99_prefetch_tune): Likewise.
502         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
503         <default_opt_level>: Set to 3.
504         (aarch64_override_options_internal): Update to set
505         PARAM_PREFETCH_MINIMUM_STRIDE.
506         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
507         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
508         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
509         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
510         stride is constant and is below the minimum stride threshold.
512 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
514         * config/arm/arm-cpus.in (mode26): Delete.
515         (armv4): Delete mode26 reference.
516         * config/arm/arm.c (arm_configure_build_target): Delete use of
517         isa_bit_mode26.
519 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
521         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
522         New insn pattern.
523         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
524         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
525         for non-SSE modes.
526         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
527         (floatunsdidf2): Ditto.
529 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
531         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
532         (fixuns_trunc<mode>si2_avx512f): Ditto.
533         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
534         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
535         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
537 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
539         PR rtl-optimization/79985
540         * df-scan.c (df_insn_refs_collect): Remove special case for
541         global registers and asm statements.
543 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
545         * extend.texi (Global Register Variables): Rewrite the bullet list.
546         Note that the register is available for allocation. Note that access
547         via inline asm must use constraints. Add note about async-signal
548         handlers. Remove paragraph about automagic register selection.
550 2018-05-23  Richard Biener  <rguenther@suse.de>
552         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
553         of fixed offset from memset VN.
555 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
557         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
558         first_interp field.
559         (alloc_cand_and_find_basis): Initialize first_interp field.
560         (slsr_process_mul): Modify first_interp field.
561         (slsr_process_add): Likewise.
562         (slsr_process_cast): Modify first_interp field for each new
563         interpretation.
564         (slsr_process_copy): Likewise.
565         (dump_candidate): Dump first_interp field.
566         (replace_mult_candidate): Process all interpretations, not just
567         subsequent ones.
568         (replace_rhs_if_not_dup): Likewise.
569         (replace_one_candidate): Likewise.
571 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
573         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
574         Add new boolean.
575         (aarch64_needs_frame_chain): New function.
576         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
578 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
580         PR target/84882
581         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
582         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
583         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
584         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
585         as true for strict-align.
586         (aarch64_can_inline_p): Perform checks even when callee has no
587         attributes to check for strict alignment.
588         * doc/extend.texi (AArch64 Function Attributes): Document
589         no-strict-align.
590         * doc/invoke.texi: (AArch64 Options): Likewise.
592 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
594         PR tree-optimization/85853
595         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
596         the handling of the root of the node to...
597         (vect_slp_analyze_node_operations_1): ...this new function,
598         and run the whole thing with the child nodes' def types
599         set according to their SLP node's def type.
601 2018-05-23  Richard Biener  <rguenther@suse.de>
603         PR middle-end/85874
604         * tree-data-ref.c (create_runtime_alias_checks): Defer
605         and ignore overflow warnings.
607 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
609         PR tree-optimization/85822
610         * tree-vrp.c (is_masked_range_test): Fix handling of negative
611         constants.
613 2018-05-23  Richard Biener  <rguenther@suse.de>
615         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
616         memset constants via native_interpret_expr.
618 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
620         PR target/85345
621         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
622         attribute.
623         (cgraph_node::create_alias): Likewise.
624         (cgraph_node::get_availability): Check ifunc_resolver instead
625         of looking up ifunc attribute.
626         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
627         * varasm.c (do_assemble_alias): Likewise.
628         (assemble_alias): Likewise.
629         (default_binds_local_p_3): Likewise.
630         * cgraph.h (cgraph_node): Add ifunc_resolver.
631         (cgraph_node::only_called_directly_or_aliased_p): Return false
632         for IFUNC resolver.
633         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
634         attribute.
635         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
636         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
637         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
638         instead of looking up ifunc attribute.
640 2018-05-22  Luis Machado  <luis.machado@linaro.org>
642         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
644 2018-05-22  Martin Sebor  <msebor@redhat.com>
646         PR middle-end/85359
647         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
648         only when expasion succeeds.
649         (expand_builtin_strcmp): Same.
650         (expand_builtin_strncmp): Same.
652 2018-05-22  Martin Sebor  <msebor@redhat.com>
654         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
656 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
657             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
659         * config/aarch64/aarch64-ldpstp.md: Replace uses of
660         aarch64_mem_pair_operand with memory_operand and delete operand swapping
661         code.
662         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
663         Add check for legitimate_address.
664         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
665         (aarch64_swap_ldrstr_operands): New.
666         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
667         Define prototype.
669 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
670             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
672         * config/aarch64/aarch64.md: New patterns to generate stp
673         and ldp.
674         (store_pair_sw, store_pair_dw): New patterns to generate stp for
675         single words and double words.
676         (load_pair_sw, load_pair_dw): Likewise.
677         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
678         Delete.
679         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
680         Delete.
681         * config/aarch64/aarch64-ldpstp.md: Modify peephole
682         for different mode ldpstp and add peephole for merged zero stores.
683         Likewise for loads.
684         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
685         Add size check.
686         (aarch64_gen_store_pair): Rename calls to match new patterns.
687         (aarch64_gen_load_pair): Rename calls to match new patterns.
688         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
689         (load_pair<DREG:mode><DREG2:mode>): ... This.
690         (store_pair<mode>): Rename to...
691         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
692         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
693         New mode iterators.
694         (V_INT_EQUIV): Handle SImode.
695         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
696         New predicate.
698 2018-05-22  Martin Sebor  <msebor@redhat.com>
700         PR c/85623
701         * calls.c (maybe_warn_nonstring_arg): Use string length to set
702         or ajust the presumed bound on an operation to avoid unnecessary
703         warnings.
705 2018-05-22  Martin Sebor  <msebor@redhat.com>
707         PR tree-optimization/85826
708         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
709         assuming that a DECL necesarily has a constant size.
711 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
713         PR middle-end/85862
714         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
716 2018-05-22  Richard Biener  <rguenther@suse.de>
718         PR tree-optimization/85834
719         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
720         non-constant and non-zero memset arguments.
722 2018-05-22  Martin Liska  <mliska@suse.cz>
724         PR ipa/85607
725         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
727 2018-05-22  Richard Biener  <rguenther@suse.de>
729         PR tree-optimization/85863
730         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
731         comparisons when vectype is specified.
732         (vectorizable_condition): Do not specify vectype for
733         vect_is_simple_cond when SLP vectorizing.
735 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
737         PR target/85657
738         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
739         define __ibm128 as long double.
740         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
741         as a distinct type when IEEE 128-bit support is enabled.
742         (init_float128_ieee): Fix up conversions between IFmode and IEEE
743         128-bit types to use the correct functions.
744         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
745         convert between 128-bit floating point types that have different
746         modes but the same representation, instead of using gen_lowpart to
747         makean alias.
748         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
749         KFmode.
750         (IFKF_reg): New attributes to give the register constraints for
751         IFmode and KFmode.
752         (extend<mode>tf2_internal): New insns to mark an explicit
753         conversion between 128-bit floating point types that have a
754         different mode but share the same representation.
756 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
758         PR tree-optimization/85814
759         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
760         a null return from get_strinfo when unsharing the next
761         strinfo in the chain.
763 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
765         PR gcc/84923
766         * varasm.c (weak_finish): Clean up weak_decls.
768 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
770         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
771         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
772         UNSPEC_UADALP values.
773         * config/aarch64/iterators.md (ABAL): New int iterator.
774         (ABDL2): Likewise.
775         (ADALP): Likewise.
776         (sur): Add mappings for the above.
777         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
778         New define_insn.
779         (aarch64_<sur>abal<mode>_4): Likewise.
780         (aarch64_<sur>adalp<mode>_3): Likewise.
781         (<sur>sadv16qi): New define_expand.
783 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
785         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
786         (*movdf_internal): Ditto.
787         (*rcpsf2_sse): Ditto.
788         (*rsqrtsf2_sse): Ditto.
789         (*sqrt<mode>2_sse): Ditto.
791 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
793         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
794         eor3q<mode>4.
795         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
796         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
797         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
798         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
799         vbcaxq_s64): New.
800         * config/aarch64/arm_neon.h: Likewise.
801         * config/aarch64/iterators.md (VQ_I): New.
803 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
805         * config.gcc: Add arc/t-multilib-linux to tmake_file for
806         arc*-*-linux*.
807         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
808         MULTILIB_DIRNAMES
810 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
812         * config/nds32/constraints.md (S): New constraint.
813         * config/nds32/nds32.md (call_internal): Use constraint S.
814         (call_value_internal): Likewise.
815         (sibcall_internal): Likewise.
816         (sibcall_value_internal): Likewise.
818 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
819             Chung-Ju Wu  <jasonwucj@gmail.com>
821         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
822         into consideration.
824 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
825             Chung-Ju Wu  <jasonwucj@gmail.com>
827         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
828         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
829         (nds32_rtx_costs_impl): Simplify.
830         (nds32_address_cost_impl): Simplify.
831         (nds32_init_rtx_costs): New function.
832         (nds32_rtx_costs_speed_prefer): Likewise.
833         (nds32_rtx_costs_size_prefer): Likewise.
834         (nds32_address_cost_speed_prefer): Likewise.
835         (nds32_address_cost_speed_fwprop): Likewise.
836         (nds32_address_cost_size_prefer): Likewise.
837         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
838         * config/nds32/nds32.c (nds32_option_override): Use
839         nds32_init_rtx_costs function.
841 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
843         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
844         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
845         (TARGET_PIPELINE_N8): Likewise.
846         (TARGET_PIPELINE_N10): Likewise.
847         (TARGET_PIPELINE_N13): Likewise.
848         (TARGET_PIPELINE_GRAYWOLF): Likewise.
850 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
852         * config/nds32/nds32-fpu.md: Update copyright year.
854 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
856         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
858 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
860         * config/nds32/nds32.c
861         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
862         * config/nds32/nds32.opt (minline-asm-r15): New option.
864 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
866         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
867         MASK_HW_ABS.
868         * config/nds32/nds32.md (abssi2): New pattern.
870 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
872         * config/i386/i386.md (rex64namesuffix): New mode attribute.
873         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
874         Merge insn pattern from sse_cvtsi2ss<round_name> and
875         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
876         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
877         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
878         using SWI48 mode iterator.
879         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
880         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
881         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
882         pattern from sse_cvttss2si<round_saeonly_name>
883         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
884         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
885         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
886         using SWI48 mode iterator.
887         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
888         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
889         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
890         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
891         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
892         using SWI48 mode iterator.
893         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
894         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
895         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
896         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
897         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
898         SWI48 mode iterator.
899         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
900         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
901         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
902         pattern from sse_cvttsd2si<round_saeonly_name>
903         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
905 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
907         * config/nds32/nds32-md-auxiliary.c
908         (nds32_valid_smw_lwm_base_p): Refine.
909         (nds32_output_smw_single_word): Refine.
910         (nds32_output_smw_double_word): New.
911         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
913 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
915         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
916         (nds32_output_stack_pop): Refine.
917         (nds32_expand_unaligned_load): Refine.
918         (nds32_expand_unaligned_store): Refine.
920 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
921             Chung-Ju Wu  <jasonwucj@gmail.com>
923         * config/nds32/constants.md: Add TP_REGNUM constant.
924         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
925         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
926         UNSPEC_ADD32.
927         * config/nds32/nds32-doubleword.md: Consider flag_pic.
928         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
929         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
930         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
931         and PIC code generation.
932         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
933         code generation.
934         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
935         optimization.
936         * config/nds32/nds32.md: Support TLS and PIC.
937         * config/nds32/nds32.c: Support TLS and PIC.
938         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
939         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
940         predicate.
942 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
944         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
945         mode with E_ prefix.
947 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
948             Chung-Ju Wu  <jasonwucj@gmail.com>
950         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
951         * config/nds32/nds32-md-auxiliary.c
952         (symbolic_reference_mentioned_p): New.
953         (nds32_legitimize_ict_address): New.
954         (nds32_expand_ict_move): New.
955         (nds32_indirect_call_referenced_p): New.
956         (nds32_symbol_binds_local_p): Delete.
957         (nds32_long_call_p): Modify.
958         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
959         * config/nds32/nds32-protos.h
960         (symbolic_reference_mentioned_p): Declare.
961         (nds32_legitimize_ict_address): Declare.
962         (nds32_expand_ict_move): Declare.
963         (nds32_indirect_call_referenced_p): Declare.
964         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
965         (nds32_relax_group): Use nds32_ict_const_p as condition.
966         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
967         (nds32_asm_file_start): Output ict_model directive in asm code.
968         (nds32_legitimate_address_p): Consider indirect call.
969         (nds32_print_operand): Consider indirect call.
970         (nds32_print_operand_address): Consider indirect call.
971         (nds32_insert_attributes): Handle "indirect_call" attribute.
972         (TARGET_LEGITIMATE_ADDRESS_P): Define.
973         (TARGET_LEGITIMATE_CONSTANT_P): Define.
974         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
975         (TARGET_DELEGITIMIZE_ADDRESS): Define.
976         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
977         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
978         (TARGET_ICT_MODEL_SMALL): Define.
979         (TARGET_ICT_MODEL_LARGE): Define.
980         * config/nds32/nds32.md (movsi): Consider ict model.
981         (call, call_value): Consider ict model.
982         (sibcall, sibcall_value): Consider ict model.
983         * config/nds32/nds32.opt (mict-model): New option.
984         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
985         model.
987 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
988             Monk Chiang  <sh.chiang04@gmail.com>
989             Jim Wilson <jimw@sifive.com>
991         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
992         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
993         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
994         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
995         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
996         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
997         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
998         compute save_libcall_adjustment properly.
999         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1000         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1001         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1002         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1003         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1004         (ABI_SPEC): Handle mabi=ilp32e.
1005         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1006         (RVE): Add RVE mask.
1007         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1008         <-march>: Add rv32e as an example.
1010 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1012         PR c++/82899
1013         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1014         (intra_create_variable_infos): Handle C++ constructors.
1016 2018-05-18  Martin Liska  <mliska@suse.cz>
1018         * passes.def: Remove a redundant pass.
1020 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1022         PR bootstrap/85838
1023         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1025 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1027         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1028         (ARMv4): Update.
1029         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1030         (ARMv6m): Update.
1031         (armv2, armv2a, armv3, armv3m): Delete architectures.
1032         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1033         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1034         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1035         Delete cpus.
1036         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1037         (*mulsidi3adddi): Likewise.
1038         (mulsidi3): Likewise.
1039         (*mulsidi3_nov6): Likewise.
1040         (umulsidi3): Likewise.
1041         (umulsidi3_nov6): Likewise.
1042         (umaddsidi4): Likewise.
1043         (*umulsidi3adddi): Likewise.
1044         (smulsi3_highpart): Likewise.
1045         (*smulsi3_highpart_nov6): Likewise.
1046         (umulsi3_highpart): Likewise.
1047         (*umulsi3_highpart_nov6): Likewise.
1048         * config/arm/arm.h (arm_arch3m): Delete.
1049         * config/arm/arm.c (arm_arch3m): Delete.
1050         (arm_option_override_internal): Update armv3-related comment.
1051         (arm_configure_build_target): Delete use of isa_bit_mode32.
1052         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1053         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1054         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1055         (mulsa3): Likewise.
1056         (mulusa3): Likewise.
1057         * config/arm/arm-protos.h (arm_arch3m): Delete.
1058         * config/arm/arm-tables.opt: Regenerate.
1059         * config/arm/arm-tune.md: Likewise.
1060         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1061         deleted architectures.
1063 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1065         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1066         (armv5t, armv5te): New features.
1067         (ARMv5, ARMv5e): Delete fgroups.
1068         (ARMv5t, ARMv5te): Adjust for above changes.
1069         (ARMv6m): Likewise.
1070         (armv5, armv5e): Delete arches.
1071         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1072         arm_arch5.
1073         (*call_reg_arm): Likewise.
1074         (*call_value_reg_armv5): Likewise.
1075         (*call_value_reg_arm): Likewise.
1076         (*call_symbol): Likewise.
1077         (*call_value_symbol): Likewise.
1078         (*sibcall_insn): Likewise.
1079         (*sibcall_value_insn): Likewise.
1080         (clzsi2): Likewise.
1081         (prefetch): Likewise.
1082         (define_split and define_peephole2 dependent on arm_arch5):
1083         Likewise.
1084         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1085         arm_arch5e.
1086         (TARGET_ARM_QBIT): Likewise.
1087         (TARGET_DSP_MULTIPLY): Likewise.
1088         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1089         (arm_arch5, arm_arch5e): Delete.
1090         (arm_arch5t, arm_arch5te): Declare.
1091         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1092         (arm_arch5t): Declare.
1093         (arm_option_reconfigure_globals): Update for the above.
1094         (arm_options_perform_arch_sanity_checks): Update comment, replace
1095         use of arm_arch5 with arm_arch5t.
1096         (use_return_insn): Likewise.
1097         (arm_emit_call_insn): Likewise.
1098         (output_return_instruction): Likewise.
1099         (arm_final_prescan_insn): Likewise.
1100         (arm_coproc_builtin_available): Likewise.
1101         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1102         arm_arch5e with arm_arch5t and arm_arch5te.
1103         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1104         (arm_arch5t, arm_arch5te): Declare.
1105         * config/arm/arm-tables.opt: Regenerate.
1106         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1107         * config/arm/t-multilib: Likewise.
1108         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1109         instead of arm_arch5.
1110         (*call_reg_thumb1): Likewise.
1111         (*call_value_reg_thumb1_v5): Likewise.
1112         (*call_value_reg_thumb1): Likewise.
1113         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1114         unreachable path.
1115         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1117 2018-05-18  Martin Liska  <mliska@suse.cz>
1119         PR gcov-profile/84846
1120         * doc/gcov.texi: Document -t option of gcov tool.
1122 2018-05-18  Martin Liska  <mliska@suse.cz>
1124         PR gcov-profile/84846
1125         * gcov.c (print_usage): Add new -t option.
1126         (process_args): Handle the option.
1127         (generate_results): Use stdout as output when requested by
1128         the option.
1130 2018-05-18  Martin Liska  <mliska@suse.cz>
1132         PR gcov-profile/84846
1133         * coverage.c (coverage_init): Write PWD to .gcno file.
1134         * doc/gcov.texi: Document how working directory is printed.
1135         * gcov-dump.c (dump_gcov_file): Print PWD.
1136         * gcov.c (output_intermediate_file): Likewise.
1137         (read_graph_file): Read PWD string.
1138         (output_lines): Print PWD.
1140 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1142         PR middle-end/85817
1143         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1144         for retval and return false if all args to phi are zero.        
1146 2018-05-18  Richard Biener  <rguenther@suse.de>
1148         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1149         method.
1150         (evrp_dom_walker::before_dom_children): Call it.
1152 2018-05-18  Richard Biener  <rguenther@suse.de>
1154         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1155         results when processing array refs with variable index.
1157 2018-05-18  Toon Moene  <toon@moene.org>
1159         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1160         directly after that of -floop-interchange. Indicate that both
1161         options are enabled by default when specifying -O3. 
1163 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1165         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1166         iterator.  Delete separate integer-mode vec_set<mode> expander.
1167         (aarch64_simd_vec_setv2di): Delete.
1168         (vec_setv2di): Delete.
1169         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1170         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1171         the "w, r" alternative.
1173 2018-05-18  Martin Liska  <mliska@suse.cz>
1175         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1176         * tree-pass.h (make_pass_lower_switch_O0): New function.
1177         * tree-switch-conversion.c (node_has_low_bound): Remove.
1178         (node_has_high_bound): Likewise.
1179         (node_is_bounded): Likewise.
1180         (class pass_lower_switch): Make it a template type and create
1181         two instances.
1182         (pass_lower_switch::execute): Add template argument.
1183         (make_pass_lower_switch): New function.
1184         (make_pass_lower_switch_O0): New function.
1185         (do_jump_if_equal): Remove.
1186         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1187         all the hard work to tree optimization passes.
1189 2018-05-18  Martin Liska  <mliska@suse.cz>
1191         * dbgcnt.c (limit_low): Renamed from limit.
1192         (limit_high): New variable.
1193         (dbg_cnt_is_enabled): Check for upper limit.
1194         (dbg_cnt): Adjust dumping.
1195         (dbg_cnt_set_limit_by_index): Add new argument for high
1196         value.
1197         (dbg_cnt_set_limit_by_name): Likewise.
1198         (dbg_cnt_process_single_pair): Parse new format.
1199         (dbg_cnt_process_opt): Use strtok.
1200         (dbg_cnt_list_all_counters): Remove 'value' and add
1201         'limit_high'.
1202         * doc/invoke.texi: Document changes.
1204 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1206         * doc/sourcebuild.texi (scalar_all_fma): Document.
1207         * tree.def (FMA_EXPR): Delete.
1208         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1209         * internal-fn.c (ternary_direct): New macro.
1210         (expand_ternary_optab_fn): Likewise.
1211         (direct_ternary_optab_supported_p): Likewise.
1212         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1213         * builtins.c (fold_builtin_fma): Delete.
1214         (fold_builtin_3): Don't call it.
1215         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1216         * expr.c (expand_expr_real_2): Likewise.
1217         * fold-const.c (operand_equal_p): Likewise.
1218         (fold_ternary_loc): Likewise.
1219         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1220         * gimple.c (DEFTREECODE): Likewise.
1221         * gimplify.c (gimplify_expr): Likewise.
1222         * optabs-tree.c (optab_for_tree_code): Likewise.
1223         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1224         * tree-eh.c (operation_could_trap_p): Likewise.
1225         (stmt_could_throw_1_p): Likewise.
1226         * tree-inline.c (estimate_operator_cost): Likewise.
1227         * tree-pretty-print.c (dump_generic_node): Likewise.
1228         (op_code_prio): Likewise.
1229         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1230         * tree-ssa-operands.c (get_expr_operands): Likewise.
1231         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1232         * fold-const-call.h (fold_fma): Delete.
1233         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1234         CFN_FNMA and CFN_FNMS.
1235         (fold_fma): Delete.
1236         * genmatch.c (combined_fn): New enum.
1237         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1238         (commutative_op): New function.
1239         (commutate): Use it.  Handle more than 2 operands.
1240         (dt_operand::gen_gimple_expr): Use commutative_op.
1241         (parser::parse_expr): Allow :c to be used with non-binary
1242         operators if the commutative operand is known.
1243         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1244         CFN_FMS, CFN_FNMA and CFN_FNMS.
1245         (backprop::process_assign_use): Remove FMA_EXPR handling.
1246         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1247         (gen_hsa_fma): New function.
1248         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1249         IFN_FNMA and IFN_FNMS.
1250         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1251         * gimple-fold.h (follow_all_ssa_edges): Declare.
1252         * gimple-fold.c (follow_all_ssa_edges): New function.
1253         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1254         gimple_build interface and use follow_all_ssa_edges to fold the result.
1255         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1256         instead of checking for optabs directly.
1257         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1258         rather than FMA_EXPRs.
1259         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1260         call to IFN_FMA instead of an FMA_EXPR.
1262 2018-05-17  Jim Wilson  <jimw@sifive.com>
1264         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1265         sign extended promoted subreg, and the range does not have the sign bit
1266         set, then do a sign extend.
1268         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1269         test, check for sign extended subreg and/or constant operands, and
1270         do a sign extend in that case.
1272 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1274         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1275         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1276         Add untyped.
1277         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1278         Change logics_shift_reg to logics_shift_imm.
1279         (thunderx2t99_fp_loadpair_basic): Delete.
1280         (thunderx2t99_fp_storepair_basic): Delete.
1281         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1282         (thunderx2t99_asimd_polynomial): Delete.
1283         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1284         and neon_fp_mul_d_scalar_q.
1285         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1286         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1287         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1288         (thunderx2t99_asimd_lut): Add missing tbl types.
1289         (thunderx2t99_asimd_ext): Delete.
1290         (thunderx2t99_asimd_load1_1_mult): Delete.
1291         (thunderx2t99_asimd_load1_2_mult): Delete.
1292         (thunderx2t99_asimd_load1_ldp): New.
1293         (thunderx2t99_asimd_load1): New.
1294         (thunderx2t99_asimd_load2): Add missing *load2* types.
1295         (thunderx2t99_asimd_load3): New.
1296         (thunderx2t99_asimd_load4): New.
1297         (thunderx2t99_asimd_store1_1_mult): Delete.
1298         (thunderx2t99_asimd_store1_2_mult): Delete.
1299         (thunderx2t99_asimd_store2_mult): Delete.
1300         (thunderx2t99_asimd_store2_onelane): Delete.
1301         (thunderx2t99_asimd_store_stp): New.
1302         (thunderx2t99_asimd_store1): New.
1303         (thunderx2t99_asimd_store2): New.
1304         (thunderx2t99_asimd_store3): New.
1305         (thunderx2t99_asimd_store4): New.
1307 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1309         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1310         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1312 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1313             Segher Boessenkool  <segher@kernel.crashing.org>
1315         PR target/85698
1316         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1317         operand.
1319 2018-05-17  Richard Biener  <rguenther@suse.de>
1321         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1322         for pruning loop and prune defs feeding only already visited PHIs.
1324 2018-05-17  Richard Biener  <rguenther@suse.de>
1326         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1328 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1329             Richard Biener  <rguenther@suse.de>
1331         PR tree-optimization/85793
1332         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1333         for VMAT_ELEMENTWISE.
1335 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1337         * internal-fn.h (lookup_internal_fn): Declare
1338         * internal-fn.c (lookup_internal_fn): New function.
1339         * gimple.c (gimple_build_call_from_tree): Handle calls to
1340         internal functions.
1341         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1342         internal function names.
1343         * tree-pretty-print.c (dump_generic_node): Likewise.
1344         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1346 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1348         * gimple-fold.h (gimple_build): Make the function forms take
1349         combined_fn rather than built_in_function.
1350         (gimple_simplify): Likewise.
1351         * gimple-match-head.c (gimple_simplify): Likewise.
1352         * gimple-fold.c (gimple_build): Likewise.
1353         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1354         rather than gimple_build_call_internal.
1355         (get_initial_defs_for_reduction): Likewise.
1356         (vect_create_epilog_for_reduction): Likewise.
1357         (vectorizable_live_operation): Likewise.
1359 2018-05-17  Martin Liska  <mliska@suse.cz>
1361         * gimple-ssa-sprintf.c (format_directive): Do not use
1362         space in between 'G_' and '('.
1364 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1366         PR target/85323
1367         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1368         even if the mask is not all ones.
1370         PR target/85323
1371         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1372         vector.
1373         (ix86_gimple_fold_builtin): Likewise.
1375         PR target/85323
1376         * config/i386/i386.c: Include tree-vector-builder.h.
1377         (ix86_vector_shift_count): New function.
1378         (ix86_fold_builtin): Fold shift builtins by scalar count.
1379         (ix86_gimple_fold_builtin): Likewise.
1381         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1382         _mm512_setzero): New intrinsics.
1384 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1385             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1387         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1388         code generation for cases where splatting a value is not useful.
1389         * simplify-rtx.c (simplify_ternary_operation): Simplify
1390         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1391         mode to a vec_concat.
1393 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1395         * config.gcc: Support "goldmont-plus".
1396         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1397         "goldmont-plus".
1398         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1399         PROCESSOR_GOLDMONT_PLUS.
1400         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1401         (processor_target_table): Add "goldmont-plus".
1402         (PTA_GOLDMONT_PLUS): Define.
1403         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1404         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1405         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1406         (fold_builtin_cpu): Add "goldmont-plus".
1407         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1408         (ix86_option_override_internal): Add "goldmont-plus".
1409         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1410         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1411         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1412         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1414 2018-05-17  Richard Biener  <rguenther@suse.de>
1416         PR tree-optimization/85757
1417         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1418         remove defs that only feed that PHI from further processing.
1420 2018-05-16  Jim Wilson  <jimw@sifive.com>
1422         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1423         asterisk to name.
1424         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1426 2018-05-16  Mark Wielaard  <mark@klomp.org>
1428         * dwarf2out.c (count_index_strings): New function.
1429         (output_indirect_strings): Call count_index_strings and generate
1430         header for dwarf_version >= 5.
1432 2018-05-16  Mark Wielaard  <mark@klomp.org>
1434         * dwarf2out.c (dwarf_FORM): New function.
1435         (set_indirect_string): Use dwarf_FORM.
1436         (reset_indirect_string): Likewise.
1437         (size_of_die): Likewise.
1438         (value_format): Likewise.
1439         (output_die): Likewise.
1440         (add_skeleton_AT_string): Likewise.
1441         (output_macinfo_op): Likewise.
1442         (index_string): Likewise.
1443         (output_index_string_offset): Likewise.
1444         (output_index_string): Likewise.
1445         (count_index_strings): Likewise.
1447 2018-05-16  Carl Love  <cel@us.ibm.com>
1449         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1450         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1452 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1454         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1455         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1457 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1459         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1460         (fnma<mode>4): Likewise.
1461         (fms<mode>4): Likewise.
1462         (fnms<mode>4): Likewise.
1463         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1464         (aarch64_fnma<mode>4): Likewise.
1465         (aarch64_fms<mode>4): Likewise.
1466         (aarch64_fnms<mode>4): Likewise.
1467         (aarch64_fnmadd<mode>4): Likewise.
1469 2018-05-16  Jason Merrill  <jason@redhat.com>
1471         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1473 2018-05-16  Richard Biener  <rguenther@suse.de>
1475         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1476         (dump_stmt_cost): Declare.
1477         (add_stmt_cost): Dump cost we add.
1478         (add_stmt_costs): New function.
1479         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1480         No longer exported.
1481         (vect_analyze_stmt): Adjust prototype.
1482         (vectorizable_condition): Likewise.
1483         (vectorizable_live_operation): Likewise.
1484         (vectorizable_reduction): Likewise.
1485         (vectorizable_induction): Likewise.
1486         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1487         cost vector to pass to vectorizable_ and record afterwards.
1488         (vect_model_reduction_cost): Take cost vector argument and adjust.
1489         (vect_model_induction_cost): Likewise.
1490         (vectorizable_reduction): Likewise.
1491         (vectorizable_induction): Likewise.
1492         (vectorizable_live_operation): Likewise.
1493         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1494         SLP_TREE_NUMBER_OF_VEC_STMTS.
1495         (vect_analyze_slp_cost_1): Remove.
1496         (vect_analyze_slp_cost): Likewise.
1497         (vect_slp_analyze_node_operations): Take visited args and
1498         a target cost vector.  Avoid processing already visited stmt sets.
1499         (vect_slp_analyze_operations): Use a local cost vector to gather
1500         costs and register those of non-discarded instances.
1501         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1502         (vect_schedule_slp_instance): Remove copying of
1503         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1504         zero.
1505         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1506         adding cost.  Record cost entry location.
1507         (vect_prologue_cost_for_slp_op): Function to compute cost of
1508         a constant or invariant generated for SLP vect in the prologue,
1509         split out from vect_analyze_slp_cost_1.
1510         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1511         (vect_model_promotion_demotion_cost): Likewise.
1512         (vect_model_store_cost): Likewise, make static.
1513         (vect_model_load_cost): Likewise.
1514         (vectorizable_bswap): Add cost vector arg and adjust.
1515         (vectorizable_call): Likewise.
1516         (vectorizable_simd_clone_call): Likewise.
1517         (vectorizable_conversion): Likewise.
1518         (vectorizable_assignment): Likewise.
1519         (vectorizable_shift): Likewise.
1520         (vectorizable_operation): Likewise.
1521         (vectorizable_store): Likewise.
1522         (vectorizable_load): Likewise.
1523         (vectorizable_condition): Likewise.
1524         (vectorizable_comparison): Likewise.
1525         (can_vectorize_live_stmts): Likewise.
1526         (vect_analyze_stmt): Likewise.
1527         (vect_transform_stmt): Adjust calls to vectorizable_*.
1528         * tree-vectorizer.c: Include gimple-pretty-print.h.
1529         (dump_stmt_cost): New function.
1531 2018-05-16  Richard Biener  <rguenther@suse.de>
1533         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1534         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1535         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1536         (check_name): New callback.
1537         (dse_classify_store): Track cycles via a visited bitmap of PHI
1538         defs and simplify handling of in-loop and across loop dead stores
1539         and properly fail for loop-variant refs.  Handle byte-tracking with
1540         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1541         limiting the walk.
1543 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1545         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1546         (vect_get_mask_type_for_stmt): Likewise.
1547         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1548         split out from...
1549         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1550         to determine the statement's vector type and the vector type that
1551         should be used for calculating nunits.  Deal with cases in which
1552         the type has to be deferred.
1553         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1554         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1555         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1556         (vect_determine_vf_for_stmt): New functions, split out from...
1557         (vect_determine_vectorization_factor): ...here.
1558         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1559         (vect_get_mask_type_for_stmt): New functions, split out from
1560         vect_determine_vectorization_factor.
1562 2018-05-16  Richard Biener  <rguenther@suse.de>
1564         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1565         verify the [VEC_]COND_EXPR embedded comparison.
1567 2018-05-15  Martin Sebor  <msebor@redhat.com>
1569         PR tree-optimization/85753
1570         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1571         RECORD_TYPE in addition to ARRAY_TYPE.
1573 2018-05-15  Martin Sebor  <msebor@redhat.com>
1575         PR middle-end/85643
1576         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1578 2018-05-15  Richard Biener  <rguenther@suse.de>
1580         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1581         add by_clobber_p one.  Change algorithm to collect all defs
1582         representing uses we need to walk and try reducing them to
1583         a single one before failing.
1584         (dse_dom_walker::dse_optimize_stmt): Adjust.
1586 2018-05-13  Mark Wielaard  <mark@klomp.org>
1588         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1589         (size_of_loc_descr): Likewise.
1590         (output_loc_operands): Likewise.
1591         (output_loc_operands_raw): Likewise.
1592         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1593         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1594         (hash_loc_operands): Likewise.
1595         (compare_loc_operands): Likewise.
1597 2018-05-14  Mark Wielaard  <mark@klomp.org>
1599         * dwarf2out.c (count_index_addrs): New function.
1600         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1602 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1604         PR tree-optimization/83648
1605         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1606         return value as malloc candidate.
1608 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1610         PR ipa/85734
1611         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1612         as true in call to suggest_attribute.
1614 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1616         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1617         -mreadonly-in-sdata.
1619 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1621         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1622         New pattern.
1623         (aarch64_crypto_aesd_fused): Likewise.
1625 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1627         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1628         (movsi_aarch64): Likewise.
1629         (load_pairsi): Likewise.
1630         (load_pairdi): Likewise.
1631         (store_pairsi): Likewise.
1632         (store_pairdi): Likewise.
1633         (load_pairsf): Likewise.
1634         (load_pairdf): Likewise.
1635         (store_pairsf): Likewise.
1636         (store_pairdf): Likewise.
1637         (zero_extend): Likewise.
1638         (trunc): Swap alternatives.
1639         (fcvt_target): Add '?' to prefer w over r.
1641 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1643         PR target/85756
1644         * config/i386/i386.md: Disallow non-commutative arithmetics in
1645         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1646         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1647         in the peephole2 before it.
1649 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1651         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1652         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1653         (ix86_handle_option): Handle -mcldemote.
1654         * config.gcc: New header.
1655         * config/i386/cldemoteintrin.h: New file.
1656         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1657         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1658         -mcldemote.
1659         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1660         OPTION_MASK_ISA_CLDEMOTE.
1661         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1662         (ix86_valid_target_attribute_inner_p): Ditto.
1663         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1664         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1665         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1666         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1667         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1668         (cldemote): New.
1669         * config/i386/i386.opt: Add -mcldemote.
1670         * config/i386/x86intrin.h: New header.
1671         * doc/invoke.texi: Add -mcldemote.
1673 2018-05-14  Richard Biener  <rguenther@suse.de>
1675         * doc/match-and-simplify.texi: Adjust :s documentation.
1677 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1679         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1680         intended memcpy size.
1681         (REORDER_45): Likewise.
1683 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1685         * sort.cc: New file.
1686         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1687         * vec.c (qsort_chk): Use gcc_qsort.
1688         * Makefile.in (OBJS-libcommon): Add sort.o.
1689         (build/sort.o): New target.  Use it...
1690         (BUILD_RTL): ... here, and...
1691         (build/gencfn-macros): ... here, and...
1692         (build/genmatch): ... here.
1694 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1695             Chung-Ju Wu  <jasonwucj@gmail.com>
1697         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1698         * config/nds32/nds32-graywolf.md: New file.
1699         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1700         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1701         pipeline.
1702         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1703         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1704         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1705         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1706         * config/nds32/pipelines.md: Include n15 settings.
1708 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1709             Chung-Ju Wu  <jasonwucj@gmail.com>
1711         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1712         * config/nds32/nds32-n13.md: New file.
1713         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1714         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1715         pipeline.
1716         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1717         * config/nds32/nds32.md (pipeline_model): Add n13.
1718         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1719         * config/nds32/pipelines.md: Include n13 settings.
1721 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1722             Chung-Ju Wu  <jasonwucj@gmail.com>
1724         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1725         * config/nds32/nds32-n10.md: New file.
1726         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1727         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1728         pipeline.
1729         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1730         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1731         * config/nds32/nds32.md (pipeline_model): Add n10.
1732         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1733         * config/nds32/pipelines.md: Include n10 settings.
1735 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1736             Kito Cheng  <kito.cheng@gmail.com>
1737             Chung-Ju Wu  <jasonwucj@gmail.com>
1739         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1740         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1741         Add enum values for DSP extension instructions.
1742         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1743         New constraints.
1744         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1745         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1746         New code iterators.
1747         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1748         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1749         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1750         * config/nds32/nds32-intrinsic.md: Likewise.
1751         * config/nds32/nds32_intrinsic.h: Likewise.
1752         * config/nds32/nds32-md-auxiliary.c: Likewise.
1753         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1754         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1755         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1756         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1757         * config/nds32/nds32-protos.h: New declarations for DSP extension.
1758         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1759         TYPE_DMAC in switch statement.
1760         * config/nds32/nds32.c: New checking and implementation for DSP
1761         extension instructions.
1762         * config/nds32/nds32.h: Likewise.
1763         * config/nds32/nds32.md: Likewise.
1764         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
1765         * config/nds32/predicates.md: Implement new predicates for DSP
1766         extension.
1768 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1770         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
1771         Reformat alternatives and attributes so it is easier to identify
1772         which constraints/attributes go with which instruction.
1773         (mov<mode>_hardfloat32, FMOVE64): Likewise.
1774         (mov<mode>_softfloat32, FMOVE64): Likewise.
1775         (mov<mode>_hardfloat64, FMOVE64): Likewise.
1776         (mov<mode>_softfloat64, FMOVE64): Likewise.
1778 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1780         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1781         subsection.
1782         (Basic PowerPC Built-in Functions): The new name of the
1783         subsection previously known as "PowerPC Built-in Functions".
1784         (Basic PowerPC Built-in Functions Available on all Configurations):
1785         New subsubsection.
1786         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
1787         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
1788         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
1789         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
1791 2018-05-11  Martin Jambor  <mjambor@suse.cz>
1793         PR ipa/85655
1794         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
1795         single const.
1797 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1799         PR target/85733
1800         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
1802 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
1804         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
1805         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
1806         (ix86_handle_option): Handle -mwaitpkg.
1807         * config.gcc: New header.
1808         * config/i386/cpuid.h (bit_WAITPKG): New bit.
1809         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1810         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1811         function type.
1812         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1813         OPTION_MASK_ISA_WAITPKG.
1814         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1815         (ix86_option_override_internal): Add PTA_WAITPKG.
1816         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1817         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1818         IX86_BUILTIN_TPAUSE.
1819         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1820         __builtin_ia32_umwait and __builtin_ia32_tpause.
1821         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1822         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1823         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1824         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1825         UNSPECV_TPAUSE): New.
1826         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1827         * config/i386/i386.opt: Add -mwaitpkg.
1828         * config/i386/waitpkgintrin.h: New file.
1829         * config/i386/x86intrin.h: New header.
1830         * doc/invoke.texi: Add -mwaitpkg.
1832 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1834         PR target/85606
1835         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1836         equivalent.
1837         (cortex-m0): Use armv6s-m isa.
1838         (cortex-m0plus): Likewise.
1839         (cortex-m1): Likewise.
1840         (cortex-m0.small-multiply): Likewise.
1841         (cortex-m0plus.small-multiply): Likewise.
1842         (cortex-m1.small-multiply): Likewise.
1844 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1845             Jakub Jelinek  <jakub@redhat.com>
1847         PR tree-optimization/85692
1848         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1849         source permute as well.
1851 2018-05-11  Martin Liska  <mliska@suse.cz>
1853         PR sanitizer/85556
1854         * doc/extend.texi: Document LLVM style format for no_sanitize
1855         attribute.
1857 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1859         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1860         mode_supports_vsx_dform_quad to mode_supports_dq_form.
1861         (mode_supports_vsx_dform_quad): Likewise.
1862         (mode_supports_vmx_dform): Move these functions to be next to the
1863         other mode_supports functions.
1864         (mode_supports_dq_form): Likewise.
1865         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1866         mode_supports_dq_form.
1867         (reg_offset_addressing_ok_p): Likewise.
1868         (offsettable_ok_by_alignment): Likewise.
1869         (rs6000_legitimate_offset_address_p): Likewise.
1870         (legitimate_lo_sum_address_p): Likewise.
1871         (rs6000_legitimize_address): Likewise.
1872         (rs6000_legitimize_reload_address): Likewise.
1873         (rs6000_secondary_reload_inner): Likewise.
1874         (rs6000_preferred_reload_class): Likewise.
1875         (rs6000_output_move_128bit): Likewise.
1877 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1879         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1880         Generate SImode target register for null target.
1881         <case IX86_BUILTIN_XGETBV>: Ditto.
1882         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1883         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1885 2018-05-10  Carl Love  <cel@us.ibm.com>
1887         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1888         dcbtt and dcbtstt if operands[2] is 0.
1890 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1892         PR target/85693
1893         * config/i386/sse.md (usadv64qi): New expander.
1895 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
1897         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1898         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1899         -maltivec=be support.
1900         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1901         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1902         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1903         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1904         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1905         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1906         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1907         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1908         altivec_vsumsws): Adjust.
1909         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1910         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1911         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1912         support.
1913         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1914         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1915         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1916         (altivec_lve<VI_char>x): Delete expand.
1917         (*altivec_lve<VI_char>x_internal): Rename to...
1918         (altivec_lve<VI_char>x): ... this.
1919         (altivec_lvxl_<mode>): Delete expand.
1920         (*altivec_lvxl_<mode>_internal): Rename to ...
1921         (altivec_lvxl_<mode>): ... this.
1922         (altivec_stvxl_<mode>): Delete expand.
1923         (*altivec_stvxl_<mode>_internal): Rename to ...
1924         (altivec_stvxl_<mode>): ... this.
1925         (altivec_stve<VI_char>x): Delete expand.
1926         (*altivec_stve<VI_char>x_internal): Rename to ...
1927         (altivec_stve<VI_char>x): ... this.
1928         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1929         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1930         reduc_plus_scal_<mode>): Adjust.
1931         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1932         comment.
1933         (rs6000_cpu_cpp_builtins): Adjust.
1934         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1935         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1936         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1937         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1938         -maltivec=be support.
1939         (rs6000_split_vec_extract_var): Adjust.
1940         (rs6000_split_v4si_init): Adjust.
1941         (swap_selector_for_mode): Delete.
1942         (altivec_expand_lvx_be, altivec_expand_stvx_be,
1943         altivec_expand_stvex_be): Delete.
1944         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1945         -maltivec=be support.
1946         (rs6000_gimple_fold_builtin): Ditto.
1947         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1948         Adjust.
1949         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1950         (TARGET_DIRECT_MOVE_64BIT): Adjust.
1951         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1952         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1953         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1954         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1955         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1956         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1957         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1958         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1959         anonymous split): Adjust.
1960         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1961         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1963 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
1965         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1966         when --with-gxx-include-dir is also specified.
1967         * configure: Regenerate.
1969 2018-05-09  Jim Wilson  <jimw@sifive.com>
1971         PR target/84797
1972         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1973         * config/riscv/t-withmultilib: New.
1974         * config/riscv/withmultilib.h: New.
1975         * doc/install.texi: Document RISC-V --with-multilib-list support.
1977 2018-05-09  Richard Biener  <rguenther@suse.de>
1979         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1980         vector.
1981         (vect_bb_vectorization_profitable_p): Adjust.  Compute
1982         actual scalar cost using the cost vector and the add_stmt_cost
1983         machinery.
1985 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1987         PR rtl-optimization/85645
1988         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1989         in the REG_CFA_REGISTER note for LR, don't leave it empty.
1991 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1993         PR rtl-optimization/85645
1994         * shrink-wrap.c (spread_components): Return a boolean saying if
1995         anything was changed.
1996         (try_shrink_wrapping_separate): Iterate spread_components until
1997         nothing changes anymore.
1999 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2001         PR rtl-optimization/85645
2002         * regrename.c (build_def_use): Also kill the chains that include the
2003         destination of a REG_CFA_REGISTER note.
2005 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2007         PR rtl-optimization/85645
2008         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2009         insn that has a REG_CFA_REGISTER note.
2011 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2013         * cfgexpand.c (expand_clobber): New function.
2014         (expand_gimple_stmt_1): Use it.
2015         * tree-vect-stmts.c (vect_clobber_variable): New function,
2016         split out from...
2017         (vectorizable_simd_clone_call): ...here.
2018         (vectorizable_store): Emit a clobber either side of an
2019         IFN_STORE_LANES sequence.
2020         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2022 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2024         PR target/85626
2025         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2026         (define_insn "trap_if_false"): Add exit after trap.
2028 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2030         PR rtl-optimization/85638
2031         * bb-reorder.c: Include common/common-target.h.
2032         (create_forwarder_block): New function extracted from...
2033         (fix_up_crossing_landing_pad): ...here.  Rename into...
2034         (dw2_fix_up_crossing_landing_pad): ...this.
2035         (sjlj_fix_up_crossing_landing_pad): New function.
2036         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2037         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2038         from both partitions and exit the loop after one iteration.
2040 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2042         Revert:
2043         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2044         subsection.
2045         (Basic PowerPC Built-in Functions): The new name of the
2046         subsection previously known as "PowerPC Built-in Functions".
2047         (Basic PowerPC Built-in Functions Available on all Configurations):
2048         New subsubsection.
2049         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2050         subsubsection.
2051         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2052         subsubsection.
2053         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2054         subsubsection.
2055         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2056         subsubsection.
2058 2018-05-08  Jim Wilson  <jimw@sifive.com>
2060         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2061         (LD_EMUL_SUFFIX): New.
2062         (LINK_SPEC): Use it.
2064 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2066         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2067         subsection.
2068         (Basic PowerPC Built-in Functions): The new name of the
2069         subsection previously known as "PowerPC Built-in Functions".
2070         (Basic PowerPC Built-in Functions Available on all Configurations):
2071         New subsubsection.
2072         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2073         subsubsection.
2074         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2075         subsubsection.
2076         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2077         subsubsection.
2078         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2079         subsubsection.
2081 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2083         PR target/85683
2084         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2085         after cmpelim optimization.
2087 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2089         * config.gcc: Support "goldmont".
2090         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2091         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2092         PROCESSOR_GOLDMONT.
2093         * config/i386/i386.c (m_GOLDMONT): Define.
2094         (processor_target_table): Add "goldmont".
2095         (PTA_GOLDMONT): Define.
2096         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2097         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2098         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2099         (fold_builtin_cpu): Add "goldmont".
2100         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2101         (ix86_option_override_internal): Add "goldmont".
2102         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2103         (processor_type): Add PROCESSOR_GOLDMONT.
2104         * config/i386/i386.md: Add CPU "glm".
2105         * config/i386/glm.md: New file.
2106         * config/i386/x86-tune.def: Add m_GOLDMONT.
2107         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2109 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2111         PR target/85572
2112         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2113         E_V4DImode.
2114         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2115         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2116         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2118         PR target/85317
2119         * config/i386/i386.c (ix86_fold_builtin): Handle
2120         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2122         PR target/85480
2123         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2124         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2126 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2128         PR target/85658
2129         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2130         (check_arch): Likewise.
2131         (check_fpu): Return the result rather than printing it.
2132         (end arch): Fix operator precedence.
2133         (end cpu): Likewise.
2134         (END): Print the result from check_fpu.
2136 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2137             Alan Hayward  <alan.hayward@arm.com>
2138             David Sherwood  <david.sherwood@arm.com>
2140         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2141         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2142         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2143         (*fcmuo<mode>_and): New patterns.
2145 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2147         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2148         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2149         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2150         (cmp_op, sve_imm_con): New code attributes.
2151         (SVE_COND_INT_CMP, imm_con): Delete.
2152         (cmp_op): Remove above unspecs from int attribute.
2153         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2154         to...
2155         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2156         comparison-specific unspecs.
2157         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2158         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2159         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2160         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2161         (*vec_fcm<cmp_op><mode>): Rename to...
2162         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2163         (*vec_fcmuo<mode>): Rename to...
2164         (*fcmuo<mode>): ...this and adjust likewise.
2165         (*pred_fcm<cmp_op><mode>): New pattern.
2166         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2167         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2168         functions.
2169         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2170         and UNORDERED.
2171         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2172         (aarch64_emit_sve_predicated_cond): New function.
2173         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2174         (aarch64_emit_unspec_cond_or): Replace with...
2175         (aarch64_emit_sve_or_conds): ...this new function.  Use
2176         aarch64_emit_sve_ptrue_op for the individual comparisons and
2177         aarch64_emit_binop to OR them together.
2178         (aarch64_emit_inverted_unspec_cond): Replace with...
2179         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2180         aarch64_emit_sve_ptrue_op for the comparison and
2181         aarch64_emit_unop to invert the result.
2182         (aarch64_expand_sve_vec_cmp_float): Update after the above
2183         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2185 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2187         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2188         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2189         (Backwards Compatibility): Likewise.
2191 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2193         PR bootstrap/85681
2194         Revert:
2195         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2197         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2198         <prefetch_dynamic_strides>: New const bool field.
2199         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2200         prefetch_dynamic_strides.
2201         (exynosm1_prefetch_tune): Likewise.
2202         (thunderxt88_prefetch_tune): Likewise.
2203         (thunderx_prefetch_tune): Likewise.
2204         (thunderx2t99_prefetch_tune): Likewise.
2205         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2206         (aarch64_override_options_internal): Update to set
2207         PARAM_PREFETCH_DYNAMIC_STRIDES.
2208         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2209         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2210         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2211         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2212         prefetch-dynamic-strides setting.
2214         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2216         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2217         <minimum_stride>: New const int field.
2218         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2219         minimum_stride field.
2220         (exynosm1_prefetch_tune): Likewise.
2221         (thunderxt88_prefetch_tune): Likewise.
2222         (thunderx_prefetch_tune): Likewise.
2223         (thunderx2t99_prefetch_tune): Likewise.
2224         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2225         (aarch64_override_options_internal): Update to set
2226         PARAM_PREFETCH_MINIMUM_STRIDE.
2227         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2228         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2229         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2230         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2231         stride is constant and is below the minimum stride threshold.
2233 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2235         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2236         to 512.
2238 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2240         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2241         <prefetch_dynamic_strides>: New const bool field.
2242         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2243         prefetch_dynamic_strides.
2244         (exynosm1_prefetch_tune): Likewise.
2245         (thunderxt88_prefetch_tune): Likewise.
2246         (thunderx_prefetch_tune): Likewise.
2247         (thunderx2t99_prefetch_tune): Likewise.
2248         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2249         (aarch64_override_options_internal): Update to set
2250         PARAM_PREFETCH_DYNAMIC_STRIDES.
2251         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2252         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2253         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2254         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2255         prefetch-dynamic-strides setting.
2257 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2259         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2260         <minimum_stride>: New const int field.
2261         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2262         minimum_stride field.
2263         (exynosm1_prefetch_tune): Likewise.
2264         (thunderxt88_prefetch_tune): Likewise.
2265         (thunderx_prefetch_tune): Likewise.
2266         (thunderx2t99_prefetch_tune): Likewise.
2267         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2268         (aarch64_override_options_internal): Update to set
2269         PARAM_PREFETCH_MINIMUM_STRIDE.
2270         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2271         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2272         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2273         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2274         stride is constant and is below the minimum stride threshold.
2276 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2278         PR c++/85659
2279         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2280         the type is addressable.  Don't force op into register if it has
2281         BLKmode.
2283 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2285         PR other/77609
2286         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2287         any section for which we don't know a specific type it should have,
2288         regardless of name.  Previously this was done only for the exact
2289         names ".init_array", ".fini_array", and ".preinit_array".
2290         (default_elf_asm_named_section): Add comment about
2291         relationship with default_section_type_flags and SECTION_NOTYPE.
2292         (get_section): Don't consider it a type conflict if one side has
2293         SECTION_NOTYPE and the other doesn't, as long as neither has the
2294         SECTION_BSS et al used in the default_section_type_flags logic.
2296 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2298         PR target/85653
2299         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2300         (workaround_barsyncs): New function.
2301         (nvptx_reorg): Use workaround_barsyncs.
2302         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2303         (define_expand "nvptx_membar_cta"): New define_expand.
2304         (define_insn "*nvptx_membar_cta"): New insn.
2306 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2308         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2309         To improve optimization opportunities.
2310         * builtin-types.def: The new needed builtin types for the above.
2312 2018-05-04  Richard Biener  <rguenther@suse.de>
2314         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2315         * gimple-ssa-store-merging.c
2316         (imm_store_chain_info::output_merged_store): Remove redundant create,
2317         release split_store vector contents on failure.
2318         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2319         scalar stmt vector on cache hit.
2321 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2323         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2324         Xilinx FP support.
2325         * config.gcc (powerpc-xilinx-eabi*): Remove.
2326         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2327         support.
2328         (fusion_addis_mem_combo_load): Ditto.
2329         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2330         FP support.
2331         (rs6000_cpu_cpp_builtins): Ditto.
2332         * config/rs6000/rs6000-linux.c
2333         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2334         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2335         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2336         support.
2337         (rs6000_setup_reg_addr_masks): Ditto.
2338         (rs6000_init_hard_regno_mode_ok): Ditto.
2339         (rs6000_option_override_internal): Ditto.
2340         (legitimate_lo_sum_address_p): Ditto.
2341         (rs6000_legitimize_address): Ditto.
2342         (rs6000_legitimize_reload_address): Ditto.
2343         (rs6000_legitimate_address_p): Ditto.
2344         (abi_v4_pass_in_fpr): Ditto.
2345         (setup_incoming_varargs): Ditto.
2346         (rs6000_gimplify_va_arg): Ditto.
2347         (rs6000_split_multireg_move): Ditto.
2348         (rs6000_savres_strategy): Ditto.
2349         (rs6000_emit_prologue_components): Ditto.
2350         (rs6000_emit_epilogue_components): Ditto.
2351         (rs6000_emit_prologue): Ditto.
2352         (rs6000_emit_epilogue): Ditto.
2353         (rs6000_elf_file_end): Ditto.
2354         (rs6000_function_value): Ditto.
2355         (rs6000_libcall_value): Ditto.
2356         * config/rs6000/rs6000.h: Ditto.
2357         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2358         (TARGET_MINMAX): ... this.  New.
2359         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2360         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2361         (*movsi_internal1_single): Delete.
2362         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2363         mfpu=, mxilinx-fpu): Delete.
2364         * config/rs6000/singlefp.h: Delete.
2365         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2366         * config/rs6000/t-rs6000: Ditto.
2367         * config/rs6000/t-xilinx: Delete.
2368         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2369         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2370         (VStype_simple): Delete.
2371         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2372         * config/rs6000/xfpu.h: Delete.
2373         * config/rs6000/xfpu.md: Delete.
2374         * config/rs6000/xilinx.h: Delete.
2375         * config/rs6000/xilinx.opt: Delete.
2376         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2377         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2379 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2381         PR libgomp/85639
2382         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2383         if ignore == 0.
2385 2018-05-04  Richard Biener  <rguenther@suse.de>
2387         PR middle-end/85627
2388         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2389         (expand_complex_div_wide): Likewise.
2390         (expand_complex_operations_1): Likewise.
2391         (expand_complex_libcall): Preserve EH info of the original stmt.
2392         (tree_lower_complex): Handle removed blocks.
2393         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2394         on complex multiplication and division libcall builtins.
2396 2018-05-04  Richard Biener  <rguenther@suse.de>
2398         PR middle-end/85574
2399         * fold-const.c (negate_expr_p): Restrict negation of operand
2400         zero of a division to when we know that can happen without
2401         overflow.
2402         (fold_negate_expr_1): Likewise.
2404 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2406         PR libstdc++/85466
2407         * real.h (real_nextafter): Declare.
2408         * real.c (real_nextafter): New function.
2409         * fold-const-call.c (fold_const_nextafter): New function.
2410         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2411         CASE_CFN_NEXTTOWARD.
2412         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2413         even when arg1_mode is different from arg0_mode.
2415 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2417         * doc/extend.texi (Deprecated Features): Remove
2418         -ffriend-injection.
2419         (Backwards Compatibility): Likewise.
2420         * doc/invoke.texi (C++ Language Options): Likewise.
2421         (C++ Dialect Options): Likewise.
2423 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2425         PR target/85530
2426         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2427         _mm512_mask_mullox_epi64): New intrinsics.
2429 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2431         PR testsuite/85106
2432         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2433         dump files): Add offload-tree.
2435 2018-05-03  Richard Biener  <rguenther@suse.de>
2437         PR tree-optimization/85615
2438         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2439         to loops not nested in BBs loop father to avoid creating multi-entry
2440         loops.
2442 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2444         PR tree-optimization/70291
2445         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2446         arguments.  Change return type to tree.  Emit libcall as a new
2447         statement rather than replacing existing one when inplace_p is true.
2448         (expand_complex_multiplication_components): New function.
2449         (expand_complex_multiplication): Expand floating-point complex
2450         multiplication using the above.
2451         (expand_complex_division): Rename inner_type parameter to type.
2452         Update expand_complex_libcall call-site.
2453         (expand_complex_operations_1): Update expand_complex_multiplication
2454         and expand_complex_division call-sites.
2456 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2458         PR target/85582
2459         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2460         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2461         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2462         the highest significant bit of the shift count mask is clear.  In
2463         check whether and[sq]i3 is needed verify that all significant bits
2464         of the shift count other than the highest are set.
2466 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2468         PR libgomp/82428
2469         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2470         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2471         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2472         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2473         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2474         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2475         __builtin_goacc_parlevel_size.
2477 2018-05-02  Richard Biener  <rguenther@suse.de>
2479         PR tree-optimization/85597
2480         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2481         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2482         directly.
2484 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2486         PR testsuite/85106
2487         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2488         dump files): Add ltrans-tree.
2490 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2492         PR testsuite/85106
2493         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2494         dump files): Add wpa-ipa.
2496 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2498         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2499         powerpc*-*-linux*paired* target.
2500         * config/rs6000/750cl.h: Delete.
2501         * config/rs6000/paired.h: Delete.
2502         * config/rs6000/paired.md: Delete.
2503         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2504         float support.
2505         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2506         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2507         comment.  Remove paired float support.
2508         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2509         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2510         VECTOR_PAIRED.
2511         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2512         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2513         declarations.
2514         * config/rs6000/rs6000.c: Remove paired float support.
2515         (paired_expand_vector_init, paired_expand_vector_move,
2516         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2517         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2518         paired_expand_builtin, paired_expand_predicate_builtin,
2519         paired_init_builtins): Delete.
2520         * config/rs6000/rs6000.h: Remove paired float support.
2521         * config/rs6000/rs6000.md: Remove paired float support.
2522         (move_from_CR_ov_bit): Delete.
2523         * config/rs6000/rs6000.opt (mpaired): Delete.
2524         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2525         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2527 2018-05-02  Richard Biener  <rguenther@suse.de>
2529         PR middle-end/85567
2530         * gimplify.c (gimplify_save_expr): When in SSA form allow
2531         SAVE_EXPRs to compute to SSA vars.
2533 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2535         PR target/85582
2536         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2537         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2538         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2539         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2541 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2543         PR tree-optimization/85586
2544         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2545         exit early for statements in the same group if the accesses are
2546         not strided.
2548 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2550         PR lto/85451
2551         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2552         error message.
2554 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2556         PR tree-optimization/85143
2557         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2559 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2561         PR lto/85451
2562         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2563         not found" error message.
2565 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2567         PR other/83786
2568         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2569         * vec.c (test_ordered_remove_if): New function.
2570         (vec_c_tests): Call test_ordered_remove_if.
2571         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2572         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2573         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2574         VEC_ORDERED_REMOVE_IF.
2576 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2578         PR tree-optimization/82665
2579         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2580         pointer subtraction where arguments come from a memchr call.
2582 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2584         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2585         --push-state --as-needed and --pop-state instead of --as-needed and
2586         --no-as-needed if ld supports it.
2587         * configure: Regenerated.
2589         PR web/85578
2590         * doc/install.texi2html: Replace _002d with - and _002a with * in
2591         generated html files using sed.
2593 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2595         PR c++/85523
2596         * gcc-rich-location.c (blank_line_before_p): New function.
2597         (use_new_line): New function.
2598         (gcc_rich_location::add_fixit_insert_formatted): New function.
2599         * gcc-rich-location.h
2600         (gcc_rich_location::add_fixit_insert_formatted): New function.
2602 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2604         * selftest.c (assert_streq): Rename "expected" and "actual" to
2605         "val1" and "val2".  Extend NULL-handling to cover both inputs
2606         symmetrically, while still requiring both to be non-NULL for a pass.
2607         * selftest.h (assert_streq): Rename "expected" and "actual" to
2608         "val1" and "val2".
2609         (ASSERT_EQ): Likewise.
2610         (ASSERT_EQ_AT): Likewise.
2611         (ASSERT_KNOWN_EQ): Likewise.
2612         (ASSERT_KNOWN_EQ_AT): Likewise.
2613         (ASSERT_NE): Likewise.
2614         (ASSERT_MAYBE_NE): Likewise.
2615         (ASSERT_MAYBE_NE_AT): Likewise.
2616         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2617         the assertion to pass.
2618         (ASSERT_STREQ_AT): Likewise.
2620 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2622         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2623         interaction with -pie.
2625 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2627         * selftest.h: Fix alphabetization of per-source-file selftest
2628         declarations.
2630 2018-04-30  Jason Merrill  <jason@redhat.com>
2632         PR c++/61982 - dead stores to destroyed objects.
2633         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2634         of clobber.
2636 2018-04-30  Jason Merrill  <jason@redhat.com>
2638         * tree.c (build_clobber): New.
2639         * tree.h: Declare it.
2640         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2642 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2644         * diagnostic-show-locus.c (layout::layout): Update for
2645         location_get_source_line returning a char_span.
2646         (struct char_span): Move to input.h.
2647         (struct correction): Update for fields in char_span becoming
2648         private.
2649         (struct source_line): Update for location_get_source_line
2650         returning a char_span.
2651         (layout::print_line): Likewise.
2652         * edit-context.c (edited_file::print_content): Likewise.
2653         (edited_file::print_diff_hunk): Likewise.
2654         (edited_file::print_run_of_changed_lines): Likewise.
2655         (edited_file::get_num_lines): Likewise.
2656         (edited_line::edited_line): Likewise.
2657         * final.c (asm_show_source): Likewise.
2658         * input.c (location_get_source_line): Convert return type
2659         from const char * to char_span, losing the final "line_len"
2660         param.
2661         (dump_location_info): Update for the above.
2662         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2663         when handling the literal within the line.
2664         (test_reading_source_line): Update for location_get_source_line
2665         returning a char_span.
2666         * input.h (class char_span): Move here from
2667         diagnostic-show-locus.c, converting from a struct to a class.
2668         Make data members private.
2669         (char_span::operator bool): New.
2670         (char_span::length): New.
2671         (char_span::get_buffer): New.
2672         (char_span::operator[]): New.
2673         (char_span::subspan): Make const.
2674         (char_span::xstrdup): New.
2675         (location_get_source_line): Convert return type from const char *
2676         to char_span, losing the final "line_size" param.
2678 2018-04-30  Jan Hubicka  <jh@suse.cz>
2680         * lto-wrapper.c (ltrans_priorities): New static var.
2681         (cmp_priority): New.
2682         (run_gcc): Read priorities and if doing parallel build order
2683         the Makefile by them.
2685 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2687         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2689 2018-04-30  Richard Biener  <rguenther@suse.de>
2691         * tree-cfg.c (verify_address): Remove base argument, add
2692         flag whether to check TREE_ADDRESSABLE and do that.
2693         (verify_expr): Remove.
2694         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2695         (verify_gimple_assign_single): Likewise.
2696         (verify_gimple_switch): Likewise.
2697         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2698         piece from verify_expr.
2699         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2701 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2703         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2705 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2707         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2708         (small_data_pattern): Likewise.
2709         (arc_rewrite_small_data): Likewise.
2710         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2711         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2712         (get_symbol_alignment): New function.
2713         (legitimate_small_data_address_p): Likewise.
2714         (legitimate_scaled_address): Update, call
2715         legitimate_small_data_address_p.
2716         (output_sdata): New static variable.
2717         (arc_print_operand): Update how we handle small data operands.
2718         (arc_print_operand_address): Likewise.
2719         (arc_legitimate_address_p): Update, use
2720         legitimate_small_data_address_p.
2721         (arc_rewrite_small_data_p): Remove.
2722         (arc_rewrite_small_data_1): Likewise.
2723         (arc_rewrite_small_data): Likewise.
2724         (small_data_pattern): Likewise.
2725         (compact_sda_memory_operand): Update to use
2726         legitimate_small_data_address_p and get_symbol_alignment.
2727         (prepare_move_operands): Don't rewite sdata pattern.
2728         (prepare_extend_operands): Remove.
2729         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2730         pattern.
2731         (zero_extendqisi2): Likewise.
2732         (zero_extendhisi2): Likewise.
2733         (extendqihi2): Likewise.
2734         (extendqisi2): Likewise.
2735         (extendhisi2): Likewise.
2736         (addsi3): Likewise.
2737         (subsi3): Likewise.
2738         (andsi3): Likewise.
2739         * config/arc/constraints.md (Usd): Change it to memory constraint.
2741 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2743         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2744         as source of std instructions.
2745         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2746         allow 6-bit constants as source for store instructions.
2747         (movdi_insn): Update instruction pattern to allow 6-bit constants
2748         as source for store instructions.
2750 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2752         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2754 2018-04-30  Nathan Sidwell  <nathan@acm.org>
2755             Sandra Loosemore <sandra@codesourcery.com>
2757         * dumpfile.c (dump_open): Allow '-' for stdout.
2758         * doc/invoke.texi (Developer Options): Document dump filename
2759         determination early.  Document stdin/stdout selection.
2761 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
2763         Microblaze Target: PIC data text relative
2765         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
2766         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
2767         Add declaration.
2768         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
2769         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
2770         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
2771         New addressing mode for data-text relative position indepenedent code.
2772         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
2773         'ADDRESS_SYMBOLIC_TXT_REL'.
2774         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
2775         (microblaze_legitimate_pic_operand): Exclude function calls from
2776         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
2777         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
2778         addresses cases.
2779         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2780         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2781         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
2782         for 'address + offset'.
2783         (microblaze_expand_prologue): Add new function prologue call for
2784         'r20' assignation.
2785         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
2786         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
2787         table in case of TARGET_PIC_DATA_TEXT_REL.
2788         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
2789         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
2790         Add new macros 'UNSPEC_TEXT',
2791         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
2792         + exclude function calls from 'UNSPEC_PLT' in case of data text
2793         relative mode.
2794         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2795         new target hook for generating address diff vector tables in case of
2796         flag_pic.
2797         * doc/tm.texi : Regenerate.
2798         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
2799         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
2800         of addr diff vector generation.
2801         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2802         target hook definition.
2803         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
2804         Add default function for generate_pic_addr_diff_vec -> flag_pic.
2805         * doc/invoke.texi (Add new pic option): Add new microblaze pic
2806         option for data text relative.
2808 2018-04-30  Richard Biener  <rguenther@suse.de>
2810         * tree-chrec.h (evolution_function_is_constant_p): Remove
2811         redundant check.
2812         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2814 2018-04-30  Richard Biener  <rguenther@suse.de>
2816         PR bootstrap/85571
2817         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2819 2018-04-30  Richard Biener  <rguenther@suse.de>
2821         PR tree-optimization/28364
2822         PR tree-optimization/85275
2823         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2824         copying first exit test.
2826 2018-04-28  Mark Wielaard  <mark@klomp.org>
2828         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2829         dwarf_version >= 5.
2830         (dwarf_AT): Handle DW_AT_addr_base.
2831         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2833 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
2835         PR target/84431
2836         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2837         (*ashl<dwi>3_doubleword_mask_1): Ditto.
2838         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2839         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2841 2018-04-28  Richard Biener  <rguenther@suse.de>
2843         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2844         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2845         to reflect use.  Only add interesting stmts.
2847 2018-04-27  Martin Jambor  <mjambor@suse.cz>
2849         PR ipa/85549
2850         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2851         the jump function allows for passing through aggregate values.
2853 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
2855         * input.h (in_system_header_at): Convert from macro to inline
2856         function.
2857         (from_macro_expansion_at): Likewise.
2858         (from_macro_definition_at): Likewise.
2860 2018-04-27  Jeff Law  <law@redhat.com>
2862         * config.gcc: Mark tile* targets as deprecated/obsolete.
2864 2018-04-27  Richard Biener  <rguenther@suse.de>
2866         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2867         fix for ILP32.
2869 2018-04-27  Richard Biener  <rguenther@suse.de>
2871         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2873 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
2875         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2876         with Yd constraint. Set "preferred_for_speed" attribute from
2877         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2878         with Yd constraint.
2879         (*movdi_internal): Ditto.
2880         (movti_interunit splitters): Remove
2881         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2882         (movdi_interunit splitters): Ditto.
2883         * config/i386/constraints.md (Ye): Remove.
2884         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2886 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2888         PR target/85512
2889         * config/aarch64/constraints.md (Usg): Limit to 31.
2890         (Usj): Limit to 63.
2892 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
2894         PR tree-optimization/85529
2895         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2896         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2897         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2898         zero extension or masking of the MSB bit.
2899         (optimize_range_tests): Add FIRST_BB argument, pass it through
2900         to optimize_range_tests_var_bound.
2901         (maybe_optimize_range_tests, reassociate_bb): Adjust
2902         optimize_range_tests callers.
2904 2018-04-26  Richard Biener  <rguenther@suse.de>
2905             Jakub Jelinek  <jakub@redhat.com>
2907         * cgraph.h (symbol_table): Just declare debug method here.
2908         * symtab.c (symbol_table::debug): Define.
2910 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
2912         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2914 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
2916         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2917         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2918         (*movdi_internal): Substitute Yi and Yj constraint with x
2919         and Ym and Yn constraint with y constraint.  Update "isa"
2920         attribute and set "preferred_for_speed" attribute from
2921         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2922         (*movsi_internal): Ditto.
2923         (*movdf_internal): Ditto.
2924         (*movsf_internal): Ditto.
2925         (*zero_extendsidi2): Ditto.
2926         * config/i386/sse.md (vec_set<mode>_0): Ditto.
2927         (sse2_loadld): Ditto.
2928         (*vec_extract<ssevecmodelower>_0): Ditto.
2929         (*vec_extractv4si_0_zext_sse4): Ditto.
2930         (vec_concatv2di): Ditto.
2931         (*vec_dup<mode>): Ditto.
2932         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2933         * config/i386/constraints.md (Yi): Remove.
2934         (Yj): Remove.
2935         (Ym): Remove.
2936         (Yn): Remove.
2938 2018-04-26  Nathan Sidwell  <nathan@acm.org>
2940         * dumpfile.c (dump_open): New.
2941         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2942         (dump_finish): Detect stdio/stderr by value not name.
2944 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
2946         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2948 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2950         PR target/84952
2951         * config/nvptx/nvptx.c (verify_neutering_jumps)
2952         (verify_neutering_labels): New function
2953         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2955 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2957         PR target/84025
2958         * config/nvptx/nvptx.c (needs_neutering_p): New function.
2959         (nvptx_single): Use needs_neutering_p to skip over insns that do not
2960         need neutering.
2962 2018-04-26  Richard Biener <rguenther@suse.de>
2963             Tom de Vries  <tom@codesourcery.com>
2965         PR lto/85422
2966         * lto-streamer-out.c (output_function): Fixup loops if required to match
2967         discovery done in the reader.
2969 2018-04-26  Richard Biener  <rguenther@suse.de>
2971         PR tree-optimization/85116
2972         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2973         have a loop exit from the single latch predecessor.  Remove
2974         case of header with just condition.
2975         (ch_base::copy_headers): Exclude infinite loops from any
2976         processing.
2977         (pass_ch::execute): Record exits.
2979 2018-04-26  Richard Biener  <rguenther@suse.de>
2981         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2982         prologue cost vector and pass it to vect_get_load_cost.
2983         (vect_get_peeling_costs_all_drs): Likewise.
2984         (vect_peeling_hash_get_lowest_cost): Likewise.
2985         (vect_enhance_data_refs_alignment): Likewise.
2987 2018-04-26  Richard Biener  <rguenther@suse.de>
2989         PR middle-end/85450
2990         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2991         checking of integer<->pointer conversions.
2992         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2993         sign-/zero-extending pointer types.
2994         (expand_omp_for_static_chunk): Likewise.
2996 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
2997             Jean Lee  <xiaoyur347@gmail.com>
2999         * config/mips/mips.c (mips_asan_shadow_offset): New function.
3000         (TARGET_ASAN_SHADOW_OFFSET): Define.
3001         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3002         true for -fsanitize=address.
3004 2018-04-25  Mark Wielaard  <mark@klomp.org>
3006         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3007         shorter ones.
3009 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3011         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3012         than "alu", remove explicit "memory" and "imm_disp" attributes.
3013         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3015         PR middle-end/85414
3016         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3017         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3018         gen_lowpart_no_emit.
3020 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3022         PR target/85473
3023         * config/i386/i386.c (ix86_expand_builtin): Change memory
3024         operand to XI, extend p0 to Pmode.
3025         * config/i386/i386.md: Change unspec volatile and operand
3026         1 mode to XI, change operand 0 mode to P.
3028 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3030         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3031         GET_MODE_MASK before any checking.
3032         (nds32_can_use_bset_p): Likewise.
3033         (nds32_can_use_btgl_p): Likewise.
3035 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3037         * config/nds32/nds32-doubleword.md: New define_split pattern for
3038         illegal register number.
3040 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3042         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3044 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3046         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3048 2018-04-25  Richard Biener  <rguenther@suse.de>
3050         * lto-streamer.h (LTO_major_version): Bump to 8.
3052 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3054         * BASE-VER: Set to 9.0.0.
3056 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3058         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3059         in __abskf2 and __powikf2.
3061 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3063         PR target/85512
3064         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3065         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3066         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3067         Use the above on operand 2.  Reindent.
3068         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3070 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3072         PR target/85485
3073         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3074         handle OPT_mcet.
3075         * config/i386/i386.opt (mcet): Removed.
3076         * doc/install.texi: Remove -mcet documentation.
3077         * doc/invoke.texi: Likewise.
3079 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3081         PR target/85485
3082         * doc/install.texi: Remove -mcet from bootstrap-cet.
3084 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3086         PR target/85511
3087         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3088         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3089         if TARGET_64BIT.
3091         PR target/85503
3092         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3093         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3094         containing a CONST_VECTOR.
3096 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3098         * doc/install.texi: Update newlib dependency for nvptx.
3100 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3102         PR target/85508
3103         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3104         instead of INTVAL when shifting x left.
3106 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3108         PR tree-optimization/85478
3109         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3110         vect_grouped_store_supported for single element vectors.
3112 2018-04-24  Richard Biener  <rguenther@suse.de>
3114         PR target/85491
3115         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3116         load cost increase to the case of non-constant step.
3118 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3120         PR target/84828
3121         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3122         destination if any_malformed_asm.
3124 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3126         PR middle-end/85496
3127         * expr.c (store_field): In the bitfield case, if the value comes from
3128         a function call and is returned in registers by means of a PARALLEL,
3129         do not change the mode of the temporary unless BLKmode and VOIDmode.
3131 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3133         PR rtl-optimization/85423
3134         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3135         dependencies to debug insns when the previous insn is non-debug.
3137 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3139         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3140         enums into a single definition.
3141         (fls): Fix predicates and printing.
3142         (seti): Likewise.
3144 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3146         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3147         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3148         and short u6 immediate.
3149         (check_if_valid_sleep_operand): Remove.
3150         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3152 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3154         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3155         flag_always_save_lp condition.
3156         * config/nds32/nds32.opt (malways-save-lp): New option.
3158 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3160         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3161         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3162         * config/nds32/nds32.h
3163         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3164         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3166 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3168         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3169         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3171 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3172             Chung-Ju Wu  <jasonwucj@gmail.com>
3174         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3175         Declare.
3176         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3177         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3179 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3181         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3183 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3185         * config/nds32/nds32-protos.h (nds32_data_alignment,
3186         nds32_local_alignment): Declare.
3187         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3188         nds32_local_alignment): New functions.
3189         (TARGET_CONSTANT_ALIGNMENT): Define.
3190         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3192 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3194         * config/nds32/nds32.c
3195         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3196         (TARGET_MODES_TIEABLE_P): Likewise.
3198 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3200         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3201         level Ofast and Og.
3203 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3204             Chung-Ju Wu  <jasonwucj@gmail.com>
3206         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3207         for unaligned access.
3208         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3209         unaligned access.
3210         * config/nds32/nds32-intrinsic.md: Likewise.
3211         * config/nds32/nds32_intrinsic.h: Likewise.
3212         * config/nds32/nds32.h (nds32_builtins): Likewise.
3213         * config/nds32/nds32.opt (munaligned-access): New option.
3214         * config/nds32/nds32.c (nds32_asm_file_start): Display
3215         flag_unaligned_access status.
3217 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3219         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3220         -mno-relax is present.
3221         * config/riscv/linux.h (LINK_SPEC): Ditto.
3223 2018-04-20  Martin Sebor  <msebor@redhat.com>
3225         PR c/85365
3226         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3227         for null pointers.
3228         (gimple_fold_builtin_stxcpy_chk): Same.
3229         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3231 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3233         PR target/85456
3234         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3235         __powikf2 when long double is IEEE 128-bit.
3237 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3239         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3240         step to make sure stack always aligned.
3242 2018-04-20  Carl Love  <cel@us.ibm.com>
3244         PR target/83402
3245         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3246         size check for arg0.
3248 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3249             Tom de Vries  <tom@codesourcery.com>
3251         PR target/85445
3252         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3253         Emit insns for calls too.
3254         (nvptx_find_par): Always look for worker-level predecessor insn.
3255         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3256         calls.
3257         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3258         (nvptx_process_pars): Propagate frames for calls.
3260 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3262         PR target/85469
3263         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3264         Removed.
3265         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3266         (ix86_handle_option): Don't handle OPT_mibt.
3267         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3268         __SHSTK__.
3269         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3270         has_ibt and ibt.
3271         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3272         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3273         (ix86_target_macros): Define __CET__ with flag_cf_protection
3274         for -fcf-protection.
3275         * config/i386/i386.c (isa2_opts): Remove -mibt.
3276         * config/i386/i386.h (TARGET_IBT): Removed.
3277         (TARGET_IBT_P): Likewise.
3278         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3279         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3280         * config/i386/i386.opt (mcet): Update help message.
3281         (mshstk): Likewise.
3282         (mibt): Removed.
3283         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3284         -mcet as an alias for -mshstk.
3286 2018-04-20  Richard Biener <rguenther@suse.de>
3288         PR middle-end/85475
3289         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3290         complexity by forcing a single use of the multiply operand.
3292 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3294         ipa/85449
3295         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3296         recursion dependency to only apply to non-clones.
3298 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3300         ipa/85447
3301         * ipa-cp.c (create_specialized_node): Check that clones of
3302         self-recursive edges exist during IPA-CP.
3304 2018-04-19  Toon Moene  <toon@moene.org>
3306         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3307         by -O3. 
3309 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3311         PR tree-optimization/85467
3312         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3313         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3314         VECTOR_CST element to type.
3316 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3318         PR target/85397
3319         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3320         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3321         (builtin_longjmp): Likewise.
3322         (save_stack_nonlocal): New pattern.
3323         (restore_stack_nonlocal): Likewise.
3325 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3327         PR target/85404
3328         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3329         Replace ASM_OUTPUT_LABEL with fprintf.
3331 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3333         PR target/85417
3334         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3335         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3336         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3337         define __IBT__ and __SHSTK__ for -fcf-protection.
3338         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3339         TARGET_IBT.
3340         (ix86_trampoline_init): Likewise.
3341         (x86_output_mi_thunk): Likewise.
3342         (ix86_notrack_prefixed_insn_p): Likewise.
3343         (ix86_option_override_internal): Don't disallow -fcf-protection.
3344         * config/i386/i386.md (rdssp<mode>): Also enable for
3345         -fcf-protection.
3346         (incssp<mode>): Likewise.
3347         (nop_endbr): Likewise.
3348         * config/i386/i386.opt (mcet): Change help message to built-in
3349         functions only.
3350         (mibt): Likewise.
3351         (mshstk): Likewise.
3352         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3353         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3354         enable CET built-in functions.
3356 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3358         * common/config/i386/i386-common.c 
3359         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3360         OPTION_MASK_ISA_MOVDIRI_UNSET,
3361         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3362         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3363         * config.gcc (movdirintrin.h): New header.
3364         * config/i386/cpuid.h (bit_MOVDIRI,
3365         bit_MOVDIR64B): New bits.
3366         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3367         and -mmvodir64b.
3368         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3369         (VOID, PVOID, PCVOID)): New function types.
3370         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3371         __builtin_ia32_directstoreu_u64,
3372          __builtin_ia32_movdir64b): New builtins.
3373         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3374         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3375         and -mmovdiri.
3376         (ix86_valid_target_attribute_inner_p): Ditto.
3377         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3378         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3379         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3380         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3381         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3382         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3383         (movdiri<mode>, movdir64b_<mode>): New.
3384         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3385         * config/i386/immintrin.h: Include movdirintrin.h.
3386         * config/i386/movdirintrin.h: New file.
3387         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3389 2018-04-19  Richard Biener  <rguenther@suse.de>
3391         PR middle-end/85455
3392         * cfg.c (clear_bb_flags): When loop state says we have
3393         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3395 2018-04-19  Richard Biener  <rguenther@suse.de>
3397         PR tree-optimization/84737
3398         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3399         copying restrict info.
3400         (vect_setup_realignment): Use it.
3401         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3402         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3403         the first DR to all generated stores.
3404         (vectorizable_load): Likewise for loads.
3406 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3408         PR tree-optimization/85446
3409         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3410         the integral and pointer types to have the same precision.
3412         * doc/install.texi: Document --disable-cet being the default and
3413         --enable-cet=auto.
3415 2018-04-18  Martin Liska  <mliska@suse.cz>
3417         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3418         style.
3420 2018-04-18  Martin Liska  <mliska@suse.cz>
3422         Revert
3423         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3425         PR ipa/83983
3426         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3427         arguments if they are comparable.
3429 2018-04-18  Martin Liska  <mliska@suse.cz>
3431         Revert
3432         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3434         PR lto/84805
3435         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3436         incomplete types.
3438 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3440         PR target/85388
3441         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3442         ENDBR after calling __morestack.
3444 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3446         PR jit/85384
3447         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3448         by using gcc_base_ver to generate a gcc_driver_version, and use
3449         it when generating GCC_DRIVER_NAME.
3450         * configure: Regenerate.
3452 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3454         PR target/81084
3455         * config.gcc: Obsolete powerpc*-*-*spe*.
3457 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3459         PR debug/84637
3460         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3461         (stabstr_D): Change type of unum from unsigned int to
3462         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3463         type.
3465 2018-04-17  Jim Wilson  <jimw@sifive.com>
3467         PR 84856
3468         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3469         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3470         Set arg_pointer_offset after using pretend_args_size.
3472 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3474         PR rtl-optimization/85431
3475         * dse.c (record_store): Ignore zero width stores.
3477         PR sanitizer/85230
3478         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3479         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3480         __builtin_stack_restore rather than after it.
3481         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3482         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3483         argument instead of virtual_dynamic_stack_rtx.
3485 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3487         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3488         New prototype.
3489         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3490         Add note to error message to explain internal mapping of overloaded
3491         built-in function name to non-overloaded built-in function name.
3492         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3493         function.
3495 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3497         PR target/85424
3498         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3499         where the inputs overlap with the output.
3501 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3503         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3504         (=v, v) alternative and explicit "memory" attribute.
3505         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3506         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3507         attributes.
3508         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3509         "sselog1" type instead of "sselog".
3510         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3511         "sselog".  Remove explicit "memory" attribute.
3512         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3513         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3514         attributes.
3515         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3516         "sselog1" type instead of "sselog".  Remove explicit "memory"
3517         attribute.
3518         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3519         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3520         attribute.
3521         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3522         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3523         attributes.
3524         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3525         "sselog1" type instead of "sselog".  Remove explicit "memory"
3526         attribute.
3527         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3528         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3529         attribute.
3531         PR target/85430
3532         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3534         PR middle-end/85414
3535         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3536         on a SUBREG.
3538 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3540         PR ipa/85421
3541         * ipa-cp.c (create_specialized_node): Call
3542         expand_all_artificial_thunks if necessary.
3544 2018-04-17  Martin Liska  <mliska@suse.cz>
3546         PR lto/85405
3547         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3548         in message, remote space in between '_G' and '('.
3550 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3552         PR target/85281
3553         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3554         avx512f_vmcmp<mode>3<round_saeonly_name>,
3555         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3556         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3557         avx512f_rndscale<mode><round_saeonly_name>,
3558         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3559         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3560         Use %<iptr>2 instead of %2 for -masm=intel.
3561         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3562         avx512f_vcvttss2usi<round_saeonly_name>,
3563         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3564         -masm=intel.
3565         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3566         avx512f_vcvttsd2usi<round_saeonly_name>,
3567         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3568         Use %q1 instead of %1 for -masm=intel.
3569         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3570         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3571         of %3 for -masm=intel.
3572         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3573         -masm=intel.
3574         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3575         -masm=intel.
3576         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3577         -masm=intel.
3578         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3579         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3580         %g1.
3581         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3582         -masm=intel.
3583         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3584         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3585         %g1 and one with %0 and %1.
3586         (avx512er_vmrcp28<mode><round_saeonly_name>,
3587         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3588         %1 for -masm=intel.
3589         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3590         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3591         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3592         of %0 and %{%4%} for -masm=intel.
3593         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3594         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3595         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3596         order of %0 and %{%5%}%{z%} for -masm=intel.
3598 2018-04-17  Jan Hubicka  <jh@suse.cz>
3600         PR lto/85405
3601         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3603 2018-04-17  Martin Liska  <mliska@suse.cz>
3605         PR ipa/85329
3606         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3607         for target_clone error message.  Make default implementation
3608         clone to be a local declaration.
3609         (separate_attrs): Add new argument and check for an empty
3610         string.
3611         (expand_target_clones): Handle it.
3612         (ipa_target_clone): Make redirection just for target_clones
3613         functions.
3615 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3616             Tom de Vries  <tom@codesourcery.com>
3618         PR middle-end/84955
3619         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3620         tiled basic blocks without omp continue statements.
3622 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3624         PR target/83660
3625         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3626         vec_extract expression as having side effects to make sure it gets
3627         a cleanup point.
3629 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3631         PR target/85403
3632         * config/i386/i386.c (get_builtin_code_for_version): Check
3633         error_mark_node.
3635 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3637         PR target/84331
3638         * gcc/config.gcc: Support "skylake".
3639         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3640         PROCESSOR_SKYLAKE.
3641         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3642         (processor_target_table): Add "skylake".
3643         (ix86_option_override_internal): Add "skylake".
3644         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3645         PROCESSOR_CANNONLAKE.
3646         (get_builtin_code_for_version): Fix priority for
3647         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3648         PROCESSOR_SKYLAKE-AVX512.
3649         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3650         (processor_type): Add PROCESSOR_SKYLAKE.
3652 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3653             Jason Merrill  <jason@redhat.com>
3655         PR c++/85112
3656         * convert.c (convert_to_integer_1): Use direct recursion for
3657         enumeral types and types with a precision less than the number
3658         of bits in their mode.
3660 2018-04-16  Julia Koval  <julia.koval@intel.com>
3662         PR target/84413
3663         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3664         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3666 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3668         PR target/85293
3669         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3670         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3671         and -mno-direct-move.
3673 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3675         PR target/83402
3676         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3677         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3678         Ensure negative shifts result in {0}.
3680 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3682         PR rtl-optimization/79916
3683         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3684         regs (if any) to define how to gnerate SD moves when LRA is in
3685         progress.
3687 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3689         PR rtl-optimization/85393
3690         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3691         * except.c (expand_dw2_landing_pad_for_region): Make static.
3692         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3693         a label and unconditional jump to old_bb, rather than
3694         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3695         basic block.
3697         PR rtl-optimization/85376
3698         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3699         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3700         instead of a specific value.
3702 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3703             Bin Cheng  <bin.cheng@arm.com>
3705         PR tree-optimization/82965
3706         PR tree-optimization/83991
3707         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3708         by_profile_only parameter.
3709         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3710         information if the loop was predicted to iterate too many times.
3711         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3713 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3715         PR lto/71991
3716         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3717         always inline.
3719 2018-04-13  Martin Liska  <mliska@suse.cz>
3720             Jakub Jelinek  <jakub@redhat.com>
3722         PR middle-end/81657
3723         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3724         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3725         * builtins.c (expand_builtin_memory_copy_args): Use
3726         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3727         handle dest_addr == pc_rtx.
3729 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3731         PR target/85291
3732         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3733         asked to not generate direct moves.
3734         (fix_trunc<mode>si2_stfiwx): Similar.
3735         (fix_trunc<mode>si2_internal): Similar.
3737 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3739         PR debug/83157
3740         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3741         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3742         lookup if dest in some wider mode is known to be const0_rtx and
3743         if so, record permanent equivalence for it to be ZERO_EXTEND of
3744         the narrower mode destination.
3746 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3748         * lto-streamer-out.c (output_function): Revert 259346.
3749         * omp-expand.c (expand_oacc_for): Likewise.
3751 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
3753         PR rtl-optimization/85354
3754         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3755         * sel-sched.c (sel_global_init): ... here.
3757 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
3759         PR target/85238
3760         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3761         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3762         mode for PE-COFF targets.
3763         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
3764         (i386_pe_asm_lto_end): Likewise.
3765         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
3766         (TARGET_ASM_LTO_END): Likewise.
3767         * config/i386/winnt.c (saved_debug_info_level): New static variable.
3768         (i386_pe_asm_lto_start): New function.
3769         (i386_pe_asm_lto_end): Likewise.
3771 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3772             Richard Biener  <rguenther@suse.de>
3774         PR middle-end/84955
3775         * lto-streamer-out.c (output_function): Fix CFG loop state before
3776         streaming out.
3777         * omp-expand.c (expand_oacc_for): Handle calls to internal
3778         functions like regular functions.
3780 2018-04-12  Richard Biener  <rguenther@suse.de>
3782         PR lto/85371
3783         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
3784         for the early LTO debug to properly generate references to it
3785         during DIE emission.  Do not re-use that for the skeleton for
3786         split-dwarf.
3787         (dwarf2out_early_finish): Likewise.
3789 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3791         PR target/85328
3792         * config/i386/sse.md
3793         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
3794         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
3795         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
3796         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
3797         and output is a reg, avoid creating invalid lowpart subreg, but
3798         instead split into a 512-bit move.  Don't split if not AVX512VL,
3799         input is xmm16+ reg and output is a mem.
3800         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
3801         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
3802         xmm16+ reg and output is a mem.
3804 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3806         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
3807         also for flag_dwarf2_cfi_asm.
3809 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3811         PR rtl-optimization/85342
3812         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3813         a bool scalar var inside of the loop instead.  Don't try to update
3814         recog_data.operand after failed apply_change_group.
3816 2018-04-12  Tom de Vries  <tom@codesourcery.com>
3818         PR target/85296
3819         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3820         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
3821         array with flexible array member as array without given dimension.
3822         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3823         argument for undefined param to true.
3825 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
3827         PR target/85321
3828         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3829         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3830         from PowerPC section.
3831         * config/rs6000/sysv4.opt (mcall-): Improve help text.
3832         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3833         help text that is too long.
3834         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3835         help text that is too long.
3836         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3837         help text that is too long.
3839 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
3841         * config/alpha/alpha.md (stack_probe_internal): Rename
3842         from "probe_stack".  Update all callers.
3844 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3846         PR rtl-optimization/84566
3847         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3848         sched_macro_fuse_insns.
3850 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3852         PR target/84301
3853         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3854         (compute_block_dependences): ... from here.
3856 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3858         PR tree-optimization/85331
3859         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3860         from int to HOST_WIDE_INT.
3862 2018-04-11  Martin Jambor  <mjambor@suse.cz>
3864         PR ipa/84149
3865         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3866         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3867         not the same as the source val.
3868         (cgraph_edge_brings_value_p): New parameter.
3869         (gather_edges_for_value): Pass destination value to
3870         cgraph_edge_brings_value_p.
3871         (perhaps_add_new_callers): Likewise.
3872         (get_info_about_necessary_edges): Likewise and exclude values brought
3873         only by self-recursive edges.
3874         (create_specialized_node): Redirect only clones of self-calling edges.
3875         (+self_recursive_pass_through_p): New function.
3876         (find_more_scalar_values_for_callers_subset): Use it.
3877         (find_aggregate_values_for_callers_subset): Likewise.
3878         (known_aggs_to_agg_replacement_list): Removed.
3879         (decide_whether_version_node): Re-calculate known constants for all
3880         remaining context clones.
3882 2018-04-11  Richard Biener  <rguenther@suse.de>
3884         PR lto/85339
3885         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3886         from early DWARF output.
3887         (dwarf2out_early_finish): Output line info unconditionally into
3888         early DWARF and add reference to it.
3890 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3892         PR target/85281
3893         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3894         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3895         other than V2DFmode using iptr mode attribute.
3896         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3898 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3900         PR rtl-optimization/84659
3901         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3903 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3905         PR debug/85302
3906         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3907         SIZEP is NULL.
3908         (output_loc_list): Pass address of a dummy size variable even in the
3909         locview handling loop.
3910         (index_location_lists): Add comment on why skip_loc_list_entry can't
3911         call size_of_locs.
3913 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3915         PR target/85261
3916         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3917         into register.
3919 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
3921         PR target/85321
3922         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3923         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3924         and -mstring-compare-inline-limit.
3926 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3928         PR target/85287
3929         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3930         for stack clash protection in a register whenever we need it to be in
3931         a register.
3933 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3935         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3936         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3938 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3940         PR target/85321
3941         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3942         the help text.
3943         (mlong-double-): Ditto.
3944         * config/rs6000/sysv4.opt (msdata=): Ditto.
3945         (mtls-size=): Ditto.
3947 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3949         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3950         erroneous entries for
3951         "vector int vec_ldl (int, long int *)", and
3952         "vector unsigned int vec_ldl (int, unsigned long int *)".
3953         Add comments and entries for
3954         "vector bool char vec_ldl (int, bool char *)",
3955         "vector bool short vec_ldl (int, bool short *)",
3956         "vector bool int vec_ldl (int, bool int *)",
3957         "vector bool long long vec_ldl (int, bool long long *)",
3958         "vector pixel vec_ldl (int, pixel *)",
3959         "vector long long vec_ldl (int, long long *)",
3960         "vector unsigned long long vec_ldl (int, unsigned long long *)".
3961         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3962         type tree bool_long_long_type_node and correct definition of
3963         bool_V2DI_type_node to make reference to this new type tree.
3964         (rs6000_mangle_type): Replace erroneous reference to
3965         bool_long_type_node with bool_long_long_type_node.
3966         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3967         comments to emphasize sign distinctions for char and int types and
3968         replace RS6000_BTI_bool_long constant with
3969         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
3970         use of RS6000_BTI_pixel.
3971         (bool_long_type_node): Remove this macro definition.
3972         (bool_long_long_type_node): New macro definition
3974 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3976         PR rtl-optimization/85300
3977         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3978         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3979         simplify_unary_operation fails.
3981 2018-04-10  Martin Liska  <mliska@suse.cz>
3983         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3984         cgraph_edge and ipa_ref.
3986 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3988         PR target/85177
3989         PR target/85255
3990         * config/i386/sse.md
3991         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3992         computation of the VEC_MERGE selector from mask.
3993         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3994         Fix decoding of the VEC_MERGE selector into mask.
3996 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3998         PR tree-optimization/85286
3999         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4001 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4003         * final.c (final_1): Set insn_last_address as well as
4004         insn_current_address.
4006 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4008         PR target/85173
4009         * explow.c (emit_stack_probe): Call validize_mem on memory location
4010         before passing it to gen_probe_stack.  Create address operand and
4011         legitimize it for the probe_stack_address case.
4013 2018-04-09  Jan Hubicka  <jh@suse.cz>
4015         PR lto/85078
4016         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4017         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4018         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4019         walk basetypes.
4020         (free_lang_data): Rebuild type inheritance graph.
4022 2018-04-09  Martin Sebor  <msebor@redhat.com>
4024         * invoke.texi (-finline-small-functions): Mention other optimization
4025         options.
4026         (-findirect-inlining, -fpartial-inlining): Same.
4027         (-finline-functions-called-once): Same.
4028         (-freorder-blocks-and-partition): Same.
4030 2018-04-09  Jan Hubicka  <jh@suse.cz>
4032         PR rtl/84058
4033         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4034         jumps; choose last target that matches the criteria (i.e.
4035         no partition changes for non-crossing jumps).
4036         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4037         support for redirecting crossing jumps to non-crossing.
4039 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4041         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4042         also for naked functions.
4044 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4046         * config/arc/arc.md (add_shift): New pattern.
4047         (add_shift2): Likewise.
4048         (sub_shift): Likewise.
4049         (sub_shift_cmp0_noout): Likewise.
4050         (compare_si_ashiftsi): Likewise.
4051         (xbfu_cmp0_noout): New combine pattern.
4052         (xbfu_cmp0"): Likewise.
4053         (movsi_set_cc_insn): Place the predicable variant first.
4054         (commutative_binary_cmp0_noout): Remove clobber.
4055         (commutative_binary_cmp0): New pattern.
4056         (noncommutative_binary_cmp0): Likewise.
4057         (noncommutative_binary_cmp0_noout): Likewise.
4058         (noncommutative_binary_comparison_result_used): Removed.
4059         (rsub_cmp0): New pattern.
4060         (rsub_cmp0_noout): Likewise.
4061         (extzvsi): Changed, keep only meaningful variants.
4062         (SQH, SEZ): New iterators.
4063         (SQH_postfix): New mode attribute.
4064         (SEZ_prefix): New code attribute.
4065         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4066         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4067         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4068         of numerical value.
4069         (noncommutative_operator): Check the availability of barrel
4070         shifter option.
4072 2018-04-09  Richard Biener  <rguenther@suse.de>
4074         PR tree-optimization/85284
4075         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4076         Only use the niter constraining form of simple_iv when the exit
4077         is always executed.
4079 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4081         PR target/84041
4082         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4083         (define_expand "*memory_barrier"): New define_expand.
4084         (define_insn "memory_barrier"): New insn.
4086 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4088         PR rtl-optimization/80463
4089         PR rtl-optimization/83972
4090         PR rtl-optimization/83480
4092         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4093         correct producer for the insn.
4094         (tidy_control_flow): Fixup seqnos in case of debug insns.
4096 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4098         PR rtl-optimization/83913
4100         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4101         different sched-times when merging exprs.
4103 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4105         PR rtl-optimization/83962
4107         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4108         tidy_fallthru_edge and tidy_control_flow.
4110 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4112         PR rtl-optimization/83530
4114         * sel-sched.c (force_next_insn): New global variable.
4115         (remove_insn_for_debug): When force_next_insn is true, also leave only
4116         next insn in the ready list.
4117         (sel_sched_region): When the region wasn't scheduled, make another pass
4118         over it with force_next_insn set to 1.
4120 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4122         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4123         into tm_file.
4124         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4125         for interrupt control.
4126         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4127         functions for interrupt control.
4128         * config/nds32/nds32-intrinsic.md: Likewise.
4129         * config/nds32/nds32_intrinsic.h: Likewise.
4130         * config/nds32/nds32.h (nds32_builtins): Likewise.
4132 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4134         * config/nds32/nds32.c (nds32_init_machine_status,
4135         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4136         strict_aligned_p field.
4137         (nds32_expand_to_rtl_hook): New function.
4138         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4139         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4141 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4142             Chung-Ju Wu  <jasonwucj@gmail.com>
4144         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4145         * config/nds32/nds32-n7.md: New file.
4146         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4147         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4148         pipeline.
4149         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4150         * config/nds32/nds32.md (pipeline_model): Add n7.
4151         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4152         * config/nds32/pipelines.md: Include n7 settings.
4154 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4155             Chung-Ju Wu  <jasonwucj@gmail.com>
4157         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4158         * config/nds32/nds32-e8.md: New file.
4159         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4160         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4161         pipeline.
4162         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4163         * config/nds32/nds32.md (pipeline_model): Add e8.
4164         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4165         * config/nds32/pipelines.md: Include e8 settings.
4167 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4168             Chung-Ju Wu  <jasonwucj@gmail.com>
4170         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4171         * config/nds32/nds32-n8.md: New file.
4172         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4173         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4174         pipeline.
4175         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4176         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4177         * config/nds32/nds32.md (pipeline_model): Add n8.
4178         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4179         * config/nds32/pipelines.md: Include n8 settings.
4181 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4182             Chung-Ju Wu  <jasonwucj@gmail.com>
4184         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4185         * config/nds32/nds32-n9-2r1w.md: New file.
4186         * config/nds32/nds32-n9-3r2w.md: New file.
4187         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4188         nds32_register_ports): New or modify for cpu n9.
4189         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4190         pipeline.
4191         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4192         * config/nds32/nds32-utils.c: New file.
4193         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4194         TARGET_MUL_SLOW): Define.
4195         * config/nds32/nds32.md (pipeline_model): New attribute.
4196         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4197         New options that support cpu n9.
4198         * config/nds32/pipelines.md: Include n9 settings.
4199         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4201 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4203         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4204         information if necessary.
4205         (output_cond_branch_compare_zero): Likewise.
4206         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4207         (nds32_target_alignment): Refine for alignment.
4208         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4209         (FUNCTION_BOUNDARY): Modify.
4210         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4211         align case.
4212         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4214 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4216         * config/nds32/constants.md (unspec_volatile_element): Add values for
4217         TLB operation and data prefetch.
4218         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4219         functions for TLB operation and data prefetch.
4220         * config/nds32/nds32-intrinsic.md: Likewise.
4221         * config/nds32/nds32_intrinsic.h: Likewise.
4222         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4223         (nds32_print_operand): Likewise.
4224         * config/nds32/nds32.h (nds32_builtins): Likewise.
4226 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4227         Andrew Pinski <pinsika@gcc.gnu.org>
4229         PR middle-end/82976
4230         * match.pd: Use constant_boolean_node of correct type instead of
4231         boolean_true_node or boolean_false_node for simplifying
4232         pointer comparisons to zero.
4234 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4236         PR tree-optimization/80021
4237         * tree.c (verify_type_variant): Make error call in verify_variant_match
4238         translatable and remove final full stop.
4240 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4242         * config/nds32/constants.md (unspec_volatile_element): Add
4243         UNSPEC_VOLATILE_EH_RETURN.
4244         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4245         nds32_output_stack_pop): Support dwarf exception handling process.
4246         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4247         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4248         exception handling process.
4249         (nds32_compute_stack_frame): Likewise.
4250         (nds32_return_addr_rtx): Likewise.
4251         (nds32_initial_elimination_offset): Likewise.
4252         (nds32_expand_prologue): Likewise.
4253         (nds32_expand_epilogue): Likewise.
4254         (nds32_dynamic_chain_address): New function.
4255         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4256         exception handling.
4257         (DYNAMIC_CHAIN_ADDRESS): Define.
4258         (EH_RETURN_DATA_REGNO): Define.
4259         (EH_RETURN_STACKADJ_RTX): Define.
4260         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4261         patterns for dwarf exception handling.
4263 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4265         * config/nds32/nds32.h: Clean up obsolete macros.
4267 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4269         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4270         Add enum values for particular instructions.
4271         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4272         particular intrinsic functions.
4273         * config/nds32/nds32-intrinsic.md: Likewise.
4274         * config/nds32/nds32_intrinsic.h: Likewise.
4275         * config/nds32/nds32.h (nds32_builtins): Likewise.
4276         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4277         (btst, ave): New patterns for particular instructions.
4279 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4281         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4282         Add enum values for atomic load/store and memory sync.
4283         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4284         and memory sync.
4285         * config/nds32/nds32-intrinsic.md: Likewise.
4286         * config/nds32/nds32_intrinsic.h: Likewise.
4287         * config/nds32/nds32.h (nds32_builtins): Likewise.
4289 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4291         PR tree-optimization/85257
4292         * fold-const.c (native_encode_vector): If not all elts could fit
4293         and off is -1, return 0 rather than offset.
4294         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4295         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4296         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4297         adjust buffer in native_interpret_expr call.
4299 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4301         * config/nds32/constants.md (unspec_volatile_element): Add cache
4302         control enum values.
4303         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4304         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4305         * config/nds32/nds32.c (nds32_cctl_names): New.
4306         (nds32_print_operand): Handle cache control register names.
4307         * config/nds32/nds32.h (nds32_builtins): New enum values.
4308         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4309         macros.
4310         * config/nds32/nds32.md (type): Add mmu.
4311         * config/nds32/pipelines.md (simple_insn): Add mmu.
4313 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4315         * config/nds32/nds32.md (type): Remove call.
4316         * config/nds32/pipelines.md (simple_insn): Likewise.
4318 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4320         * config/nds32/constants.md (unspec_volatile_element): Add
4321         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4322         UNSPEC_VOLATILE_FMFCFG.
4323         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4324         description for fmfcfg and fmfcsr.
4325         (bdesc_1arg): Add fmtcsr.
4326         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4327         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4328         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4329         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4330         unspec_fmfcfg): New patterns.
4331         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4332         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4333         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4334         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4335         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4336         __nds32__fmfcfg): Define.
4338 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4340         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4341         intrinsic register names.
4342         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4343         intrinsic register enum values and macros.
4345 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4347         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4348         for load/store addressing form.
4349         (nds32_print_operand_address): Likewise.
4351 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4353         PR target/85196
4354         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4355         based on LABEL_REF.  Remove useless assertion.
4356         (pic_address_needs_scratch): Fix formatting.
4357         (sparc_legitimize_pic_address): Minor tweaks.
4358         (sparc_delegitimize_address): Adjust assertion accordingly.
4359         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4360         into symbolic_operand.
4361         (movsi_high_pic_label_ref): Likewise.
4362         (movsi_lo_sum_pic_label_ref): Likewise.
4363         (movdi_pic_label_ref): Likewise.
4364         (movdi_high_pic_label_ref): Likewise.
4365         (movdi_lo_sum_pic_label_ref): Likewise.
4367 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4369         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4370         custom LIB_SPEC setup.
4372 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4373             Kito Cheng  <kito.cheng@gmail.com>
4375         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4376         * config/riscv/freebsd.h: New.
4378 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4380         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4381         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4382         file.
4384 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4385             Kito Cheng  <kito.cheng@gmail.com>
4387         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4388         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4389         * config/nds32/nds32-protos.h (nds32_output_call,
4390         nds32_output_return): Declare.
4391         * config/nds32/nds32.md: Refine all the call and return patterns.
4393 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4395         PR debug/85252
4396         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4397         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4399         PR rtl-optimization/84872
4400         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4401         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4402         EDGE_CROSSING edge.
4404 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4406         * expr.c (copy_blkmode_to_reg): Revert 254862.
4407         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4409 2018-04-06  Richard Biener  <rguenther@suse.de>
4411         PR middle-end/85244
4412         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4413         after seeing a component reference with an adjacent field.  Treat
4414         refs to arrays at struct end of external decls similar to
4415         refs to unconstrained commons.
4417 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4419         PR sanitizer/85213
4420         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4421         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4422         recursive calls.
4423         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4424         save_p here.
4426 2018-04-06  Richard Biener  <rguenther@suse.de>
4428         PR middle-end/85180
4429         * alias.c (find_base_term): New wrapper around find_base_term
4430         unwinding CSELIB_VAL_PTR changes.
4431         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4432         recursion.
4434 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4436         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4437         instructions.
4438         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4439         constant definitions.
4440         ("nop"): lr 0,0 -> nopr r0
4441         ("nop_lr0", "nop_lr1"): New insn definitions.
4443 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4445         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4446         NDS32_V3PUSH_AVAILABLE_P macro.
4448 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4449             Chung-Ju Wu  <jasonwucj@gmail.com>
4451         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4452         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4453         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4454         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4455         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4456         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4457         * config/nds32/constraints.md: New constraints and checking for hard
4458         float configuration.
4459         * config/nds32/iterators.md: New mode iterator and attribute for hard
4460         float configuration.
4461         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4462         patterns.
4463         * config/nds32/nds32-fpu.md: New file.
4464         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4465         deal with hard float code generation.
4466         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4467         ARCH_V3S.
4468         (abi_type, float_reg_number): New enum type.
4469         * config/nds32/nds32-predicates.c: New predicates for hard float.
4470         * config/nds32/nds32-protos.h: Declare functions for hard float.
4471         * config/nds32/nds32.c: Implementation for hard float configuration.
4472         * config/nds32/nds32.h: Definitions for hard float configuration.
4473         * config/nds32/nds32.md: Include hard float machine description and
4474         modify patterns for hard float configuration.
4475         * config/nds32/nds32.opt: New options for hard float configuration.
4476         * config/nds32/predicates.md: New predicates for hard float
4477         configuration.
4479 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4481         * common/config/nds32/nds32-common.c
4482         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4484 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4486         PR middle-end/85195
4487         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4488         CONSTRUCTOR_ELT (ctor, ...)->value.
4490 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4492         PR target/85193
4493         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4495 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4497         PR target/85204
4498         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4499         cond jump.
4501 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4502             Kito Cheng  <kito.cheng@gmail.com>
4504         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4505         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4506         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4507         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4509 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4510             Kito Cheng  <kito.cheng@gmail.com>
4512         * config/nds32/constraints.md (Ufe): New memory constraint.
4513         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4514         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4515         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4516         operands.
4517         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4518         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4520 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4522         * config/nds32/nds32.md: Use optimize_size in the condition for
4523         alu-shift instructions.
4525 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4527         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4529 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4531         * config/nds32/nds32.md (negsi2): Refine pattern.
4533 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4534             Chung-Ju Wu  <jasonwucj@gmail.com>
4536         * config/nds32/iterators.md (shift_rotate): New code iterator.
4537         (shift): New code attribute.
4538         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4539         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4540         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4541         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4542         bit-wise operations.
4543         (andsi3, *andsi3): Ditto.
4544         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4545         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4546         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4547         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4548         nds32_ior_operand, nds32_xor_operand): New predicates.
4550 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4552         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4553         (addsi3, subsi3): ... this.
4555 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4557         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4559 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4561         * config/nds32/nds32.md: Adjust indention.
4563 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4565         * config/nds32/nds32.md (feature): New attribute.
4567 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4569         * config/nds32/nds32.md (subtype): New attribute.
4571 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4573         PR target/85203
4574         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4575         expansion to perform a bitwise AND of the argument followed by a
4576         boolean negation of the result.
4578 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4580         PR rtl-optimization/84878
4581         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4582         the basic block.  Assert the use reference is not artificial and that
4583         it has an associated insn.
4585 2018-04-04  Michael Matz  <matz@suse.de>
4587         * builtins.c (compute_objsize): Pass correct operand
4588         to array_at_struct_end_p.
4590 2018-04-04  Richard Biener  <rguenther@suse.de>
4592         PR lto/85176
4593         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4594         from contexts for DINFO_LEVEL_TERSE and below.
4596 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4598         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4599         resiter_operand condition.
4600         * config/nds32/nds32.md (*move<mode>): Ditto.
4602 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4603             Monk Chiang  <sh.chiang04@gmail.com>
4605         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4607 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4609         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4611 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4612             Kito Cheng  <kito.cheng@gmail.com>
4614         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4615         nds32_cond_code_str, output_cond_branch,
4616         output_cond_branch_compare_zero, nds32_expand_cbranch,
4617         nds32_expand_cstore, nds32_expand_movcc,
4618         nds32_output_cbranchsi4_equality_zero,
4619         nds32_output_cbranchsi4_equality_reg,
4620         nds32_output_cbranchsi4_equality_reg_or_const_int,
4621         nds32_output_cbranchsi4_greater_less_zero: New functions.
4622         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4623         nds32_expand_cstore, nds32_expand_movcc,
4624         nds32_output_cbranchsi4_equality_zero,
4625         nds32_output_cbranchsi4_equality_reg,
4626         nds32_output_cbranchsi4_equality_reg_or_const_int,
4627         nds32_output_cbranchsi4_greater_less_zero): Declare.
4628         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4629         nds32_rimm11s_operand): New predicates.
4630         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4631         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4632         patterns.
4634 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4636         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4637         * config/nds32/nds32.md: Ditto.
4638         * config/nds32/pipelines.md: Ditto.
4640 2018-04-04  Richard Biener  <rguenther@suse.de>
4642         PR tree-optimization/85168
4643         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4644         propagating abnormals.
4646 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4648         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4650 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4651             Kito Cheng  <kito.cheng@gmail.com>
4653         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4654         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4655         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4656         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4657         * config/nds32/nds32.md (sibcall_internal): New.
4658         (sibcall_register): Remove.
4659         (sibcall_immediate): Remove.
4660         (sibcall_value_internal): New.
4661         (sibcall_value_register): Remove.
4662         (sibcall_value_immediate): Remove.
4663         * config/nds32/predicates.md (nds32_general_register_operand): New.
4664         (nds32_call_address_operand): New.
4666 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4668         PR rtl-optimization/85167
4669         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4670         bb_defs if *split_p, instead preinitialize it to NULL.
4672         PR tree-optimization/85156
4673         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4674         evaluating the argument multiple times.
4676 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4678         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4679         than vector.
4680         (_mm_cvtpd_ps): Likewise.
4681         (_mm_cvttpd_epi32): Likewise.
4682         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4683         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4684         vector, pixel, and bool following altivec.h include.
4686 2018-04-03  Martin Sebor  <msebor@redhat.com>
4688         * doc/extend.texi (Common Function Attributes): Clarify.
4689         (const attribute): Likewise.
4690         (pure attribute): Likewise.
4692 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4694         PR target/85169
4695         * config/i386/i386.c (ix86_expand_vector_set): Use
4696         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4698 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4700         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4701         instructions when changing rounding bits to preserve precision bits
4702         in the x87 control word.
4704 2018-04-03  Martin Liska  <mliska@suse.cz>
4706         PR tree-optimization/82491
4707         * rtl.h (strip_offset_and_add): Replace += suboffset with
4708         poly_uint64 () + suboffset.
4710 2018-03-29  Martin Liska  <mliska@suse.cz>
4711             Martin Jambor  <mjambor@suse.cz>
4713         PR ipa/84947
4714         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4715         param_type is not an integral or pointer type.
4717 2018-04-03  Richard Biener  <rguenther@suse.de>
4719         * sese.h (recompute_all_dominators): Remove.
4721 2018-04-02  Martin Sebor  <msebor@redhat.com>
4723         * doc/invoke.texi (-Wrestrict): Fix typos.
4725 2018-04-02  Jim Wilson  <jimw@sifive.com>
4727         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4728         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4729         (<optab>di3, <optab>si3_extend): Likewise.
4730         (<optab>si3_mask, <optab>si3_mask_1): New.
4731         (<optab>di3_mask, <optab>di3_mask_1): New.
4732         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4733         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4734         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4736 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4738         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4739         example.
4741 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4743         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4744         (nds32_canonicalize_comparison): New function.
4746 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4747             Kito Cheng  <kito.cheng@gmail.com>
4748             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4750         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4751         * config/nds32/constants.md (unspec_volatile_element): Add
4752         UNSPEC_VOLATILE_RELAX_GROUP.
4753         * config/nds32/nds32-relax-opt.c: New file.
4754         * config/nds32/nds32-predicates.c
4755         (nds32_symbol_load_store_p): New function.
4756         * config/nds32/nds32-protos.h
4757         (nds32_symbol_load_store_p): Declare function.
4758         (make_pass_nds32_relax_opt): Declare new rtl pass function.
4759         * config/nds32/nds32.c
4760         (nds32_register_pass): New function to register pass.
4761         (nds32_register_passes): New function to register passes.
4762         * config/nds32/nds32.md (relax_group): New pattern.
4763         * config/nds32/nds32.opt (mrelax-hint): New option.
4764         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
4766 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
4768         * config/nds32/t-nds32: Modify files dependency.
4770 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4772         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
4773         (PROFILE_HOOK): Define its implementation.
4775 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4777         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
4778         type and 32-bit size.
4780 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
4782         PR middle-end/85090
4783         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
4784         (V_128_256): New mode iterator.
4785         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
4786         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
4787         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
4788         of V.
4789         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
4790         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
4792 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
4794         PR target/83315
4795         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
4796         NaN inputs correctly.
4798 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
4800         PR target/80546
4801         * config/rs6000/vsx.md (??r): New mode attribute.
4802         (*vsx_mov<mode>_64bit): Use it.
4803         (*vsx_mov<mode>_32bit): Likewise.
4805 2018-03-30  Martin Sebor  <msebor@redhat.com>
4807         PR tree-optimization/84818
4808         * builtins.c (check_access): Use warning_n.
4810 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
4812         PR target/83822
4813         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4814         condition.
4815         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4816         condition.
4818 2018-03-30  Julia Koval  <julia.koval@intel.com>
4820         PR target/84413
4821         * x86-tune.def (movx, partial_reg_dependency): Enable for
4822         m_SKYLAKE_AVX512.
4824 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
4826         PR inline-asm/84985
4827         * lra-constraints.c (process_alt_operands): Move setting
4828         this_alternative_matches below.
4830 2018-03-29  Martin Liska  <mliska@suse.cz>
4832         PR lto/84995.
4833         * doc/invoke.texi: Document how LTO works with debug info.
4834         Describe auto-load support of binutils.  Mention 'x86-64'
4835         as valid option value of -march option.
4837 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
4839         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4841         PR c/85094
4842         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4843         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4844         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4845         checking.
4847 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4849         PR target/84912
4850         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4851         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4852         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4853         for RS6000_BTM_POWERPC64.
4854         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4855         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4856         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4857         definition.
4858         (DIVDE): Use it.
4859         (DIVDEU): Likewise.
4861 2018-03-28 Carl Love  <cel@us.ibm.com>
4863         Revert
4864         2017-09-27  Carl Love  <cel@us.ibm.com>
4866         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4867         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4868         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4869         fctiw instruction.
4871 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4873         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4874         instead of __vector bool.
4875         (_mm_max_pu8): Likewise.
4876         (_mm_min_pi16): Likewise.
4878 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4880         PR target/84912
4881         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4882         (DIVWEUO): Likewise.
4883         (DIVDEO): Likewise.
4884         (DIVDEUO): Likewise.
4885         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4886         DIVWEUO and DIVDEUO.
4887         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4888         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4889         (div_extend): Likewise.
4890         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4891         builtin function.
4892         (__builtin_divweuo): Likewise.
4893         (__builtin_divdeo): Likewise.
4894         (__builtin_divdeuo): Likewise.
4896 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4898         PR target/85095
4899         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4900         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4902         PR tree-optimization/82004
4903         * gimple-match-head.c (optimize_pow_to_exp): New function.
4904         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4905         Don't fold to exp if optimize_pow_to_exp is false.
4907 2018-03-28  Martin Liska  <mliska@suse.cz>
4909         PR other/84819
4910         * calls.c (initialize_argument_information): Fix trailing space.
4911         * common.opt: Fix typo and provide better explanation for
4912         -fsanitize-coverage option.
4913         * config/i386/i386.opt: Fix typo.
4915 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4916             Martin Liska  <mliska@suse.cz>
4918         PR sanitizer/85081
4919         * gimplify.c (asan_poison_variable): Don't do the check for
4920         gimplify_omp_ctxp here.
4921         (gimplify_decl_expr): Do it here.
4922         (gimplify_target_expr): Likewise.
4924 2018-03-28  Martin Liska  <mliska@suse.cz>
4926         PR target/84988
4927         * config/i386/i386.c (ix86_function_arg_advance): Do not call
4928         chkp_type_bounds_count if MPX is not enabled.
4930 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4932         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4934 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4936         PR target/84914
4937         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4938         function to create the function decl for complex long double
4939         multiply and divide for -mabi=ieeelongdouble.
4940         (init_float128_ieee): Call it.
4942 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
4944         PR target/85044
4945         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4946         -fcf-protection=branch -mibt.
4947         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4949 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4951         PR target/81863
4952         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4954 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
4956         PR target/85056
4957         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4958         extern array declarations.
4960 2018-03-27  Richard Biener  <rguenther@suse.de>
4962         PR middle-end/84067
4963         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4964         explicit single_use checks.
4966 2018-03-27  Richard Biener  <rguenther@suse.de>
4968         PR tree-optimization/85082
4969         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4970         Valueize the VUSE.
4972 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4974         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4975         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4976         Turn on fasynchronous-unwind-tables and funwind-tables.
4978 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
4980         PR target/85073
4981         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4982         (*bmi_blsr_<mode>_ccz): Ditto.
4984 2018-03-26  Tom de Vries  <tom@codesourcery.com>
4986         PR tree-optimization/85063
4987         * omp-general.c (offloading_function_p): New function.  Factor out
4988         of ...
4989         * omp-offload.c (pass_omp_target_link::gate): ... here.
4990         * omp-general.h (offloading_function_p): Declare.
4991         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4992         with attribute omp declare target for offloading functions.
4994 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
4996         PR tree-optimization/84005
4997         * tree-data-ref.h (get_base_for_alignment): Declare.
4998         * tree-data-ref.c (get_base_for_alignment_1): New function.
4999         (get_base_for_alignment): Likewise.
5000         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5001         get_base_for_alignment to find a suitable base object, instead
5002         of always using drb->base_address.
5004 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5006         PR inline-asm/85022
5007         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5008         known size by default.
5010 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5012         PR inline-asm/85030
5013         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5014         and non BLKmode operands.
5016 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5018         PR target/85026
5019         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5020         Clean up attributes.
5022 2018-03-23  Richard Biener  <rguenther@suse.de>
5024         PR debug/85020
5025         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5026         we are going to emit early debug for LTO.
5028 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5030         PR inline-asm/85034
5031         * function.c (match_asm_constraints_1): Don't optimize if input
5032         doesn't satisfy general_operand predicate for output's mode.
5034         PR inline-asm/85022
5035         * alias.c (write_dependence_p): Don't require for x_canonicalized
5036         non-VOIDmode if x has VOIDmode.
5038         PR sanitizer/85029
5039         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5040         just don't try to optimize it rather than assert it never happens.
5042 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5044         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5045         macro expansions for definition of ST_INTERNAL_<mode> and
5046         LD_INTERNAL_<mode> builtins.
5047         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5048         Remove prototype.
5049         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5050         function.
5051         (altivec_expand_st_builtin): Likewise.
5052         (altivec_expand_builtin): Remove calls to deleted functions.
5053         (rs6000_address_for_altivec): Delete this function.
5054         * config/rs6000/vector.md: Remove expands for
5055         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5057 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5059         PR target/84826
5060         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5061         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5062         re-computing once computed.
5063         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5064         (arm_init_machine_status): Initialize
5065         machine->static_chain_stack_bytes.
5067 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5069         PR target/84760
5070         * doc/extend.texi: Add four new prototypes for vec_ld.
5071         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5072         definitions for more logical presentation.
5073         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5074         entries for V1TI variants of __builtin_altivec_ld builtin.
5075         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5076         handling of V1TI variant of LVX icode pattern.
5077         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5078         (rs6000_gimple_fold_builtin): Likewise.
5079         (altivec_init_builtins): Add code to define
5080         __builtin_altivec_lvx_v1ti function.
5082 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5084         PR inline-asm/84941
5085         * function.c (match_asm_constraints_1): Don't do the optimization
5086         if input isn't a REG, SUBREG, MEM or constant.
5088 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5090         PR tree-optimization/84956
5091         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5092         bb_has_abnormal_pred.
5094 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5096         PR sanitizer/85018
5097         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5098         DECL_INITIAL (decl) to decl at the end.
5099         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5100         adjust the comment.
5102 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5104         * doc/extend.texi (__builtin_tgmath): Document when complex
5105         integer types are treated as _Complex _Float64.
5107 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5109         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5111 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5113         PR tree-optimization/84960
5114         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5115         if it is ENTRY block, move them into single succ of ENTRY in that case.
5117 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5119         PR tree-optimization/84811
5120         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5121         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5122         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5123         (known_subrange_p): Update accordingly.  Cast each value involved
5124         in the size comparison, rather than casting the result of the
5125         subtraction.
5127 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5129         PR tree-optimization/84982
5130         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5131         by flipping the least significant bit rather than all bits from
5132         bitpos to bitpos + bitsize - 1.
5134 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5136         * doc/extend.texi (Deprecated Features): Remove mention of
5137         long-deleted deprecations.
5139 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5141         PR jit/84288
5142         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5143         * configure: Regenerate.
5145 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5147         PR tree-optimization/83126
5148         * tree-parloops.c (num_phis): New function.
5149         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5151 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5153         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5154         mention anon-struct/union members and trailing attributes.
5156 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5158         PR tree-optimization/84969
5159         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5160         builtin memset partitions if they set different rhs values.
5162 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5164         PR rtl-optimization/84989
5165         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5166         VEC_DUPLICATE with scalar result mode.
5168 2018-03-21  Martin Liska  <mliska@suse.cz>
5170         PR ipa/84963
5171         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5172         not intended return statement.
5174 2018-03-21  Martin Liska  <mliska@suse.cz>
5176         PR target/84988
5177         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5178         (chkp_find_bound_slots_1): Limit number of iterations.
5180 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5182         PR target/84838
5183         * Minor grammar fixes for x86 options.
5185 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5187         PR debug/84875
5188         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5189         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5191 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5193         PR target/83789
5194         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5195         (altivec_lvx_<mode>_1op): Likewise.
5196         (altivec_stvx_<mode>_2op): Likewise.
5197         (altivec_stvx_<mode>_1op): Likewise.
5198         (altivec_lvx_<VM2:mode>): New define_expand.
5199         (altivec_stvx_<VM2:mode>): Likewise.
5200         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5201         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5202         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5203         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5204         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5205         (rs6000_gen_lvx): Likewise.
5206         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5207         (altivec_expand_stv_builtin): Likewise.
5208         (altivec_expand_builtin): Likewise.
5209         * config/rs6000/vector.md: Likewise.
5211 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5213         PR target/82518
5214         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5215         BYTES_BIG_ENDIAN.
5217 2018-03-20  Richard Biener  <rguenther@suse.de>
5219         PR target/84986
5220         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5221         sign-conversions as zero, fall back to standard scalar_stmt
5222         cost for the rest.
5224 2018-03-20  Martin Liska  <mliska@suse.cz>
5226         PR ipa/84825
5227         * predict.c (rebuild_frequencies): Handle case when we have
5228         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5230 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5232         PR target/84990
5233         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5234         flag_section_anchors.
5235         * varasm.c (use_blocks_for_decl_p): Remove hack for
5236         dw2_force_const_mem.
5238         PR target/84845
5239         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5240         to ...
5241         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5242         be created, use lowpart_subreg of operands[0] rather than operands[0]
5243         itself.
5244         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5245         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5246         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5247         and n constraint instead of aarch64_shift_imm_di and Usd.
5248         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5249         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5251 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5253         PR target/82989
5254         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5255         to favor GPR over NEON registers.
5256         (<shift>di3_neon): Likewise.
5258 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5260         PR target/84952
5261         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5262         (nvptx_process_pars): Emit bar.sync asap and alap.
5264 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5266         PR target/84954
5267         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5268         seen_label if seen_label is already set.
5270 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5272         PR target/84945
5273         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5274         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5275         Use 1U instead of 1.  Formatting fixes.
5277         PR c/84953
5278         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5279         instead of TREE_TYPE (s1) for the return value.
5281 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5283         PR tree-optimization/84946
5284         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5285         bitsize + bitsize in poly_uint64 rather than poly_int64.
5287         PR sanitizer/78651
5288         * dwarf2asm.c: Include fold-const.c.
5289         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5290         of decl rather than decl itself.
5292         PR rtl-optimization/84643
5293         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5295 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5297         PR sanitizer/78651
5298         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5299         calling assemble_variable.
5301 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5303         PR target/81647
5304         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5305         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5307 2018-03-19  Jim Wilson  <jimw@sifive.com>
5309         PR bootstrap/84856
5310         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5311         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5312         (riscv_first_stack_step): Likewise.
5313         (riscv_option_override): Use STACK_BOUNDARY instead of
5314         MIN_STACK_BOUNDARY.
5315         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5316         MIN_STACK_BOUNDARY.
5317         (BIGGEST_ALIGNMENT): Set to 128.
5318         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5319         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5320         STACK_BOUNDARY.
5322 2018-03-19  Richard Biener  <rguenther@suse.de>
5324         PR tree-optimization/84933
5325         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5326         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5328 2018-03-19  Richard Biener  <rguenther@suse.de>
5330         PR tree-optimization/84859
5331         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5332         (cond_if_else_store_replacement): Perform sinking operation on
5333         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5334         Generalize what a BB with a single eligible store is.
5336 2018-03-19  Richard Biener  <rguenther@suse.de>
5338         PR tree-optimization/84929
5339         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5340         chrec_is_positive against non-chrec arg.
5342 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5344         PR target/84711
5345         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5347 2018-03-18  Martin Liska  <mliska@suse.cz>
5349         PR rtl-optimization/84635
5350         * regrename.c (build_def_use): Use matches_mode only when
5351         matches >= 0.
5353 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5355         PR tree-optimization/84913
5356         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5357         vectorize chains of COND_EXPRs.
5359 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5361         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5363 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5365         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5367 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5369         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5371 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5372             Kito Cheng  <kito.cheng@gmail.com>
5374         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5375         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5376         (nds32_adjust_reg_alloc_order): New function.
5377         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5379 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5381         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5382         nds32_print_operand, nds32_print_operand_address): Use
5383         HOST_WIDE_INT_PRINT_DEC instead.
5385 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5387         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5389 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5391         PR target/84902
5392         * config/i386/i386.c (initial_ix86_tune_features,
5393         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5394         unsigned long long.
5395         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5396         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5397         rather than 1u << ix86_tune.  Formatting fix.
5398         (ix86_option_override_internal): Change ix86_arch_mask from
5399         unsigned int to unsigned HOST_WIDE_INT, initialize to
5400         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5401         (ix86_function_specific_restore): Likewise.
5403 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5405         PR target/84899
5406         * postreload.c (reload_combine_recognize_pattern): Perform
5407         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5408         truncate_int_for_mode the result for the destination's mode.
5410         PR c/84909
5411         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5412         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5413         Likewise.
5414         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5415         Likewise.
5417 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5419         PR target/84876
5420         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5421         regno_allocno_class_array and sorted_pseudos.
5422         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5423         insns where regno is used.
5425 2018-03-16  Martin Liska  <mliska@suse.cz>
5427         PR ipa/84833
5428         * multiple_target.c (create_dispatcher_calls): Redirect
5429         reference in the symbol table.
5431 2018-03-16  Martin Liska  <mliska@suse.cz>
5433         PR ipa/84722
5434         * multiple_target.c (create_dispatcher_calls): Redirect also
5435         an alias.
5437 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5439         PR c++/79937
5440         PR c++/82410
5441         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5442         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5443         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5445 2018-03-16  Julia Koval  <julia.koval@intel.com>
5447         * doc/invoke.texi (Skylake Server): Add CLWB.
5448         Cannonlake): Remove CLWB.
5450 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5452         PR tree-optimization/84841
5453         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5454         1 << 3.
5455         (FLOAT_ONE_CONST_TYPE): Define.
5456         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5457         (sort_by_operand_rank): Put entries with higher constant_type last
5458         rather than first to match comments.
5460 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5462         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5463         split predicate.
5465 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5467         PR c++/79085
5468         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5469         check and use address of target always.
5471 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5473         PR target/84574
5474         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5475         (indirect_thunk_bnd_needed): Likewise.
5476         (indirect_thunks_used): Likewise.
5477         (indirect_thunks_bnd_used): Likewise.
5478         (indirect_return_needed): New.
5479         (indirect_return_bnd_needed): Likewise.
5480         (output_indirect_thunk_function): Add a bool argument for
5481         function return.
5482         (output_indirect_thunk_function): Don't generate alias for
5483         function return thunk.
5484         (ix86_code_end): Call output_indirect_thunk_function to generate
5485         function return thunks.
5486         (ix86_output_function_return): Set indirect_return_bnd_needed
5487         and indirect_return_needed instead of indirect_thunk_bnd_needed
5488         and indirect_thunk_needed.
5490 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5492         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5493         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5494         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5496 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5497             Paul Hua <paul.hua.gm@gmail.com>
5499         PR c/84852
5500         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5502 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5504         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5505         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5506         resp. SFmode cases.
5508 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5510         PR target/84711
5511         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5512         instead of GET_MODE_SIZE when comparing Units.
5514 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5516         PR target/68256
5517         * varasm.c (hash_section): Return an unchangeble hash value
5518         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5519         Return !aarch64_can_use_per_function_literal_pools_p ().
5521 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5523         PR target/84860
5524         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5525         rather than address of cmode as last argument to prepare_cmp_insn.
5527 2018-03-15  Julia Koval  <julia.koval@intel.com>
5529         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5530         F_AVX512VNNI, F_AVX512BITALG): New.
5532 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5534         PR target/83451
5535         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5536         insn for floating-point loads and stores.
5538 2018-03-14  Carl Love  <cel@us.ibm.com>
5540         * config/rs6000/rs6000-c.c: Add macro definitions for
5541         ALTIVEC_BUILTIN_VEC_PERMXOR.
5542         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5543         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5544         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5545         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5546         UNSPEC_VPERMXOR.
5547         * config/doc/extend.texi: Add prototypes for vec_permxor.
5549 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5551         PR c/84852
5552         * diagnostic-show-locus.c (class layout_point): Convert m_line
5553         from int to linenum_type.
5554         (line_span::comparator): Use linenum "compare" function when
5555         comparing line numbers.
5556         (test_line_span): New function.
5557         (layout_range::contains_point): Convert param "row" from int to
5558         linenum_type.
5559         (layout_range::intersects_line_p): Likewise.
5560         (layout::will_show_line_p): Likewise.
5561         (layout::print_source_line): Likewise.
5562         (layout::should_print_annotation_line_p): Likewise.
5563         (layout::print_annotation_line): Likewise.
5564         (layout::print_leading_fixits): Likewise.
5565         (layout::annotation_line_showed_range_p): Likewise.
5566         (struct line_corrections): Likewise for field m_row.
5567         (line_corrections::line_corrections): Likewise for param "row".
5568         (layout::print_trailing_fixits): Likewise.
5569         (layout::get_state_at_point): Likewise.
5570         (layout::get_x_bound_for_row): Likewise.
5571         (layout::print_line): Likewise.
5572         (diagnostic_show_locus): Likewise for locals "last_line" and
5573         "row".
5574         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5575         * input.c (selftest::test_linenum_comparisons): New function.
5576         (selftest::input_c_tests): Call it.
5577         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5578         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5579         * selftest.h (ASSERT_GT): New macro.
5580         (ASSERT_GT_AT): New macro.
5581         (ASSERT_LT): New macro.
5582         (ASSERT_LT_AT): New macro.
5584 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5586         PR rtl-optimization/84780
5587         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5589 2018-03-14  Martin Liska  <mliska@suse.cz>
5591         * tree.c (record_node_allocation_statistics): Use
5592         get_stats_node_kind.
5593         (get_stats_node_kind): New function extracted from
5594         record_node_allocation_statistics.
5595         (free_node): Use get_stats_node_kind.
5597 2018-03-14  Richard Biener  <rguenther@suse.de>
5599         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5600         that the value-set of ANTIC_IN doesn't grow.
5602         Revert
5603         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5604         member.
5605         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5606         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5608 2018-03-14  Julia Koval  <julia.koval@intel.com>
5610         * config.gcc (icelake-client, icelake-server): New.
5611         (icelake): Remove.
5612         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5613         (initial_ix86_arch_features): Ditto.
5614         (PTA_SKYLAKE): Add SGX.
5615         (PTA_ICELAKE): Remove.
5616         (PTA_ICELAKE_CLIENT): New.
5617         (PTA_ICELAKE_SERVER): New.
5618         (ix86_option_override_internal): Split up icelake on icelake client and
5619         icelake server.
5620         (get_builtin_code_for_version): Ditto.
5621         (fold_builtin_cpu): Ditto.
5622         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5623         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5624         * config/i386/i386.h (processor_type): Ditto.
5625         * doc/invoke.texi: Ditto.
5627 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5629         PR sanitizer/83392
5630         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5631         INTEGER_CST offset, add it together with bitpos / 8 and
5632         sign extend based on POINTER_SIZE.
5634         PR target/84844
5635         Revert
5636         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5638         PR target/78090
5639         * config/i386/constraints.md (Yc): New register constraint.
5640         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5641         Use Yc constraint for alternative 2 of operand 0.  Remove
5642         preferred_for_speed attribute.
5644 2018-03-14  Richard Biener  <rguenther@suse.de>
5646         PR tree-optimization/84830
5647         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5648         with the old one to avoid oscillations.
5650 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5652         PR target/83712
5653         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5654         pseudos.
5655         (assign_by_spills): Return a flag of reload assignment failure.
5656         Do not process the reload assignment failures.  Do not spill other
5657         reload pseudos if they has the same reg class.  Update n if
5658         necessary.
5659         (lra_assign): Add a return arg.  Set up from the result of
5660         assign_by_spills call.
5661         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5662         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5663         usage_insns if it is not NULL.
5664         (spill_hard_reg_in_range): New function.
5665         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5666         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5667         function prototypes.
5668         (lra_assign): Change prototype.
5669         * lra.c (lra): Add code to deal with fails by splitting hard reg
5670         live ranges.
5672 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5674         * config/riscv/riscv.opt (mrelax): New option.
5675         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5676         "norelax" when riscv_mrelax is disabled.
5677         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5679 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5681         PR target/84743
5682         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5683         reassociation for int modes.
5685 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5687         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5688         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5689         for big-endian.
5690         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5691         * config/aarch64/aarch64-sve.md
5692         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5693         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5694         (*extend<mode><Vwide>2): Rename to...
5695         (aarch64_sve_extend<mode><Vwide>2): ...this.
5696         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5697         renaming the old pattern to...
5698         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5699         unsigned packs.
5700         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5701         define_expand, renaming the old pattern to...
5702         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5703         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5704         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5705         account when deciding which SVE instruction the optab should use.
5706         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5708 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5710         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5711         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5712         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5713         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5714         (tlsdesc_small_<mode>): Turn a define_expand and use
5715         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5716         (tlsdesc_small_advsimd_<mode>): ...this.
5717         (tlsdesc_small_sve_<mode>): New pattern.
5719 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5721         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5722         (UNSPEC_UMUL_HIGHPART): New constants.
5723         (MUL_HIGHPART): New int iteraor.
5724         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5725         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5726         define_expand.
5727         (*<su>mul<mode>3_highpart): New define_insn.
5729 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5731         PR lto/84805
5732         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5733         incomplete types.
5735 2018-03-13  Martin Liska  <mliska@suse.cz>
5737         PR ipa/84658.
5738         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5739         vector.
5740         (sem_item_optimizer::~sem_item_optimizer): Release it.
5741         (sem_item_optimizer::merge_classes): Register variable aliases.
5742         (sem_item_optimizer::fixup_pt_set): New function.
5743         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5744         * ipa-icf.h: Declare new variables and functions.
5746 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5748         PR middle-end/84834
5749         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5750         integer_pow2p@2 and test integer_pow2p in condition.
5751         (A < 0 ? C : 0): Similarly for @1.
5753         PR middle-end/84831
5754         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5755         characters starting at p contain '\0' character, don't look beyond
5756         that.
5758         PR target/84827
5759         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5760         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
5762         PR target/84828
5763         * reg-stack.c (change_stack): Change update_end var from int to
5764         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
5765         also call set_block_for_insn on the newly added insns and rescan.
5767         PR target/84786
5768         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
5769         on the last operand.
5771         PR c++/84704
5772         * tree.c (stabilize_reference_1): Return save_expr (e) for
5773         STATEMENT_LIST even if it doesn't have side-effects.
5775 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
5777         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
5779 2018-03-12  Renlin Li  <renlin.li@arm.com>
5781         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
5782         aarch64_output_scalar_simd_mov_immediate.
5784 2018-03-12  Martin Sebor  <msebor@redhat.com>
5786         PR tree-optimization/83456
5787         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
5788         for perfectly overlapping calls to memcpy.
5789         (gimple_fold_builtin_memory_chk): Same.
5790         (gimple_fold_builtin_strcpy): Handle no-warning.
5791         (gimple_fold_builtin_stxcpy_chk): Same.
5792         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
5794 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5796         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
5797         parameter.  Use it for SFmode.
5798         (rs6000_function_arg_advance_1): Adjust.
5799         (rs6000_function_arg): Adjust.
5800         (rs6000_gimplify_va_arg): Pass false for that new parameter.
5802 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5804         PR rtl-optimization/84169
5805         PR rtl-optimization/84780
5806         * combine.c (can_combine_p): Check for a 2-insn combination whether
5807         the destination register is used between the two insns, too.
5809 2018-03-12  Richard Biener  <rguenther@suse.de>
5811         PR tree-optimization/84803
5812         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5813         for refs DR analysis didn't process.
5815 2018-03-12  Richard Biener  <rguenther@suse.de>
5817         PR tree-optimization/84777
5818         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5819         force-vectorize loops ignore whether we are optimizing for size.
5821 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5823         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5824         (TARGET_MD_ASM_ADJUST): Define.
5826 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
5827             Kito Cheng  <kito.cheng@gmail.com>
5828             Chung-Ju Wu  <jasonwucj@gmail.com>
5830         * config/nds32/nds32.c (nds32_compute_stack_frame,
5831         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5832         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5833         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5834         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5835         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5836         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5837         * config/nds32/nds32.md (prologue, epilogue): Use macro
5838         NDS32_V3PUSH_AVAILABLE_P to do checking.
5840 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
5842         PR debug/58150
5843         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5844         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5845         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
5846         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
5847         addition of most attributes on !orig_type_die or the attribute not
5848         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5850 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5851             Chung-Ju Wu  <jasonwucj@gmail.com>
5853         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5854         __NDS32_VH__ macro.
5855         * config/nds32/nds32.opt (mvh): New option.
5857 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5858             Chung-Ju Wu  <jasonwucj@gmail.com>
5860         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5861         function.
5862         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5863         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5864         definition.
5866 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5867             Chung-Ju Wu  <jasonwucj@gmail.com>
5869         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5870         function.
5871         * config/nds32/nds32-multiple.md (strlensi): New pattern.
5872         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5874 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
5875             Kito Cheng  <kito.cheng@gmail.com>
5876             Chung-Ju Wu  <jasonwucj@gmail.com>
5878         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5879         UNSPEC_FFMISM and UNSPEC_FLMISM.
5880         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5881         for ffb, ffmism and flmism.
5882         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5883         (unspec_ffmism): Ditto.
5884         (unspec_flmism): Ditto.
5885         (nds32_expand_builtin_impl): Check if string extension is available.
5886         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5887         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5889 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
5891         Reverting patch:
5892         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5894         PR target/83712
5895         * lra-assigns.c (assign_by_spills): Return a flag of reload
5896         assignment failure.  Do not process the reload assignment
5897         failures.  Do not spill other reload pseudos if they has the same
5898         reg class.
5899         (lra_assign): Add a return arg.  Set up from the result of
5900         assign_by_spills call.
5901         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5902         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5903         usage_insns if it is not NULL.
5904         (spill_hard_reg_in_range): New function.
5905         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5906         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5907         function prototypes.
5908         (lra_assign): Change prototype.
5909         * lra.c (lra): Add code to deal with fails by splitting hard reg
5910         live ranges.
5912 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
5914         PR target/84807
5915         * config/i386/i386.opt: Replace Enforcment with Enforcement.
5917 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
5919         PR debug/84620
5920         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5921         (dw_val_node): Add val_symbolic_view.
5922         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5923         (symview_upper_bound): New.
5924         (new_line_info_table): Initialize symviews_since_reset.
5925         (dwarf2out_source_line): Count symviews_since_reset and set
5926         symview_upper_bound.
5927         (dw_val_equal_p): Handle symview.
5928         (add_AT_symview): New.
5929         (print_dw_val): Handle symview.
5930         (attr_checksum, attr_checksum_ordered): Likewise.
5931         (same_dw_val_p, size_of_die): Likewise.
5932         (value_format, output_die): Likewise.
5933         (add_high_low_attributes): Use add_AT_symview for entry_view.
5934         (dwarf2out_finish): Reset symview_upper_bound, clear
5935         zero_view_p.
5937 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
5939         PR target/83969
5940         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5941         Add strict argument and use it.
5942         (rs6000_split_multireg_move): Update for new strict argument.
5943         (mem_operand_gpr): Disallow all non-offsettable addresses.
5944         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5946 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
5948         PR target/84772
5949         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5950         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5951         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5953         PR c++/84767
5954         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5955         decl, use remap_type if we want to use the type.
5957 2018-03-09  Martin Sebor  <msebor@redhat.com>
5959         PR tree-optimization/84526
5960         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5961         Remove dead code.
5962         (builtin_access::generic_overlap): Be prepared to handle non-array
5963         base objects.
5965 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
5967         PR rtl-optimization/84682
5968         * lra-constraints.c (process_address_1): Check is_address flag
5969         for address constraints.
5970         (process_alt_operands): Likewise.
5971         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5972         preprocess_constraints.
5973         * recog.h (preprocess_constraints): Add oploc parameter.
5974         Adjust callers.
5975         * recog.c (preprocess_constraints): Test address_operand for
5976         CT_ADDRESS constraints.
5978 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5980         PR target/83712
5981         * lra-assigns.c (assign_by_spills): Return a flag of reload
5982         assignment failure.  Do not process the reload assignment
5983         failures.  Do not spill other reload pseudos if they has the same
5984         reg class.
5985         (lra_assign): Add a return arg.  Set up from the result of
5986         assign_by_spills call.
5987         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5988         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5989         usage_insns if it is not NULL.
5990         (spill_hard_reg_in_range): New function.
5991         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5992         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5993         function prototypes.
5994         (lra_assign): Change prototype.
5995         * lra.c (lra): Add code to deal with fails by splitting hard reg
5996         live ranges.
5998 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6000         PR target/83193
6001         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6002         Accept complain bool parameter.  Only emit errors if it is true.
6003         (arm_parse_cpu_option_name): Likewise.
6004         (arm_target_thumb_only): Adjust callers of the above.
6005         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6006         prototype to take a default true bool parameter.
6007         (arm_parse_arch_option_name): Likewise.
6009 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6010             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6012         PR jit/64089
6013         PR jit/84288
6014         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6015         * configure: Regenerate.
6016         * configure.ac ("linker --version-script option"): New.
6017         ("linker soname option"): New.
6019 2018-03-09  Richard Biener  <rguenther@suse.de>
6021         PR tree-optimization/84775
6022         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6023         immediate uses of predicate stmts and mark them modified.
6025         Revert
6026         PR tree-optimization/84178
6027         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6028         to caller.
6029         (version_loop_for_if_conversion): Delay update_ssa call.
6030         (tree_if_conversion): Delay update_ssa until after predicate
6031         insertion.
6033 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6035         PR target/84763
6036         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6037         when the function accesses prior frames.
6039 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6041         PR debug/84456
6042         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6043         gen_llsym, otherwise call maybe_gen_llsym.
6045         PR inline-asm/84742
6046         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6047         has ',' character inside of it.
6049 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6051         PR target/84748
6052         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6053         as clobbering CC_REGNUM.
6055 2018-03-08  Richard Biener  <rguenther@suse.de>
6057         PR middle-end/84552
6058         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6059         (follow_copies_to_constant): Do not follow SSA names registered
6060         for update.
6062 2018-03-08  Richard Biener  <rguenther@suse.de>
6064         PR tree-optimization/84178
6065         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6066         to caller.
6067         (version_loop_for_if_conversion): Delay update_ssa call.
6068         (tree_if_conversion): Delay update_ssa until after predicate
6069         insertion.
6071 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6073         PR tree-optimization/84178
6074         * tree-if-conv.c (release_bb_predicate): Remove the
6075         the assertion that the stmts have NULL use_ops.
6076         Discard the statements, asserting that they haven't
6077         yet been added to a BB.
6079 2018-03-08  Richard Biener  <rguenther@suse.de>
6081         PR tree-optimization/84746
6082         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6083         (phi_translate): Pass in destination ANTIC_OUT set.
6084         (phi_translate_1): Likewise.  For a simplified result lookup
6085         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6086         (phi_translate_set): Adjust.
6087         (do_pre_regular_insertion): Likewise.
6088         (do_pre_partial_partial_insertion): Likewise.
6090 2018-03-08  Martin Liska  <mliska@suse.cz>
6092         PR gcov-profile/84735
6093         * doc/gcov.texi: Document usage of profile files.
6094         * gcov-io.h: Document changes in the format.
6096 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6098         PR debug/84404
6099         PR debug/84408
6100         * dwarf2out.c (struct dw_line_info_table): Update comments for
6101         view == -1.
6102         (FORCE_RESET_NEXT_VIEW): New.
6103         (FORCE_RESETTING_VIEW_P): New.
6104         (RESETTING_VIEW_P): Check for -1 too.
6105         (ZERO_VIEW_P): Likewise.
6106         (new_line_info_table): Force-reset next view.
6107         (dwarf2out_begin_function): Likewise.
6108         (dwarf2out_source_line): Simplify zero_view_p initialization.
6109         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6110         view directly.  Omit view when omitting .loc at line 0.
6112 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6114         PR tree-optimization/84740
6115         * tree-switch-conversion.c (process_switch): Call build_constructors
6116         only if info.phi_count is non-zero.
6118         PR tree-optimization/84739
6119         * tree-tailcall.c (find_tail_calls): Check call arguments against
6120         DECL_ARGUMENTS (current_function_decl) rather than
6121         DECL_ARGUMENTS (func) when checking for tail recursion.
6123 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6125         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6126         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6127         Volker Reichelt's entry and add entries for people that perform
6128         GCC fuzzy testing and report numerous bugs.
6130 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6132         PR target/82411
6133         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6134         readonly data in sdata, if that is disabled.
6135         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6136         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6137         -mreadonly-in-sdata option.
6139 2018-03-07  Martin Sebor  <msebor@redhat.com>
6141         PR tree-optimization/84468
6142         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6143         basic block when looking for nul assignment.
6145 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6147         PR target/84277
6148         * except.h (output_function_exception_table): Adjust prototype.
6149         * except.c (output_function_exception_table): Remove FNNAME parameter
6150         and add SECTION parameter.  Ouput one part of the table at a time.
6151         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6152         the first part of the exception table and emit unwind directives.
6153         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6154         (i386_pe_seh_cold_init): Likewise.
6155         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6156         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6157         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6158         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6159         * config/i386/winnt.c: Include except.h.
6160         (struct seh_frame_state): Add reg_offset, after_prologue and
6161         in_cold_section fields.
6162         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6163         (i386_pe_seh_cold_init): New function.
6164         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6165         to seh->in_cold_section.
6166         (seh_emit_push): Record the offset of the push.
6167         (seh_emit_save): Record the offet of the save.
6168         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6169         Test seh->after_prologue to disregard the epilogue.
6170         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6171         (i386_pe_end_cold_function): New function.
6173 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6175         PR fortran/84565
6176         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6177         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6179         PR c++/84704
6180         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6181         on tmp_var.
6182         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6183         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6185         PR middle-end/84723
6186         * multiple_target.c: Include tree-inline.h and intl.h.
6187         (expand_target_clones): Diagnose and fail if node->definition and
6188         !tree_versionable_function_p (node->decl).
6190 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6192         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6193         sprint_ul.
6194         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6195         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6196         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6198 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6200         PR target/84710
6201         * combine.c (try_combine): Use reg_or_subregno instead of handling
6202         just paradoxical SUBREGs and REGs.
6204 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6206          * config/arc/arc.c (arc_finalize_pic): Remove function.
6207          (arc_must_save_register): We use single base PIC register, remove
6208          checks to save/restore the PIC register.
6209          (arc_expand_prologue): Likewise.
6210          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6211          Remove.
6212          (arc_verify_short): Likewise.
6213          (arc_attr_type): Likewise.
6214          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6215          (walk_stores): Likewise.
6216          (arc_address_cost): Make it static.
6217          (arc_verify_short): Likewise.
6218          (branch_dest): Likewise.
6219          (arc_attr_type): Likewise.
6220          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6221          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6222          (arc_final_prescan_insn): Remove inserting the nops due to
6223          hardware hazards.  It is done in reorg step.
6224          (insn_length_variant_t): Remove.
6225          (insn_length_parameters_t): Likewise.
6226          (arc_insn_length_parameters): Likewise.
6227          (arc_get_insn_variants): Likewise.
6228          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6230 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6232         PR inline-asm/84683
6233         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6234         assertion failure.
6236         PR tree-optimization/84687
6237         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6238         on new_node->decl.
6239         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6241 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6243         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6244         Rename to ppc_speculation_barrier.
6245         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6246         __builtin_ppc_speculation_barrier.
6248 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6250         PR target/84700
6251         * combine.c (combine_simplify_rtx): Don't try to simplify if
6252         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6253         are equal to x.
6255 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6257         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6258         to 32 bytes when compiling for POWER9.
6260 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6262         PR target/84564
6263         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6264         regparm >= 3 with no arg reg available also for calls with
6265         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6267         PR target/84524
6268         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6269         orig,vex.
6270         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6272 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6274         PR target/84264
6275         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6277 2018-03-05  Richard Biener  <rguenther@suse.de>
6279         PR tree-optimization/84486
6280         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6281         When inserting a __builtin_assume_aligned call set the LHS
6282         SSA name alignment info accordingly.
6284 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6286         PR tree-optimization/84114
6287         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6288         Avoid reassociation of FLOAT_MODE addition.
6290 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6292         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6293         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6294         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6295         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6296         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6297         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6298         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6299         and -mwbnoinvd.
6300         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6301         __builtin_ia32_wbinvd): New builtins.
6302         (SPECIAL_ARGS2): New.
6303         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6304         (SPECIAL_ARGS2): New.
6305         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6306         (ix86_valid_target_attribute_inner_p): Ditto.
6307         (ix86_init_mmx_sse_builtins): Add special_args2.
6308         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6309         TARGET_WBNOINVD_P): New.
6310         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6311         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6312         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6313         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6314         * config/i386/pconfigintrin.h: New file.
6315         * config/i386/wbnoinvdintrin.h: Ditto.
6316         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6317         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6319 2018-03-05  Richard Biener  <rguenther@suse.de>
6321         PR tree-optimization/84670
6322         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6323         member.
6324         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6325         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6326         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6327         doesn't grow if all successors (recursively) were visited at least
6328         once.
6330 2018-03-05  Richard Biener  <rguenther@suse.de>
6332         PR tree-optimization/84650
6333         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6334         if executed in the loop pipeline.
6336 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6338         * doc/configfiles.texi (Configuration Files): Move info about
6339         conditionalizing $target-protos.h to...
6340         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6341         differs from $target-protos.h.
6343 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6344             Chung-Ju Wu  <jasonwucj@gmail.com>
6346         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6347         * config/nds32/nds32-multiple.md (setmemsi): Define.
6348         * config/nds32/nds32-memory-manipulation.c
6349         (nds32_gen_dup_4_byte_to_word_value): New.
6350         (emit_setmem_word_loop): New.
6351         (emit_setmem_byte_loop): New.
6352         (nds32_expand_setmem_loop): New.
6353         (nds32_expand_setmem_loop_v3m): New.
6354         (nds32_expand_setmem_unroll): New.
6355         (nds32_expand_setmem): New.
6357 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6358             Chung-Ju Wu  <jasonwucj@gmail.com>
6360         * config/nds32/nds32-memory-manipulation.c
6361         (nds32_emit_load_store): New.
6362         (nds32_emit_post_inc_load_store): New.
6363         (nds32_emit_mem_move): New.
6364         (nds32_emit_mem_move_block): New.
6365         (nds32_expand_movmemsi_loop_unknown_size): New.
6366         (nds32_expand_movmemsi_loop_known_size): New.
6367         (nds32_expand_movmemsi_loop): New.
6368         (nds32_expand_movmemsi_unroll): New.
6369         (nds32_expand_movmemqi): Rename ...
6370         (nds32_expand_movmemsi): ... to this.
6371         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6372         (movmemsi): ... to this.
6373         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6374         (nds32_expand_movmemsi): ... to this.
6376 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6377             Monk Chiang  <sh.chiang04@gmail.com>
6378             Chung-Ju Wu  <jasonwucj@gmail.com>
6380         * config/nds32/nds32-protos.h
6381         (nds32_expand_load_multiple): New arguments.
6382         (nds32_expand_store_multiple): Ditto.
6383         (nds32_valid_multiple_load_store): Rename ...
6384         (nds32_valid_multiple_load_store_p): ... to this.
6385         * config/nds32/nds32-memory-manipulation.c
6386         (nds32_expand_load_multiple): Refine implementation.
6387         (nds32_expand_store_multiple): Ditto.
6388         * config/nds32/nds32-multiple.md
6389         (load_multiple): Update nds32_expand_load_multiple interface.
6390         (store_multiple): Update nds32_expand_store_multiple interface.
6391         * config/nds32/nds32-predicates.c
6392         (nds32_valid_multiple_load_store): Rename ...
6393         (nds32_valid_multiple_load_store_p): ... to this and refine
6394         implementation.
6395         * config/nds32/predicates.md
6396         (nds32_load_multiple_and_update_address_operation): New predicate.
6397         (nds32_store_multiple_and_update_address_operation): New predicate.
6399 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6400             Chung-Ju Wu  <jasonwucj@gmail.com>
6402         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6403         (combo): New attribute.
6404         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6406 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6408         * config/nds32/nds32.opt: Change -mcmodel= default value.
6410 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6411             Monk Chiang  <sh.chiang04@gmail.com>
6412             Chung-Ju Wu  <jasonwucj@gmail.com>
6414         * config/nds32/constants.md (unspec_element): New enum.
6415         * config/nds32/constraints.md (Umw): New constraint.
6416         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6417         * config/nds32/nds32-intrinsic.md: Likewise.
6418         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6419         (nds32_valid_smw_lwm_base_p): New.
6420         (nds32_output_smw_single_word): New.
6421         (nds32_output_lmw_single_word): New.
6422         (nds32_expand_unaligned_load): New.
6423         (nds32_expand_unaligned_store): New.
6424         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6425         (nds32_output_smw_single_word): Declare.
6426         (nds32_output_lmw_single_word): Declare.
6427         (nds32_expand_unaligned_load): Declare.
6428         (nds32_expand_unaligned_store): Declare.
6429         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6430         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6431         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6432         NDS32_BUILTIN_UASTORE_DW.
6433         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6434         predicate.
6436 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6437             Kito Cheng  <kito.cheng@gmail.com>
6438             Chung-Ju Wu  <jasonwucj@gmail.com>
6440         * config/nds32/nds32-intrinsic.c
6441         (nds32_expand_builtin_null_ftype_reg): Delete.
6442         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6443         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6444         (nds32_read_argument): New.
6445         (nds32_legitimize_target): Ditto.
6446         (nds32_legitimize_argument): Ditto.
6447         (nds32_check_constant_argument): Ditto.
6448         (nds32_expand_unop_builtin): Ditto.
6449         (nds32_expand_unopimm_builtin): Ditto.
6450         (nds32_expand_binop_builtin): Ditto.
6451         (nds32_builtin_decl_impl): Ditto.
6452         (builtin_description): Ditto.
6453         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6454         (nds32_init_builtins_impl): Ditto.
6455         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6456         (nds32_builtin_decl): New.
6457         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6458         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6460 2018-03-02  Jeff Law  <law@redhat.com>
6462         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6463         (redundant_insn, fill_simple_delay_slots): Likewise.
6464         (fill_slots_from_thread): Likewise.
6465         * resource.c (mark_referenced_resources): Likewise.
6466         (mark_set_resources, find_dead_or_set_registers): Likewise.
6468 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6470         * substring-locations.h (format_warning_va): Formatting fix for
6471         ATTRIBUTE_GCC_DIAG.
6472         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6473         argument.
6474         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6475         * substring-locations.c: Include intl.h.
6476         (format_warning_va): Turned into small wrapper around
6477         format_warning_n_va, renamed to ...
6478         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6479         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6480         use ngettext.
6481         (format_warning_at_substring_n): New function.
6482         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6483         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6484         format_warning_at_substring with just a shorter name instead of
6485         const function pointer.
6486         (fmtwarn_n): New function.
6487         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6488         appropriate, get rid of all the fmtstr temporaries, move conditionals
6489         with G_() wrapped string literals directly into fmtwarn arguments,
6490         cast dir.len to (int), formatting fixes.
6492 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6494         * doc/invoke.texi: Remove "Cilk Plus" references.
6496 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6497             Richard Biener  <rguenther@suse.de>
6499         PR ipa/84628
6500         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6501         for error or warning attributes if CALL_FROM_THUNK_P is set.
6502         Formatting fixes.
6504 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6506         PR target/56540
6507         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6508         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6510         PR target/56540
6511         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6512         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6514         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6515         instead of -1U in last predictors element's probability member.
6517 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6519         PR ipa/83983
6520         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6521         arguments if they are comparable.
6523 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6525         PR tree-optimization/84634
6526         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6527         masks and masked_loop_p with a single loop_masks, making sure it's
6528         null for bb vectorization.
6530 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6532         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6533         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6534         loop->force_vectorize to check whether there is no alias.
6536 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6538         PR target/84614
6539         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6540         prototypes.
6541         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6542         comments.
6543         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6544         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6545         instead of a loop around prev_real_insn.
6546         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6547         prev_real_insn.
6549         PR inline-asm/84625
6550         * config/i386/i386.c (ix86_print_operand): Use conditional
6551         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6552         zero vector.
6554 2018-03-02  Richard Biener  <rguenther@suse.de>
6556         PR tree-optimization/84427
6557         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6558         (bitmap_set_subtract_values): Rewrite to handle multiple
6559         exprs per value.
6560         (clean): Likewise.
6561         (prune_clobbered_mems): Likewise.
6562         (phi_translate): Take edge instead of pred/phiblock.
6563         (phi_translate_1): Likewise.
6564         (phi_translate_set): Likewise.  Insert all translated
6565         exprs for a value into the set, keeping possibly multiple
6566         expressions per value.
6567         (compute_antic_aux): Adjust for phi_translate changes.
6568         When intersecting union the expressions and prune those
6569         not in the final value set, keeping possibly multiple
6570         expressions per value.  Do not use value-insertion
6571         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6572         all expressions.  Add verification that the value-sets
6573         only shrink during iteration.
6574         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6575         (do_pre_regular_insertion): Likewise.
6576         (do_pre_partial_partial_insertion): Likewise.
6578 2018-03-02  Richard Biener  <rguenther@suse.de>
6580         PR target/82005
6581         * config/darwin.c (saved_debug_info_level): New static global.
6582         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6583         (darwin_asm_lto_end): Restore debug info generation settings.
6585 2018-03-01  Martin Liska  <mliska@suse.cz>
6587         PR sanitizer/82484
6588         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6589         volatile arguments.
6591 2018-03-01  Richard Biener  <rguenther@suse.de>
6593         PR debug/84645
6594         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6595         type annotation with LTO when debug was disabled at compile-time.
6597 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6599         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6600         XINT with INTVAL.
6601         (mips_final_postscan_insn): Likewise.
6603 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6605         PR rtl-optimization/84528
6606         * alias.c (init_alias_target): Add commentary.
6607         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6608         a unique base value if the frame pointer is not eliminated
6609         to the stack pointer.
6611 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6613         PR rtl-optimization/83327
6614         * lra-int.h (hard_regs_spilled_into): Declare.
6615         * lra.c (hard_regs_spilled_into): Define.
6616         (init_reg_info): Init hard_regs_spilled_into.
6617         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6618         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6619         (process_bb_lives): Handle hard_regs_spilled_into.
6620         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6621         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6623 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6625         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6626         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6627         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6628         * config/rs6000/aix72.h: New file.
6630 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6632         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6633         instead of warning_at with conditional singular and plural messages
6634         where possible.
6636         PR target/52991
6637         * stor-layout.c (update_alignment_for_field): For
6638         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6639         && !DECL_PACKED (field), do the alignment update, just use
6640         only desired_align instead of MAX (type_align, desired_align)
6641         as the alignment.
6642         (place_field): Don't do known_align < desired_align handling
6643         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6644         is non-NULL, instead do it after rli->prev_field handling and
6645         only if not within a bitfield word.  For DECL_PACKED (field)
6646         use type_align of BITS_PER_UNIT.
6648 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6650         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6651         superfluous parentheses and trailing spaces.
6653 2018-02-28  Richard Biener  <rguenther@suse.de>
6655         PR tree-optimization/84584
6656         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6657         SCoPs with fake exit edge.
6659 2018-02-28  Martin Liska  <mliska@suse.cz>
6661         PR testsuite/84597
6662         * timevar.c (timer::print): Fix format to properly print 100%
6663         values.
6665 2018-02-28  Richard Biener  <rguenther@suse.de>
6667         PR middle-end/84607
6668         * genmatch.c (capture_info::walk_match): Do not mark
6669         captured expressions without operands as expr_p given
6670         they act more like predicates and should be subject to
6671         "lost tail" side-effect preserving.
6673 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6675         PR rtl-optimization/81611
6676         * auto-inc-dec.c (attempt_change): Move dead note from
6677         mem_insn if it's the next use of regno
6678         (find_address): Take address use of reg holding
6679         non-incremented value.  Add parm to limit search to the named
6680         reg only.
6681         (merge_in_block): Attempt to use a mem insn that is the next
6682         use of the original regno.
6684 2018-02-27  Martin Sebor  <msebor@redhat.com>
6686         PR c++/83871
6687         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6688         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6690 2018-02-27  Martin Sebor  <msebor@redhat.com>
6692         PR translation/84207
6693         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6694         n argument to unsigned HOST_WIDE_INT.
6695         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6696         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6697         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6698         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6700 2018-02-27  Richard Biener  <rguenther@suse.de>
6702         PR tree-optimization/84512
6703         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6704         Do not use the estimate returned from record_stmt_cost for
6705         the scalar iteration cost but sum properly using add_stmt_cost.
6707 2018-02-27  Richard Biener  <rguenther@suse.de>
6709         PR tree-optimization/84466
6710         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6711         Adjust last change to less strictly validate use operands.
6713 2018-02-27  Martin Liska  <mliska@suse.cz>
6715         PR gcov-profile/84548
6716         * gcov.c (process_file): Allow partial overlap and consider it
6717         also as group functions.
6718         (output_lines): Properly calculate range of lines for a group.
6720 2018-02-27  Martin Liska  <mliska@suse.cz>
6722         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6723         'ggc' suffixes.  Change first column width.
6724         (timer::print): Fix formatting of the column.
6726 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6728         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6729         preserve inline entry blocks for the sake of debug inline
6730         entry point markers alone.
6731         (remove_unused_locals): Suggest in comments a better place to
6732         force the preservation of inline entry blocks that are
6733         otherwise unused, but do not preserve them.
6735 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6737         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6739 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6741         PR target/84039
6742         * config/i386/constraints.md (Bs): Replace
6743         ix86_indirect_branch_register with
6744         TARGET_INDIRECT_BRANCH_REGISTER.
6745         (Bw): Likewise.
6746         * config/i386/i386.md (indirect_jump): Likewise.
6747         (tablejump): Likewise.
6748         (*sibcall_memory): Likewise.
6749         (*sibcall_value_memory): Likewise.
6750         Peepholes of indirect call and jump via memory: Likewise.
6751         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6752         (*sibcall_value_GOT_32): Likewise.
6753         * config/i386/predicates.md (indirect_branch_operand): Likewise.
6754         (GOT_memory_operand): Likewise.
6755         (call_insn_operand): Likewise.
6756         (sibcall_insn_operand): Likewise.
6757         (GOT32_symbol_operand): Likewise.
6758         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6760 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6762         PR rtl-optimization/83496
6763         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
6764         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
6765         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
6766         redundant insn, if any.
6767         (relax_delay_slots): Likewise.
6768         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
6770 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
6772         PR tree-optimization/83965
6773         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
6774         that grouped statements are part of a reduction chain.  Return
6775         true if the statement is not marked as a reduction itself but
6776         is part of a group.
6777         (vect_recog_dot_prod_pattern): Don't check whether the statement
6778         is part of a group here.
6779         (vect_recog_sad_pattern): Likewise.
6780         (vect_recog_widen_sum_pattern): Likewise.
6782 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6784         PR debug/84545
6785         * final.c (rest_of_clean_state): Also look for calls inside sequences.
6787 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6789         PR target/84530
6790         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
6791         the bool argument.
6792         (ix86_output_indirect_function_return): New prototype.
6793         (ix86_split_simple_return_pop_internal): Likewise.
6794         * config/i386/i386.c (indirect_return_via_cx): New.
6795         (indirect_return_via_cx_bnd): Likewise.
6796         (indirect_thunk_name): Handle return va CX_REG.
6797         (output_indirect_thunk_function): Create alias for
6798         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
6799         (ix86_output_indirect_jmp): Remove the bool argument.
6800         (ix86_output_indirect_function_return): New function.
6801         (ix86_split_simple_return_pop_internal): Likewise.
6802         * config/i386/i386.md (*indirect_jump): Don't pass false
6803         to ix86_output_indirect_jmp.
6804         (*tablejump_1): Likewise.
6805         (simple_return_pop_internal): Change it to define_insn_and_split.
6806         Call ix86_split_simple_return_pop_internal to split it for
6807         -mfunction-return=.
6808         (simple_return_indirect_internal): Call
6809         ix86_output_indirect_function_return instead of
6810         ix86_output_indirect_jmp.
6812 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
6814         PR bootstrap/84405
6815         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6816         memset and value initialization afterwards.
6818 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
6820         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6822 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6824         PR target/84521
6825         * common/config/aarch64/aarch64-common.c
6826         (aarch_option_optimization_table[]): Switch
6827         off fomit-frame-pointer
6829 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6830             Chung-Ju Wu  <jasonwucj@gmail.com>
6832         * config/nds32/nds32-multiple.md (load_multiple): Disallow
6833         volatile memory.
6834         (store_multiple): Ditto.
6836 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6838         * config.gcc: Add --with-cpu support for nds32 target.
6839         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6840         * config/nds32/nds32.opt: Add -mcpu= option.
6842 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
6844         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6845         isel=yes): Warn for these deprecated options.
6847 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
6849         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6850         ISA_2_5_MASKS_EMBEDDED.
6852 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
6854         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6855         p->max as pointers rather than using iterative_hash_expr.
6857 2018-02-23  Carl Love  <cel@us.ibm.com>
6859         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6860         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6861         BU_P8V_OVERLOAD_2.
6862         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6863         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6864         P8V_BUILTIN_VEC_VUNSIGNED2.
6866 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
6868         PR target/81572
6869         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6870         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6871         LRA_UNKNOWN_ALT.
6872         * lra-constraints.c (curr_insn_transform): Set up
6873         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
6874         LRA_UNKNOWN_ALT.
6875         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6876         * lra-eliminations.c (spill_pseudos): Ditto.
6877         (process_insn_for_elimination): Ditto.
6878         * lra-lives.c (reg_early_clobber_p): Use the new macros.
6879         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6880         LRA_NON_CLOBBERED_ALT.
6882 2018-02-22  Martin Sebor  <msebor@redhat.com>
6884         PR tree-optimization/84480
6885         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6886         to maybe_diag_stxncpy_trunc.  Call it.
6887         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6888         from gimple_fold_builtin_strcpy.  Print inlining stack.
6889         (handle_builtin_stxncpy): Print inlining stack.
6890         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6892 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
6894         PR target/84176
6895         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6896         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6897         and -fcheck-pointer-bounds are used together.
6898         (indirect_thunk_prefix): New enum.
6899         (indirect_thunk_need_prefix): New function.
6900         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
6901         "_nt" instead of "_bnd" for NOTRACK prefix.
6902         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6903         (output_indirect_thunk_function): Likewise.
6904         (): Likewise.
6905         (ix86_code_end): Update output_indirect_thunk_function calls.
6906         (ix86_output_indirect_branch_via_reg): Replace
6907         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6908         (ix86_output_indirect_branch_via_push): Likewise.
6909         (ix86_output_function_return): Likewise.
6910         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6911         incompatible with -fcf-protection=branch and
6912         -fcheck-pointer-bounds.
6914 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6916         PR target/83335
6917         * config/aarch64/aarch64.c (aarch64_print_address_internal):
6918         Change gcc_assert call to output_operand_lossage.
6920 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6922         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6924 2018-02-22  DJ Delorie  <dj@redhat.com>
6925             Sebastian Perta  <sebastian.perta@renesas.com>
6926             Oleg Endo  <olegendo@gcc.gnu.org>
6928         * config/rx/rx.c (rx_rtx_costs): New function.
6929         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6931 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6933         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6935 2018-02-22  Martin Liska  <mliska@suse.cz>
6937         PR driver/83193
6938         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6939         Add "native" as a possible value.
6941 2018-02-22  Martin Liska  <mliska@suse.cz>
6943         PR driver/83193
6944         * config/i386/i386.c (ix86_option_override_internal):
6945         Add "native" as a possible value for -march and -mtune.
6947 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
6949         PR target/84502
6950         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6951         to all type variants.
6953         PR tree-optimization/84503
6954         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6955         width as info->bitpos + info->bitsize - start.
6956         (merged_store_group::merge_overlapping): Simplify width computation.
6957         (check_no_overlap): New function.
6958         (imm_store_chain_info::try_coalesce_bswap): Compute expected
6959         start + width and last_order of the group, fail if check_no_overlap
6960         fails.
6961         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6962         to group if check_no_overlap fails.
6964 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6966         * config/rs6000/altivec.md: Delete contraint arguments to
6967         define_expand, define_split, and define_peephole2, and in
6968         define_insn_and_split if always unused.
6969         * config/rs6000/darwin.md: Ditto.
6970         * config/rs6000/dfp.md: Ditto.
6971         * config/rs6000/rs6000.md: Ditto.
6972         * config/rs6000/sync.md: Ditto.
6973         * config/rs6000/vector.md: Ditto.
6974         * config/rs6000/vsx.md: Ditto.
6976 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6978         * config/rs6000/altivec.md: Write output control strings as braced
6979         blocks instead of double-quoted strings.
6980         * config/rs6000/darwin.md: Ditto.
6981         * config/rs6000/rs6000.md: Ditto.
6982         * config/rs6000/vector.md: Ditto.
6983         * config/rs6000/vsx.md: Ditto.
6985 2018-02-21  Jason Merrill  <jason@redhat.com>
6987         PR c++/84314 - ICE with templates and fastcall attribute.
6988         * attribs.c (build_type_attribute_qual_variant): Remove assert.
6990 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6992         * ipa-cp.c (determine_versionability): Fix comment typos.
6994 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6996         PR c/84229
6997         * ipa-cp.c (determine_versionability): Do not version functions caling
6998         va_arg_pack.
7000 2018-02-21  Martin Liska  <mliska@suse.cz>
7002         PR driver/83193
7003         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7004         Add "native" as a possible value.
7005         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7006         the macro when native cpu detection is available.
7008 2018-02-21  Martin Liska  <mliska@suse.cz>
7010         PR driver/83193
7011         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7012         Add "native" as a possible value.
7013         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7014         when native cpu detection is available.
7016 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7017             Martin Sebor  <msebor@redhat.com>
7019         PR tree-optimization/84478
7020         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7021         false.
7022         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7023         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7024         support which is conservatively correct, for 2 only stay conservative
7025         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7026         argument to the 2 argument get_range_strlen, adjust 6 arg
7027         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7028         false.
7029         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7030         (gimple_fold_builtin_strlen): Pass true as last argument to
7031         get_range_strlen.
7033 2018-02-20  Martin Sebor  <msebor@redhat.com>
7035         PR middle-end/84095
7036         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7037         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7038         (builtin_memref::builtin_memref): Factor out parts into
7039         set_base_and_offset and call it.
7041 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7043         PR middle-end/84406
7044         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7045         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7046         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7047         search at the associated MODE_INT.
7049 2018-02-20  Jeff Law  <law@redhat.com>
7051         PR middle-end/82123
7052         PR tree-optimization/81592
7053         PR middle-end/79257
7054         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7055         for range data rather than using global data.
7056         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7057         range data rather than using global data.
7058         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7059         pass it to children as needed.
7060         (struct directive::fmtresult): Similarly.
7061         (struct directive::set_width): Similarly.
7062         (struct directive::set_precision): Similarly.
7063         (format_integer, format_directive, parse_directive): Similarly.
7064         (format_none): Accept unnamed vr_values parameter.
7065         (format_percent, format_floating, format_character): Similarly.
7066         (format_string, format_plain): Similarly.
7067         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7068         the EVRP range analyzer for range data rather than using global data.
7069         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7070         gimple-ssa-evrp-analyze.h
7071         (class sprintf_dom_walker): Add after_dom_children member function.
7072         Add evrp_range_analyzer member.
7073         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7074         range analyzer as needed.
7075         (sprintf_dom_walker::after_dom_children): New member function.
7076         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7077         if not optimizing.
7078         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7079         (evrp_range_analyzer::pop_to_marker): Likewise.
7081 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7083         PR tree-optimization/84419
7084         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7085         with the required type if its current type is compatible but
7086         different.
7088 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7090         PR middle-end/82004
7091         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7092         after vectorization.
7094 2018-02-20  Martin Liska  <mliska@suse.cz>
7096         PR driver/83193
7097         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7098         possible values if we don't have a hint.
7100 2018-02-20  Martin Liska  <mliska@suse.cz>
7102         PR c/84310
7103         PR target/79747
7104         * final.c (shorten_branches): Build align_tab array with one
7105         more element.
7106         * opts.c (finish_options): Add alignment option limit check.
7107         (MAX_CODE_ALIGN): Likewise.
7108         (MAX_CODE_ALIGN_VALUE): Likewise.
7109         * doc/invoke.texi: Document maximum allowed option value for
7110         all -falign-* options.
7112 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7114         PR target/84146
7115         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7116         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7117         * var-tracking.c (emit_note_insn_var_location): Remove all references
7118         to NOTE_INSN_CALL_ARG_LOCATION.
7119         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7120         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7121         Use copy_rtx_if_shared.
7122         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7123         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7124         (dwarf2out_var_location): Remove handling of
7125         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7126         on call_insn.
7127         * final.c (final_scan_insn): Remove all references to
7128         NOTE_INSN_CALL_ARG_LOCATION.
7129         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7130         before dumping final insns.
7131         * except.c (emit_note_eh_region_end): Remove all references to
7132         NOTE_INSN_CALL_ARG_LOCATION.
7133         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7134         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7135         * config/arc/arc.c (hwloop_optimize): Likewise.
7136         * config/arm/arm.c (create_fix_barrier): Likewise.
7137         * config/s390/s390.c (s390_chunkify_start): Likewise.
7138         * config/sh/sh.c (find_barrier): Likewise.
7139         * config/i386/i386.c (rest_of_insert_endbranch,
7140         ix86_seh_fixup_eh_fallthru): Likewise.
7141         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7142         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7143         * config/frv/frv.c (frv_function_prologue): Likewise.
7144         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7145         reg note.
7146         (note_outside_basic_block_p): Remove all references to
7147         NOTE_INSN_CALL_ARG_LOCATION.
7148         * gengtype.c (adjust_field_rtx_def): Likewise.
7149         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7150         Likewise.
7151         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7152         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7154         PR c++/84444
7155         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7156         is ADDR_EXPR.
7158         PR tree-optimization/84452
7159         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7160         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7161         is NULL.
7163 2018-02-19  Martin Liska  <mliska@suse.cz>
7165         PR sanitizer/82183
7166         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7168 2018-02-19  Martin Liska  <mliska@suse.cz>
7169             Richard Sandiford  <richard.sandiford@linaro.org>
7171         PR tree-optimization/82491
7172         * gimple-fold.c (get_base_constructor): Make earlier bail out
7173         to prevent ubsan.
7175 2018-02-19  Carl Love  <cel@us.ibm.com>
7177         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7178         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7179         BU_P8V_OVERLOAD_1.
7180         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7181         P8V_BUILTIN_VEC_NEG.
7183 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7185         * config/rl78/rl78.md (movdf): New define expand.
7187 2018-02-19  Martin Liska  <mliska@suse.cz>
7189         PR other/80589
7190         * doc/invoke.texi: Fix typo.
7191         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7193 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7195         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7196         handle rs6000_single_float and rs6000_double_float specially for
7197         e500 family CPUs.
7199 2018-02-16  Jeff Law  <law@redhat.com>
7201         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7202         (pop_regs): Use it.
7204 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7206         PR ipa/84425
7207         * ipa-inline.c (inline_small_functions): Fix a typo.
7209 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7211         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7213 2018-02-16  Carl Love  <cel@us.ibm.com>
7215         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7216         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7217         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7218         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7219         expansion to P8V_BUILTIN_VEC_FLOAT2.
7221 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7223         PR rtl-optimization/70023
7224         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7225         src_regno into account.
7227 2018-02-16  Carl Love  <cel@us.ibm.com>
7229         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7230         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7231         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7232         * config/rs6000/rs6000.c: Remove case statements for
7233         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7234         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7235         and P9V_BUILTIN_VEC_VINSERT4B.
7236         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7237         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7238         * config/rs6000/vsx.md:
7239         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7240         vec_insert4b.
7242 2018-02-16  Carl Love  <cel@us.ibm.com>
7244         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7245         vec_insert4b.
7246         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7247         definitions.
7248         * config/rs6000/rs6000-c.c: Add the definitions for
7249         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7250         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7251         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7252         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7253         definition for insert4b and define insn *insert3b_internal.
7254         * doc/extend.texi: Add documentation for vec_extract4b.
7256 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7258         * doc/extend.texi (Backwards Compatibility): Mention friend
7259         injection.  Note for-scope is deprecated.
7260         * doc/invoke.texi (-ffriend-injection): Deprecate.
7262 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7264         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7265         that moved to I2, also allow destinations that are a paradoxical
7266         subreg (instead of a normal reg).
7268 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7270         PR target/83831
7271         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7272         to QImode.
7274 2018-02-16  Richard Biener  <rguenther@suse.de>
7276         PR tree-optimization/84037
7277         PR tree-optimization/84016
7278         PR target/82862
7279         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7280         Adjust vec_construct for the fact we need additional higher latency
7281         128bit inserts for AVX256 and AVX512 vector builds.
7282         (ix86_add_stmt_cost): Scale vector construction cost for
7283         elementwise loads.
7285 2018-02-16  Richard Biener  <rguenther@suse.de>
7287         PR tree-optimization/84417
7288         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7289         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7290         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7292 2018-02-16  Martin Liska  <mliska@suse.cz>
7294         PR sanitizer/84307
7295         * internal-fn.def (ASAN_CHECK): Set proper flags.
7296         (ASAN_MARK): Likewise.
7298 2018-02-16  Julia Koval  <julia.koval@intel.com>
7300         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7301         from PTA_CANNONLAKE.
7303 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7305         PR target/84272
7306         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7307         Use ++iter rather than iter++ for std::list iterators.
7308         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7309         defer deleting them until all nodes in the forest are processed.  Do
7310         free even leaf nodes.  Change to_process into auto_vec.
7312         PR bootstrap/84405
7313         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7314         * vec.h (vec_default_construct): Use memset instead of placement new
7315         if BROKEN_VALUE_INITIALIZATION is defined.
7316         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7317         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7318         is defined.
7320         PR rtl-optimization/83723
7321         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7322         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7323         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7324         recursive calls.
7325         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7326         callers.
7327         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7329 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7331         PR rtl-optimization/81443
7332         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7333         from inner REGs to paradoxical SUBREGs.
7335 2018-02-16  Richard Biener  <rguenther@suse.de>
7337         PR tree-optimization/84399
7338         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7339         For operands we can analyze at their definition make sure we can
7340         analyze them at each use as well.
7342 2018-02-16  Richard Biener  <rguenther@suse.de>
7344         PR tree-optimization/84190
7345         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7346         volatile accesses if the decl isn't volatile.
7348 2018-02-15  Jason Merrill  <jason@redhat.com>
7350         PR c++/84314 - ICE with templates and fastcall attribute.
7351         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7352         TYPE_CANONICAL on an existing type.
7354 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7356         PR tree-optimization/84383
7357         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7358         dstoff nor call operand_equal_p if dstbase is NULL.
7360         PR tree-optimization/84334
7361         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7362         also a CONSTANT_CLASS_P, punt.
7364 2018-02-14  Jim Wilson  <jimw@sifive.com>
7366         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7367         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7368         to where locals are set.  Add TARGET_RVC support.
7369         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7371 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7373         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7375 2018-02-14  Martin Sebor  <msebor@redhat.com>
7377         PR tree-optimization/83698
7378         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7379         arrays constrain the offset range to their bounds.
7380         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7381         (builtin_access::overlap): Avoid setting the size of overlap if it's
7382         already been set.
7383         (maybe_diag_overlap): Also consider arrays when deciding what values
7384         of offsets to include in diagnostics.
7386 2018-02-14  Martin Sebor  <msebor@redhat.com>
7388         PR c/84108
7389         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7390         that correspond to the kind of a declaration.
7392 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7394         PR target/83984
7395         * config/pa/pa.md: Load address of PIC label using the linkage table
7396         if the label is nonlocal.
7398 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7400         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7401         warning message if user requests -maltivec=be.
7402         * doc/invoke.texi: Document deprecation of -maltivec=be.
7404 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7406         PR target/84220
7407         * config/rs6000/rs6000-c.c: Update definitions for
7408         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7409         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7411 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7413         PR target/84239
7414         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7415         add _get_ssp intrinsics. Remove argument from
7416         __builtin_ia32_rdssp[d|q].
7417         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7418         * config/i386/i386-builtin.def: Remove argument from
7419         __builtin_ia32_rdssp[d|q].
7420         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7421         ix86_expand_special_args_builtin for _rdssp[d|q].
7422         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7423         Clear register before usage.
7424         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7425         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7427 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7429         PR tree-optimization/84357
7430         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7431         operand 1 of an ARRAY_REF too.
7433 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7435         PR target/83831
7436         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7437         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7438         declarations.
7439         (set_of_reg): New struct.
7440         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7441         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7442         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7443         functions.
7444         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7445         Split into bitclr, bitset, bitinvert patterns if appropriate.
7446         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7447         use rx_fuse_in_memory_bitop.
7448         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7449         to named insn, correct maximum insn length.
7451 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7453         PR target/79242
7454         * machmode.def: Define a complex mode for PARTIAL_INT.
7455         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7456         MODE_PARTIAL_INT.
7457         * doc/rtl.texi: Document CSPImode.
7458         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7459         handling.
7460         (msp430_hard_regno_nregs_with_padding): Likewise.
7462 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7464         PR target/84279
7465         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7467 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7469         PR rtl-optimization/84169
7470         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7471         we generated a parallel as new i3 and we split that to new i2 and i3
7472         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7473         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7474         those to i2, not i1.  Partially rewrite this scan code.
7476 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7478         PR c/82210
7479         * stor-layout.c (place_field): For variable length fields, adjust
7480         offset_align afterwards not just based on the field's alignment,
7481         but also on the size.
7483         PR middle-end/84309
7484         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7485         of exps and logs in the use_exp2 case.
7487 2018-02-13  Jeff Law  <law@redhat.com>
7489         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7490         entry for "vector".
7492         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7493         ARGS as unused.
7495 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7497         PR debug/84342
7498         PR debug/84319
7499         * common.opt (gas-loc-support, gas-locview-support): New.
7500         (ginline-points, ginternal-reset-location-views): New.
7501         * doc/invoke.texi: Document them.  Use @itemx where intended.
7502         (gvariable-location-views): Adjust.
7503         * target.def (reset_location_view): New.
7504         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7505         (TARGET_RESET_LOCATION_VIEW): New.
7506         * doc/tm.texi: Rebuilt.
7507         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7508         (dwarf2out_default_as_locview_support): New.
7509         (output_asm_line_debug_info): Use option variables.
7510         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7511         (output_loc_list): Likewise.
7512         (add_high_low_attributes): Check option variables.
7513         Don't output entry view attribute in strict mode.
7514         (gen_inlined_subroutine_die): Check option variables.
7515         (dwarf2out_inline_entry): Likewise.
7516         (init_sections_and_labels): Likewise.
7517         (dwarf2out_early_finish): Likewise.
7518         (maybe_reset_location_view): New, from...
7519         (dwarf2out_var_location): ... here.  Call it.
7520         * debug.h (dwarf2out_default_as_loc_support): Declare.
7521         (dwarf2out_default_as_locview_support): Declare.
7522         * hooks.c (hook_int_rtx_insn_0): New.
7523         * hooks.h (hook_int_rtx_insn_0): Declare.
7524         * toplev.c (process_options): Take -gas-loc-support and
7525         -gas-locview-support from dwarf2out.  Enable
7526         -gvariable-location-views by default only with locview
7527         assembler support.  Enable -ginternal-reset-location-views by
7528         default only if the target defines the corresponding hook.
7529         Enable -ginline-points by default if location views are
7530         enabled; force it disabled if statement frontiers are
7531         disabled.
7532         * tree-inline.c (expand_call_inline): Check option variables.
7533         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7535 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7537         PR tree-optimization/84321
7538         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7539         handling.  Also check whether the anti-range contains any values
7540         that satisfy the mask; switch to a VR_RANGE if not.
7542 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7544         PR sanitizer/84340
7545         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7547 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7549         PR c++/83990
7550         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7551         of call statements, also set location of a load to a temporary.
7553 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7555         * config/rl78/rl78.c (add_vector_labels): New function.
7556         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7557         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7558         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7559         which checks that no arguments are passed.
7560         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7561         * doc/extend.texi: Documentation for the new attribute.
7563 2018-02-13  Andreas Schwab  <schwab@suse.de>
7565         * config/riscv/linux.h (CPP_SPEC): Define.
7567 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7569         PR target/84335
7570         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7571         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7572         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7573         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7574         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7575         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7576         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7577         temporarily for AES and PCLMUL builtins.
7579         PR tree-optimization/84339
7580         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7581         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7582         Formatting fixes.
7584         PR middle-end/84309
7585         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7586         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7587         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7588         inline function.
7589         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7590         inline function.
7591         * omp-simd-clone.h: New file.
7592         * omp-simd-clone.c: Include omp-simd-clone.h.
7593         (expand_simd_clones): No longer static.
7594         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7595         cgraph.h and omp-simd-clone.h.
7596         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7597         (vect_recog_widen_shift_pattern): Formatting fix.
7598         (vect_pattern_recog_1): Don't check optab for calls.
7600         PR target/84336
7601         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7602         operands[2] into a REG before using gen_lowpart on it.
7604 2018-02-12  Jeff Law  <law@redhat.com>
7606         PR target/83760
7607         * config/sh/sh.c (find_barrier): Consider a sibling call
7608         a barrier as well.
7610         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7611         successfully back substituting a reg.
7613 2018-02-12  Richard Biener  <rguenther@suse.de>
7615         PR tree-optimization/84037
7616         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7617         parameter, move visited init to caller.
7618         (vect_slp_analyze_operations): Separate cost from validity
7619         check, initialize visited once for all instances.
7620         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7621         for all instances.
7622         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7623         out an assert.
7624         (vect_model_promotion_demotion_cost): Likewise.
7625         (vectorizable_bswap): Guard cost modeling with !slp_node
7626         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7627         SLP stmts.
7628         (vectorizable_call): Likewise.
7629         (vectorizable_conversion): Likewise.
7630         (vectorizable_assignment): Likewise.
7631         (vectorizable_shift): Likewise.
7632         (vectorizable_operation): Likewise.
7633         (vectorizable_store): Likewise.
7634         (vectorizable_load): Likewise.
7635         (vectorizable_condition): Likewise.
7636         (vectorizable_comparison): Likewise.
7638 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7640         PR sanitizer/84307
7641         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7642         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7643         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7645 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7647         PR middle-end/83665
7648         * params.def (inline-min-speedup): Increase from 8 to 15.
7649         (max-inline-insns-auto): Decrease from 40 to 30.
7650         * ipa-split.c (consider_split): Add some buffer for function to
7651         be considered inlining candidate.
7652         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7653         default values.
7655 2018-02-12  Richard Biener  <rguenther@suse.de>
7657         PR tree-optimization/84037
7658         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7659         matched stmts if we cannot swap the non-matched ones.
7661 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7663         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7664         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7665         _mm_maskz_scalef_round_ss): New intrinsics.
7666         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7667         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7668         __builtin_ia32_scalefss_round): Remove.
7669         (__builtin_ia32_scalefsd_mask_round,
7670         __builtin_ia32_scalefss_mask_round): New intrinsics.
7671         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7672         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7673         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7674         "<round_constraint>")): Changed to ...
7675         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7676         "<round_scalar_constraint>")): ... this.
7677         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7678         %0, %1, %2<round_op3>}"): Changed to ...
7679         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7680         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7681         %2<round_scalar_mask_op3>}"): ... this.
7682         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7684 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7686         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7687         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7688         (_mm_maskz_sqrt_round_ss): New intrinsics.
7689         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7690         (__builtin_ia32_sqrtsd_mask_round)
7691         (__builtin_ia32_sqrtss_mask_round): New builtins.
7692         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7693         (__builtin_ia32_sqrtss_round): Remove.
7694         (__builtin_ia32_sqrtsd_mask_round)
7695         (__builtin_ia32_sqrtss_mask_round): New builtins.
7696         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7697         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7698         ((match_operand:VF_128 1 "vector_operand"
7699         "xBm,<round_constraint>")): Changed to ...
7700         ((match_operand:VF_128 1 "vector_operand"
7701         "xBm,<round_scalar_constraint>")): ... this.
7702         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7703         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7704         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7705         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7706         %<iptr>1<round_scalar_mask_op3>}): ... this.
7707         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7708         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7710 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7712         PR target/84266
7713         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7714         Cast vec_cmpeq result to correct type.
7715         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7716         Cast vec_cmpgt result to correct type.
7718 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7720         * final.c (final_scan_insn_1): Renamed from...
7721         (final_scan_insn): ... this.  New wrapper, to recover
7722         seen from the outermost call in recursive ones.
7723         * config/sparc/sparc.c (output_return): Drop seen from call.
7724         (output_sibcall): Likewise.
7725         * config/visium/visium.c (output_branch): Likewise.
7727 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7729         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7730         function label.
7732 2018-02-10  Alan Modra  <amodra@gmail.com>
7734         PR target/84300
7735         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7736         Specify LR as an input.
7738 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7740         PR sanitizer/83987
7741         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7742         remove_member_access_dummy_vars): New functions.
7743         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7744         lower_omp_1, execute_lower_omp): Use them.
7746         PR rtl-optimization/84308
7747         * shrink-wrap.c (spread_components): Release todo vector.
7749 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7751         PR rtl-optimization/57193
7752         * ira-color.c (struct allocno_color_data): Add member
7753         conflict_allocno_hard_prefs.
7754         (update_conflict_allocno_hard_prefs): New.
7755         (bucket_allocno_compare_func): Add a preference based on
7756         conflict_allocno_hard_prefs.
7757         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7758         (color_allocnos): Remove a dead code.  Initiate
7759         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
7761 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7763         PR target/84226
7764         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
7765         constraint from =wa to wa.  Avoid a subreg on the output operand,
7766         instead use a pseudo and subreg it in a move.
7767         (p9_xxbrd_<mode>): Changed to ...
7768         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
7769         (p9_xxbrd_v2df): New expander.
7770         (p9_xxbrw_<mode>): Changed to ...
7771         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
7772         (p9_xxbrw_v4sf): New expander.
7774 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7776         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
7778 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
7780         PR target/83926
7781         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
7782         multiply in 32-bit mode.
7783         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
7784         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
7785         mode.
7787 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7789         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
7790         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
7791         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
7792         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
7794 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
7796         PR lto/84213
7797         * dwarf2out.c (is_trivial_indirect_ref): New function.
7798         (dwarf2out_late_global_decl): Do not generate a location
7799         attribute for variables that have a non-trivial DECL_VALUE_EXPR
7800         and that are not defined in the current unit.
7802 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7804         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
7805         instead of a libcall for UNORDERED.
7807 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
7809         PR target/82641
7810         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7811         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7813 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7815         PR target/PR84295
7816         * config/s390/s390.c (s390_set_current_function): Invoke
7817         s390_indirect_branch_settings also if fndecl didn't change.
7819 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7821         * config/rs6000/rs6000.md (blockage): Set length to zero.
7823 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7825         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7827 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7829         PR sanitizer/84285
7830         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7831         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7832         -static-lib*san.
7834         PR debug/84252
7835         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7836         PARALLEL incoming that failed vt_get_decl_and_offset check.
7838         PR middle-end/84237
7839         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7840         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7841         TREE_READONLY bit.
7842         (get_variable_section): For decls in named .bss* sections pass true as
7843         second argument to bss_initializer_p.
7845 2018-02-09  Marek Polacek  <polacek@redhat.com>
7846             Jakub Jelinek  <jakub@redhat.com>
7848         PR c++/83659
7849         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7850         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
7851         Sync some changes from cxx_fold_indirect_ref.
7853 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7855         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7856         markers.
7857         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7858         (BLOCK_INLINE_ENTRY_LABEL): New.
7859         (dwarf2out_var_location): Disregard inline entry markers.
7860         (inline_entry_data): New struct.
7861         (inline_entry_data_hasher): New hashtable type.
7862         (inline_entry_data_hasher::hash): New.
7863         (inline_entry_data_hasher::equal): New.
7864         (inline_entry_data_table): New variable.
7865         (add_high_low_attributes): Add DW_AT_entry_pc and
7866         DW_AT_GNU_entry_view attributes if a pending entry is found
7867         in inline_entry_data_table.  Add old entry_pc attribute only
7868         if debug nonbinding markers are disabled.
7869         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7870         markers are enabled.
7871         (block_within_block_p, dwarf2out_inline_entry): New.
7872         (dwarf2out_finish): Check that no entries remained in
7873         inline_entry_data_table.
7874         * final.c (reemit_insn_block_notes): Handle inline entry notes.
7875         (final_scan_insn, notice_source_line): Likewise.
7876         (rest_of_clean_state): Skip inline entry markers.
7877         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7878         markers.
7879         * gimple.c (gimple_build_debug_inline_entry): New.
7880         * gimple.h (enum gimple_debug_subcode): Add
7881         GIMPLE_DEBUG_INLINE_ENTRY.
7882         (gimple_build_debug_inline_entry): Declare.
7883         (gimple_debug_inline_entry_p): New.
7884         (gimple_debug_nonbind_marker_p): Adjust.
7885         * insn-notes.def (INLINE_ENTRY): New.
7886         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7887         inline entry marker notes.
7888         (print_insn): Likewise.
7889         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7890         (INSN_DEBUG_MARKER_KIND): Likewise.
7891         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7892         * tree-inline.c (expand_call_inline): Build and insert
7893         debug_inline_entry stmt.
7894         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7895         inline entry blocks early, if nonbind markers are enabled.
7896         (dump_scope_block): Dump fragment info.
7897         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7898         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7899         (gimple_build_debug_inline_entry): New.
7900         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7901         Enable/disable inline entry points too.
7902         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7903         (DEBUG_INSN): Describe inline entry markers.
7905         * common.opt (gvariable-location-views): New.
7906         (gvariable-location-views=incompat5): New.
7907         * config.in: Rebuilt.
7908         * configure: Rebuilt.
7909         * configure.ac: Test assembler for view support.
7910         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7911         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7912         * dwarf2out.c (var_loc_view): New typedef.
7913         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7914         (dwarf2out_locviews_in_attribute): New.
7915         (dwarf2out_locviews_in_loclist): New.
7916         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7917         (enum dw_line_info_opcode): Add LI_adv_address.
7918         (struct dw_line_info_table): Add view.
7919         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7920         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7921         (zero_view_p): New variable.
7922         (ZERO_VIEW_P): New macro.
7923         (output_asm_line_debug_info): New.
7924         (struct var_loc_node): Add view.
7925         (add_AT_view_list, AT_loc_list): New.
7926         (add_var_loc_to_decl): Add view param.  Test it against last.
7927         (new_loc_list): Add view params.  Record them.
7928         (AT_loc_list_ptr): Handle loc and view lists.
7929         (view_list_to_loc_list_val_node): New.
7930         (print_dw_val): Handle dw_val_class_view_list.
7931         (size_of_die): Likewise.
7932         (value_format): Likewise.
7933         (loc_list_has_views): New.
7934         (gen_llsym): Set vl_symbol too.
7935         (maybe_gen_llsym, skip_loc_list_entry): New.
7936         (dwarf2out_maybe_output_loclist_view_pair): New.
7937         (output_loc_list): Output view list or entries too.
7938         (output_view_list_offset): New.
7939         (output_die): Handle dw_val_class_view_list.
7940         (output_dwarf_version): New.
7941         (output_compilation_unit_header): Use it.
7942         (output_skeleton_debug_sections): Likewise.
7943         (output_rnglists, output_line_info): Likewise.
7944         (output_pubnames, output_aranges): Update version comments.
7945         (output_one_line_info_table): Output view numbers in asm comments.
7946         (dw_loc_list): Determine current endview, pass it to new_loc_list.
7947         Call maybe_gen_llsym.
7948         (loc_list_from_tree_1): Adjust.
7949         (add_AT_location_description): Create view list attribute if
7950         needed, check it's absent otherwise.
7951         (convert_cfa_to_fb_loc_list): Adjust.
7952         (maybe_emit_file): Call output_asm_line_debug_info for test.
7953         (dwarf2out_var_location): Reset views as needed.  Precompute
7954         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
7955         attribute.  Set view.
7956         (new_line_info_table): Reset next view.
7957         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7958         (dwarf2out_source_line): Likewise.  Output view resets and labels to
7959         the assembler, or select appropriate line info opcodes.
7960         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7961         (optimize_string_length): Catch it.  Adjust.
7962         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
7963         dw_val_class_view_list, and remove it if no longer needed.
7964         (hash_loc_list): Hash view numbers.
7965         (loc_list_hasher::equal): Compare them.
7966         (optimize_location_lists): Check whether a view list symbol is
7967         needed, and whether the locview attribute is present, and
7968         whether they match.  Remove the locview attribute if no longer
7969         needed.
7970         (index_location_lists): Call skip_loc_list_entry for test.
7971         (dwarf2out_finish): Call output_asm_line_debug_info for test.
7972         Use output_dwarf_version.
7973         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7974         (struct dw_val_node): Add val_view_list.
7975         * final.c (SEEN_NEXT_VIEW): New.
7976         (set_next_view_needed): New.
7977         (clear_next_view_needed): New.
7978         (maybe_output_next_view): New.
7979         (final_start_function): Rename to...
7980         (final_start_function_1): ... this.  Take pointer to FIRST,
7981         add SEEN parameter.  Emit param bindings in the initial view.
7982         (final_start_function): Reintroduce SEEN-less interface.
7983         (final): Rename to...
7984         (final_1): ... this.  Take SEEN parameter.  Output final pending
7985         next view at the end.
7986         (final): Reintroduce seen-less interface.
7987         (final_scan_insn): Output pending next view before switching
7988         sections or ending a block.  Mark the next view as needed when
7989         outputting variable locations.  Notify debug backend of section
7990         changes, and of location view changes.
7991         (rest_of_handle_final): Adjust.
7992         * toplev.c (process_options): Autodetect value for debug variable
7993         location views option.  Warn on incompat5 without -gdwarf-5.
7994         * doc/invoke.texi (gvariable-location-views): New.
7995         (gvariable-location-views=incompat5): New.
7996         (gno-variable-location-views): New.
7998 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
8000         PR tree-optimization/84136
8001         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8002         that the result of find_edge is non-NULL.
8004 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8006         PR target/83008
8007         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8008         storing integer register in SImode.  Fix cost of 256 and 512
8009         byte aligned SSE register store.
8011 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8013         * config/i386/i386.c (ix86_multiplication_cost): Fix
8014         multiplication cost for TARGET_AVX512DQ.
8016 2018-02-08  Marek Polacek  <polacek@redhat.com>
8018         PR tree-optimization/84238
8019         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8020         get_range_strlen.
8022 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8024         PR tree-optimization/84265
8025         * tree-vect-stmts.c (vectorizable_store): Don't treat
8026         VMAT_CONTIGUOUS accesses as grouped.
8027         (vectorizable_load): Likewise.
8029 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8031         PR tree-optimization/81635
8032         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8033         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8034         (test_round_for_mask): New functions.
8035         (wide_int_cc_tests): Call test_round_for_mask.
8036         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8037         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8038         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8039         range returned by get_range_info.
8041 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8043         PR ipa/81360
8044         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8045         * symtab.c: Include builtins.h
8046         (symtab_node::output_to_lto_symbol_table_p): Move here
8047         from lto-streamer-out.c:output_symbol_p.
8048         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8049         (output_symbol_p): Move all logic to symtab.c
8050         (produce_symtab): Update.
8052 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8054         * config/s390/s390-opts.h (enum indirect_branch): Define.
8055         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8056         (s390_indirect_branch_via_thunk)
8057         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8058         (enum s390_indirect_branch_type): Define.
8059         * config/s390/s390.c (struct s390_frame_layout, struct
8060         machine_function): Remove.
8061         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8062         (indirect_branch_table_label_no, indirect_branch_table_name):
8063         Define variables.
8064         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8065         (enum s390_indirect_branch_option): Define.
8066         (s390_return_addr_from_memory): New function.
8067         (s390_handle_string_attribute): New function.
8068         (s390_attribute_table): Add new attribute handler.
8069         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8070         (s390_indirect_branch_via_thunk): New function.
8071         (s390_indirect_branch_via_inline_thunk): New function.
8072         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8073         sibling call optimization for non z10 compiles.
8074         (s390_emit_call): Force indirect branch target to be a single
8075         register.  Add r1 clobber for non-z10 compiles.
8076         (s390_emit_epilogue): Emit return jump via return_use expander.
8077         (s390_reorg): Handle JUMP_INSNs as execute targets.
8078         (s390_option_override_internal): Perform validity checks for the
8079         new command line options.
8080         (s390_indirect_branch_attrvalue): New function.
8081         (s390_indirect_branch_settings): New function.
8082         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8083         (s390_output_indirect_thunk_function):  New function.
8084         (s390_code_end): Implement target hook.
8085         (s390_case_values_threshold): Implement target hook.
8086         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8087         macros.
8088         * config/s390/s390.h (struct s390_frame_layout)
8089         (struct machine_function): Move here from s390.c.
8090         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8091         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8092         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8093         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8094         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8095         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8096         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8097         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8098         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8099         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8100         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8101         (mnemonic attribute): Add values which aren't recognized
8102         automatically.
8103         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8104         pattern for branch conversion.  Fix mnemonic attribute.
8105         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8106         indirect branch via thunk if requested.
8107         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8108         ("*indirect_jump"): Disable for branch conversion using out of
8109         line thunks.
8110         ("indirect_jump_via_thunk<mode>_z10")
8111         ("indirect_jump_via_thunk<mode>")
8112         ("indirect_jump_via_inlinethunk<mode>_z10")
8113         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8114         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8115         ("casesi_jump_via_inlinethunk<mode>_z10")
8116         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8117         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8118         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8119         ("*indirect2_jump"): Disable for branch conversion.
8120         ("casesi_jump"): Turn into expander and expand patterns for branch
8121         conversion.
8122         ("return_use"): New expander.
8123         ("*return"): Emit return via thunk and rename it to ...
8124         ("*return<mode>"): ... this one.
8125         * config/s390/s390.opt: Add new options and and enum for the
8126         option values.
8128 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8130         * lra-constraints.c (match_reload): Unconditionally use
8131         gen_lowpart_SUBREG, rather than selecting between that
8132         and equivalent gen_rtx_SUBREG code.
8134 2018-02-08  Richard Biener  <rguenther@suse.de>
8136         PR tree-optimization/84233
8137         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8138         changed flag instead of boguously re-using phi_inserted.
8140 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8142         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8143         static local variables.
8145 2018-02-08  Richard Biener  <rguenther@suse.de>
8147         PR tree-optimization/84278
8148         * tree-vect-stmts.c (vectorizable_store): When looking for
8149         smaller vector types to perform grouped strided loads/stores
8150         make sure the mode is supported by the target.
8151         (vectorizable_load): Likewise.
8153 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8155         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8156         Increase LDP/STP opportunities by adding adjacent callee-saves.
8158 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8160         PR rtl-optimization/84068
8161         PR rtl-optimization/83459
8162         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8164 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8166         PR tree-optimization/84224
8167         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8168         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8169         non-zero arguments.
8171 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8173         PR target/84113
8174         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8175         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8176         count, remove one USE.
8178 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8180         * doc/install.texi (Configuration): Document the
8181         --with-long-double-format={ibm,ieee} PowerPC configuration
8182         options.
8184         PR target/84154
8185         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8186         Convert from define_expand to be define_insn_and_split.  Rework
8187         float/double/_Float128 conversions to QI/HI/SImode to work with
8188         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8189         conversions to QI/HImode types did a store and then a load to
8190         truncate the value.  For conversions to VSX registers, don't split
8191         the insn, instead emit the code directly.  Use the code iterator
8192         any_fix to combine signed and unsigned conversions.
8193         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8194         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8195         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8196         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8197         (fix_<mode>di2_hw): Likewise.
8198         (fixuns_<mode>di2_hw): Likewise.
8199         (fix_<mode>si2_hw): Likewise.
8200         (fixuns_<mode>si2_hw): Likewise.
8201         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8202         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8203         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8204         fix<uns>_trunc<SFDF:mode>si2_p8.
8205         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8206         used.
8207         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8208         (fix<uns>_<mode>_mem): Likewise.
8209         (fctiw<u>z_<mode>_mem): Likewise.
8210         (fix<uns>_<mode>_mem): Likewise.
8211         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8212         the register allocator from doing a direct move to the GPRs to do
8213         a store, and instead use the ISA 3.0 store byte/half-word from
8214         vector register instruction.  For IEEE 128-bit floating point,
8215         also optimize stores of 32-bit ints.
8216         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8218 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8220         * genextract.c (push_pathstr_operand): New function to support
8221         [a-zA-Z].
8222         (walk_rtx): Call push_pathstr_operand.
8223         (print_path): Support [a-zA-Z].
8225 2018-02-07  Richard Biener  <rguenther@suse.de>
8227         PR tree-optimization/84037
8228         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8229         (cse_and_gimplify_to_preheader): Declare.
8230         (vect_get_place_in_interleaving_chain): Likewise.
8231         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8232         ivexpr_map.
8233         (_loop_vec_info::~_loop_vec_info): Delete it.
8234         (cse_and_gimplify_to_preheader): New function.
8235         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8236         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8237         (vectorizable_load): Likewise.  For grouped stores always base
8238         the IV on the first element.
8239         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8240         condition before gimplifying.
8242 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8244         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8245         *DIV_EXPR and *MOD_EXPR.
8247 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8249         PR target/84248
8250         * config/i386/i386.c (ix86_option_override_internal): Mask out
8251         the CF_SET bit when checking -fcf-protection.
8253 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8255         PR libgomp/84217
8256         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8257         enough.
8259 2018-02-07  Richard Biener  <rguenther@suse.de>
8261         PR tree-optimization/84204
8262         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8263         this place.
8265         PR tree-optimization/84205
8266         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8267         special-case isl_ast_op_zdiv_r.
8269         PR tree-optimization/84223
8270         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8271         Only add conditions from within the region.
8272         (gather_bbs::after_dom_children): Adjust.
8274 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8276         PR target/84209
8277         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8278         * config/avr/avr.md: Only post-reload split REG-REG moves if
8279         either register is GENERAL_REG_P.
8281 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8283         PR tree-optimization/84235
8284         * tree-ssa-scopedtables.c
8285         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8286         if the subtraction is performed in floating point type where NaNs are
8287         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8288         build 1.  Formatting fix.
8290 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8292         PR target/84146
8293         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8294         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8295         and skip it regardless of bb boundaries.  Use CALL_P macro,
8296         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8297         unnecessarily, formatting fix.
8299 2018-02-06  Michael Collison  <michael.collison@arm.com>
8301         * config/arm/thumb2.md:
8302         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8303         (*thumb_mov_notscc): Ditto.
8305 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8307         PR target/84154
8308         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8309         unsigned_fix, not "s".
8311 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8313         * configure.ac (gcc_fn_eh_frame_ro): New function.
8314         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8315         correct .eh_frame permissions.
8316         * configure: Regenerate.
8318 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8320         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8321         irrelevant options.
8323 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8325         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8326         Display warning message for -mno-speculate-indirect-jumps.
8328 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8330         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8331         Undocumented.
8332         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8334 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8336         PR tree-optimization/84225
8337         * tree-eh.c (find_trapping_overflow): Only call
8338         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8340 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8342         PR target/84145
8343         * config/i386/i386.c: Reimplement the check of possible options
8344         -mibt/-mshstk conbination. Change error messages.
8345         * doc/invoke.texi: Fix a typo: remove extra '='.
8347 2018-02-06  Marek Polacek  <polacek@redhat.com>
8349         PR tree-optimization/84228
8350         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8352 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8354         PR target/82641
8355         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8356         emitted arch directives.
8357         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8358         __ARM_FEATURE_COPROC before changing architectures.
8360 2018-02-06  Richard Biener  <rguenther@suse.de>
8362         * config/i386/i386.c (print_reg): Fix typo.
8363         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8365 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8367         * configure: Regenerate.
8369 2018-02-05  Martin Sebor  <msebor@redhat.com>
8371         PR tree-optimization/83369
8372         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8373         inlining context.
8375 2018-02-05  Martin Liska  <mliska@suse.cz>
8377         * doc/invoke.texi: Cherry-pick upstream r323995.
8379 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8381         * ira.c (ira_init_register_move_cost): Adjust comment.
8383 2018-02-05  Martin Liska  <mliska@suse.cz>
8385         PR gcov-profile/84137
8386         * doc/gcov.texi: Fix typo in documentation.
8388 2018-02-05  Martin Liska  <mliska@suse.cz>
8390         PR gcov-profile/83879
8391         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8392         using dlopen functionality.
8394 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8396         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8397         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8398         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8399         _mm_maskz_range_round_ss): New intrinsics.
8400         (__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/i386-builtin.def (__builtin_ia32_rangesd128_round,
8405         __builtin_ia32_rangess128_round): Remove.
8406         (__builtin_ia32_rangesd128_mask_round,
8407         __builtin_ia32_rangess128_mask_round): New builtins.
8408         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8409         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8410         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8411         "<round_saeonly_constraint>")): Changed to ...
8412         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8413         "<round_saeonly_scalar_constraint>")): ... this.
8414         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8415         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8416         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8417         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8418         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8420 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8422         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8423         options.
8424         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8425         Remove all values except native, 8540 and 8548.
8427 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8429         * config/i386/i386.c (ix86_output_function_return): Pass
8430         INVALID_REGNUM, instead of -1, as invalid register number to
8431         indirect_thunk_name and output_indirect_thunk.
8433 2018-02-02  Julia Koval  <julia.koval@intel.com>
8435         * config.gcc: Add -march=icelake.
8436         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8437         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8438         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8439         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8440         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8441         (processor_target_table): Add icelake.
8442         (ix86_option_override_internal): Handle new PTAs.
8443         (get_builtin_code_for_version): Handle icelake.
8444         (M_INTEL_COREI7_ICELAKE): New.
8445         (fold_builtin_cpu): Handle icelake.
8446         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8447         * doc/invoke.texi: Add -march=icelake.
8449 2018-02-02  Julia Koval  <julia.koval@intel.com>
8451         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8452         to wide_int_bitmask.
8453         * wide-int-bitmask.h: New.
8455 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8457         PR target/84066
8458         * config/i386/i386.md: Replace Pmode with word_mode in
8459         builtin_setjmp_setup and builtin_longjmp to support x32.
8461 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8463         PR target/56010
8464         PR target/83743
8465         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8466         #include "opts.h".
8467         (rs6000_supported_cpu_names): New static variable.
8468         (linux_cpu_translation_table): Likewise.
8469         (elf_platform) <cpu>: Define new static variable and use it.
8470         Translate kernel AT_PLATFORM name to canonical name if needed.
8471         Error if platform name is unknown.
8473 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8475         PR target/84089
8476         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8478 2018-02-01  Jeff Law  <law@redhat.com>
8480         PR target/84128
8481         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8482         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8483         the scratch if RELEASE_VIA_POP is false.
8484         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8485         If we have to save a temporary register, decrement SIZE appropriately.
8486         Pass new arguments to release_scratch_register_on_entry.
8487         (ix86_adjust_stack_and_probe): Likewise.
8488         (ix86_emit_probe_stack_range): Pass new arguments to
8489         release_scratch_register_on_entry.
8491 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8493         PR rtl-optimization/84157
8494         * combine.c (change_zero_ext): Use REG_P predicate in
8495         front of HARD_REGISTER_P predicate.
8497 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8499         * config/avr/avr.c (avr_option_override): Move disabling of
8500         -fdelete-null-pointer-checks to...
8501         * common/config/avr/avr-common.c (avr_option_optimization_table):
8502         ...here.
8504 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8506         PR tree-optimization/81635
8507         * tree-data-ref.c (split_constant_offset_1): For types that
8508         wrap on overflow, try to use range info to prove that wrapping
8509         cannot occur.
8511 2018-02-01  Renlin Li  <renlin.li@arm.com>
8513         PR target/83370
8514         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8515         TAILCALL_ADDR_REGS.
8516         (aarch64_register_move_cost): Likewise.
8517         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8518         TAILCALL_ADDR_REGS.
8519         (REG_CLASS_NAMES): Likewise.
8520         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8521         TAILCALL_ADDR_REGS. Remove IP registers.
8522         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8524 2018-02-01  Richard Biener  <rguenther@suse.de>
8526         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8527         for specifying RPO order and allow NULL for that.
8528         * domwalk.c (dom_walker::dom_walker): Likewise.
8529         (dom_walker::walk): Handle NULL RPO order.
8530         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8531         in RPO order.
8532         (rewrite_update_dom_walker): Likewise.
8533         (mark_def_dom_walker): Likewise.
8535 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8537         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8538         (aarch64_maybe_expand_sve_subreg_move): Declare.
8539         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8540         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8541         predicate.
8542         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8543         that are semantically a reverse operation.
8544         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8545         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8546         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8547         functions.
8548         (aarch64_can_change_mode_class): For big-endian, forbid changes
8549         between two SVE modes if they have different element sizes.
8551 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8553         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8554         the TImode handling for big-endian targets.
8556 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8558         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8559         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8560         not just bytes.
8561         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8562         Remove BSWAP handing for big-endian targets and use the form of
8563         LD1RQ appropariate for the mode.
8565 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8567         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8568         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8569         duplicated element.
8571 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8573         PR tearget/83845
8574         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8575         check for operands that need to go through aarch64_sve_reload_be.
8577 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8579         PR tree-optimization/81661
8580         PR tree-optimization/84117
8581         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8582         * tree-eh.c: Include gimplify.h.
8583         (find_trapping_overflow, replace_trapping_overflow,
8584         rewrite_to_non_trapping_overflow): New functions.
8585         * tree-vect-loop.c: Include tree-eh.h.
8586         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8587         * tree-data-ref.c: Include tree-eh.h.
8588         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8590 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8592         PR rtl-optimization/84123
8593         * combine.c (change_zero_ext): Check if hard register satisfies
8594         can_change_dest_mode before calling gen_lowpart_SUBREG.
8596 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8598         PR target/82444
8599         * ira.c (ira_init_register_move_cost): Remove assert.
8601 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8603         PR rtl-optimization/84071
8604         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8605         * doc/tm.texi: Regenerate.
8607 2018-01-31  Richard Biener  <rguenther@suse.de>
8609         PR tree-optimization/84132
8610         * tree-data-ref.c (analyze_miv_subscript): Properly
8611         check whether evolution_function_is_affine_multivariate_p
8612         before calling gcd_of_steps_may_divide_p.
8614 2018-01-31  Julia Koval  <julia.koval@intel.com>
8616         PR target/83618
8617         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8618         * config/i386/i386.md (rdpid_rex64) New.
8619         (rdpid): Make 32bit only.
8621 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8623         PR lto/84105
8624         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8625         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8627 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8629         Revert
8630         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8632         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8634 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8636         PR rtl-optimization/84071
8637         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8638         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8640 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8642         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8643         (arc_attribute_table): Add 'aux' attribute.
8644         (arc_in_small_data_p): Consider aux like variables.
8645         (arc_is_aux_reg_p): New function.
8646         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8647         (arc_get_aux_arg): New function.
8648         (prepare_move_operands): Handle aux-register access.
8649         (arc_handle_aux_attribute): New function.
8650         * doc/extend.texi (ARC Variable attributes): Add subsection.
8652 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8654         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8655         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8656         (arc_attribute_table): Add 'uncached' attribute.
8657         (arc_print_operand): Print '.di' flag for uncached memory
8658         accesses.
8659         (arc_in_small_data_p): Do not consider for small data the uncached
8660         types.
8661         (arc_is_uncached_mem_p): New function.
8662         * config/arc/predicates.md (compact_store_memory_operand): Check
8663         for uncached memory accesses.
8664         (nonvol_nonimm_operand): Likewise.
8665         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8667 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8669         PR c/84100
8670         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8671         falign-loops=): Add Optimization flag.
8673 2018-01-30  Jeff Law  <law@redhat.com>
8675         PR target/84064
8676         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8677         INT_REGISTERS_SAVED.  Check it prior to calling
8678         get_scratch_register_on_entry.
8679         (ix86_adjust_stack_and_probe): Similarly.
8680         (ix86_emit_probe_stack_range): Similarly.
8681         (ix86_expand_prologue): Corresponding changes.
8683 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8685         PR target/40411
8686         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8687         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8689 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8691         PR target/84112
8692         * lra-constraints.c (curr_insn_transform): Process AND in the
8693         address.
8695 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8697         PR rtl-optimization/83986
8698         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8699         dependence against last_pending_memory_flush in addition to
8700         pending_jump_insns.
8702 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8704         PR tree-optimization/81611
8705         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8706         copies.
8708 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8710         PR target/83758
8711         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8712         a reg rtx.
8714 2018-01-30  Richard Biener  <rguenther@suse.de>
8715             Jakub Jelinek  <jakub@redhat.com>
8717         PR tree-optimization/84111
8718         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8719         inner loops added during recursion, as they don't have up-to-date
8720         SSA form.
8722 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8724         PR ipa/81360
8725         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8726         (can_inline_edge_by_limits_p): ... here.
8727         (can_early_inline_edge_p, check_callers,
8728         update_caller_keys, update_callee_keys, recursive_inlining,
8729         add_new_edges_to_heap, speculation_useful_p,
8730         inline_small_functions,
8731         inline_small_functions, flatten_function,
8732         inline_to_all_callers_1): Update.
8734 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8736         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8737         zeros correctly.
8739 2018-01-30  Richard Biener  <rguenther@suse.de>
8741         PR tree-optimization/83008
8742         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8743         invariant and constant vector uses in stmts when they need
8744         more than one stmt.
8746 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8748         PR bootstrap/84017
8749         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8750         * configure: Regenerate.
8752 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8754         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8755         pattern.
8756         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8757         Use gen_rtx_REG rather than gen_lowpart.
8759 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8761         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
8762         rather than 0 when creating partial subregs.
8764 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8766         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
8767         of usage.
8769 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8771         PR target/81550
8772         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
8773         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
8774         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
8775         flags.  This restores the settings used before the 2017-07-24.
8776         Turning off pre increment/decrement/modify allows IVOPTS to
8777         optimize DF/SF loops where the index is an int.
8779 2018-01-29  Richard Biener  <rguenther@suse.de>
8780             Kelvin Nilsen  <kelvin@gcc.gnu.org>
8782         PR bootstrap/80867
8783         * tree-vect-stmts.c (vectorizable_call): Don't call
8784         targetm.vectorize_builtin_md_vectorized_function if callee is
8785         NULL.
8787 2018-01-22  Carl Love  <cel@us.ibm.com>
8789         * doc/extend.tex: Fix typo in second arg in
8790         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
8792 2018-01-29  Richard Biener  <rguenther@suse.de>
8794         PR tree-optimization/84086
8795         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
8796         (flush_ssaname_freelist): When SSA names were released reset
8797         the SCEV hash table.
8799 2018-01-29  Richard Biener  <rguenther@suse.de>
8801         PR tree-optimization/84057
8802         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
8803         removed paths when removing edges.
8805 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
8807         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
8808         -mfunction-return=@var{choice}.
8810 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8812         PR diagnostic/84034
8813         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8814         Handle CR like TAB.
8815         (layout::print_source_line): Likewise.
8816         (test_get_line_width_without_trailing_whitespace): Add test cases.
8818 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
8820         PR middle-end/84040
8821         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8822         debug insns.
8824 2018-01-26  Jim Wilson  <jimw@sifive.com>
8826         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8828         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8829         specified.
8831 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8833         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8834         and CMP + SUB-immediate -> SUBS.
8836 2018-01-26  Martin Sebor  <msebor@redhat.com>
8838         PR tree-optimization/83896
8839         * tree-ssa-strlen.c (get_string_len): Rename...
8840         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
8841         Avoid assuming length is constant.
8842         (handle_char_store): Use HOST_WIDE_INT for string length.
8844 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
8846         PR target/81763
8847         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8848         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8850 2018-01-26  Richard Biener  <rguenther@suse.de>
8852         PR rtl-optimization/84003
8853         * dse.c (record_store): Only record redundant stores when
8854         the earlier store aliases at least all accesses the later one does.
8856 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
8858         PR rtl-optimization/83985
8859         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8860         REG_CFA_RESTORE insns.
8861         (delete_unmarked_insns): Don't ignore separate shrink wrapping
8862         REG_CFA_RESTORE insns here.
8864         PR c/83989
8865         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8866         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8868 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8870         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8871         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8872         (arc_init): Likewise.
8873         (arc_override_options): Likewise.
8874         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8875         value.
8876         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8877         support.
8878         * config/arc/arc.h (TARGET_DBNZ): Define.
8879         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8880         properly set the tune attribute.
8881         (dbnz): Use TARGET_DBNZ guard.
8882         * config/arc/arc.opt (mtune): Add core3 option.
8884 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8886         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8887         recognize new pic like addresses.
8888         (arc_delegitimize_address): Clean up.
8890 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8892         * config/arc/arc-arches.def: Option mrf16 valid for all
8893         architectures.
8894         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8895         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8896         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8897         * config/arc/arc-tables.opt: Regenerate.
8898         * config/arc/arc.c (arc_conditional_register_usage): Handle
8899         reduced register file case.
8900         (arc_file_start): Set must have build attributes.
8901         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8902         mrf16 option value.
8903         * config/arc/arc.opt (mrf16): Add new option.
8904         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8905         * config/arc/genmultilib.awk: Handle new mrf16 option.
8906         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8907         * config/arc/t-multilib: Regenerate.
8908         * doc/invoke.texi (ARC Options): Document mrf16 option.
8910 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8912         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8913         * config/arc/arc.c (arc_handle_secure_attribute): New function.
8914         (arc_attribute_table): Add 'secure_call' attribute.
8915         (arc_print_operand): Print secure call operand.
8916         (arc_function_ok_for_sibcall): Don't optimize tail calls when
8917         secure.
8918         (arc_is_secure_call_p): New function.  * config/arc/arc.md
8919         (call_i): Add support for sjli instruction.
8920         (call_value_i): Likewise.
8921         * config/arc/constraints.md (Csc): New constraint.
8923 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8924             John Eric Martin  <John.Martin@emmicro-us.com>
8926         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8927         * config/arc/arc.c (_arc_jli_section): New struct.
8928         (arc_jli_section): New type.
8929         (rc_jli_sections): New static variable.
8930         (arc_handle_jli_attribute): New function.
8931         (arc_attribute_table): Add jli_always and jli_fixed attribute.
8932         (arc_file_end): New function.
8933         (TARGET_ASM_FILE_END): Define.
8934         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8935         (arc_add_jli_section): New function.
8936         (jli_call_scan): Likewise.
8937         (arc_reorg): Call jli_call_scan.
8938         (arc_output_addsi): Remove 'S' from printing asm operand.
8939         (arc_is_jli_call_p): New function.
8940         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8941         operand.
8942         (movhi_insn): Likewise.
8943         (movsi_insn): Likewise.
8944         (movsi_set_cc_insn): Likewise.
8945         (loadqi_update): Likewise.
8946         (load_zeroextendqisi_update): Likewise.
8947         (load_signextendqisi_update): Likewise.
8948         (loadhi_update): Likewise.
8949         (load_zeroextendhisi_update): Likewise.
8950         (load_signextendhisi_update): Likewise.
8951         (loadsi_update): Likewise.
8952         (loadsf_update): Likewise.
8953         (movsicc_insn): Likewise.
8954         (bset_insn): Likewise.
8955         (bxor_insn): Likewise.
8956         (bclr_insn): Likewise.
8957         (bmsk_insn): Likewise.
8958         (bicsi3_insn): Likewise.
8959         (cmpsi_cc_c_insn): Likewise.
8960         (movsi_ne): Likewise.
8961         (movsi_cond_exec): Likewise.
8962         (clrsbsi2): Likewise.
8963         (norm_f): Likewise.
8964         (normw): Likewise.
8965         (swap): Likewise.
8966         (divaw): Likewise.
8967         (flag): Likewise.
8968         (sr): Likewise.
8969         (kflag): Likewise.
8970         (ffs): Likewise.
8971         (ffs_f): Likewise.
8972         (fls): Likewise.
8973         (call_i): Remove 'S' asm letter, add jli instruction.
8974         (call_value_i): Likewise.
8975         * config/arc/arc.op (mjli-always): New option.
8976         * config/arc/constraints.md (Cji): New constraint.
8977         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8978         operand.
8979         (subsf3_fpx): Likewise.
8980         (mulsf3_fpx): Likewise.
8981         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8982         asm operand.
8983         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8984         function attrbutes.
8985         * doc/invoke.texi (ARC): Document mjli-always option.
8987 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
8989         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
8990         avoid addition with 0 and use incw and decw where possible.
8992 2018-01-26  Richard Biener  <rguenther@suse.de>
8994         PR tree-optimization/81082
8995         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8996         association if it requires casting to unsigned.
8997         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8998         from fold_plusminus_mult_expr to catch important cases late when
8999         range info is available.
9001 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9003         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9004         * configure.ac (hidden_linkonce): New test.
9005         * configure: Regenerate.
9006         * config.in: Regenerate.
9008 2018-01-26  Julia Koval  <julia.koval@intel.com>
9010         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9011         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9012         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9013         _mm_mask_bitshuffle_epi64_mask): Fix type.
9014         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9015         USI_FTYPE_V4DI_V4DI_USI): Remove.
9016         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9017         __builtin_ia32_vpshufbitqmb256_mask,
9018         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9019         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9020         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9022 2018-01-26  Alan Modra  <amodra@gmail.com>
9024         PR target/84033
9025         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9026         UNSPEC_VBPERMQ.  Sort other unspecs.
9028 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9030         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9032 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9034         PR middle-end/83055
9035         * predict.c (drop_profile): Do not push/pop cfun; update also
9036         node->count.
9037         (handle_missing_profiles): Fix logic looking for zero profiles.
9039 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9041         PR middle-end/83977
9042         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9043         on functions with #pragma omp declare simd or functions with simd
9044         attribute.
9045         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9046         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9047         Remove trailing \n from warning_at calls.
9049 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9051         PR target/84028
9052         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9053         for neutered workers.
9055 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9057         PR target/68467
9058         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9059         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9061 2018-01-24  Jeff Law  <law@redhat.com>
9063         PR target/83994
9064         * i386.c (get_probe_interval): Move to earlier point.
9065         (ix86_compute_frame_layout): If -fstack-clash-protection and
9066         the frame is larger than the probe interval, then use pushes
9067         to save registers rather than reg->mem moves.
9068         (ix86_expand_prologue): Remove conditional for int_registers_saved
9069         assertion.
9071 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9073         PR target/84014
9074         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9075         min/max for never referenced object.
9077 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9079         PR middle-end/83977
9080         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9081         here.
9082         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9083         attributes from DECL_ATTRIBUTES (decl) without affecting
9084         DECL_ATTRIBUTES (current_function_decl).
9085         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9086         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9088 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9090         PR tree-optimization/83979
9091         * fold-const.c (fold_comparison): Use constant_boolean_node
9092         instead of boolean_{true,false}_node.
9094 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9096         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9097         with zero counts.
9099 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9101         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9102         Simplify the clause that sets the length attribute.
9103         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9104         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9105         clause that sets the length attribute.
9106         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9108 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9110         PR target/83589
9111         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9112         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9113         Add strict parameter.
9114         (prevent_branch_around_nothing): Insert dummy insn between branch to
9115         label and label with no ptx insn inbetween.
9116         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9118 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9120         PR target/81352
9121         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9122         for neutered threads in warp.
9123         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9125 2018-01-24  Richard Biener  <rguenther@suse.de>
9127         PR tree-optimization/83176
9128         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9129         operands.
9131 2018-01-24  Richard Biener  <rguenther@suse.de>
9133         PR tree-optimization/82819
9134         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9135         code generating pluses that are no-ops in the target precision.
9137 2018-01-24  Richard Biener  <rguenther@suse.de>
9139         PR middle-end/84000
9140         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9142 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9144         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9145         to merge probabilities.
9146         * predict.c (probably_never_executed): Also mark as cold functions
9147         with global 0 profile and guessed local profile.
9148         * profile-count.c (profile_probability::combine_with_count): New
9149         member function.
9150         * profile-count.h (profile_probability::operator*,
9151         profile_probability::operator*=, profile_probability::operator/,
9152         profile_probability::operator/=): Reduce precision to adjusted
9153         and set value to guessed on contradictory divisions.
9154         (profile_probability::combine_with_freq): Remove.
9155         (profile_probability::combine_wiht_count): Declare.
9156         (profile_count::force_nonzero):: Set to adjusted.
9157         (profile_count::probability_in):: Set quality to adjusted.
9158         * tree-ssa-tail-merge.c (replace_block_by): Use
9159         combine_with_count.
9161 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9162             Jim Wilson  <jimw@sifive.com>
9164         * config/riscv/riscv.c (riscv_stack_boundary): New.
9165         (riscv_option_override): Set riscv_stack_boundary.  Handle
9166         riscv_preferred_stack_boundary_arg.
9167         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9168         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9169         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9170         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9171         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9172         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9174 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9176         PR target/83905
9177         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9178         of struct ix86_frame.
9179         (ix86_expand_epilogue): Likewise.  Add a local variable for
9180         the reg_save_offset field in struct ix86_frame.
9182 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9184         PR tree-optimization/82604
9185         * tree-loop-distribution.c (enum partition_kind): New enum item
9186         PKIND_PARTIAL_MEMSET.
9187         (partition_builtin_p): Support above new enum item.
9188         (generate_code_for_partition): Ditto.
9189         (compute_access_range): Differentiate cases that equality can be
9190         proven at all loops, the innermost loops or no loops.
9191         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9192         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9193         (finalize_partitions, distribute_loop): Don't fuse partition of
9194         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9195         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9196         parloop is enabled.
9198 2018-01-23  Martin Liska  <mliska@suse.cz>
9200         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9201         order to ignore the predictor.
9202         (PRED_POLYMORPHIC_CALL): Likewise.
9203         (PRED_RECURSIVE_CALL): Likewise.
9205 2018-01-23  Martin Liska  <mliska@suse.cz>
9207         * tree-profile.c (tree_profiling): Print function header to
9208         aware reader which function we are working on.
9209         * value-prof.c (gimple_find_values_to_profile): Do not print
9210         not interesting value histograms.
9212 2018-01-23  Martin Liska  <mliska@suse.cz>
9214         * profile-count.h (enum profile_quality): Add
9215         profile_uninitialized as the first value. Do not number values
9216         as they are zero based.
9217         (profile_count::verify): Update sanity check.
9218         (profile_probability::verify): Likewise.
9220 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9222         * doc/invoke.texi (ffor-scope): Deprecate.
9224 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9226         PR tree-optimization/83510
9227         * domwalk.c (set_all_edges_as_executable): New function.
9228         (dom_walker::dom_walker): Convert bool param
9229         "skip_unreachable_blocks" to enum reachability.  Move setup of
9230         edge flags to set_all_edges_as_executable and only do it when
9231         reachability is REACHABLE_BLOCKS.
9232         * domwalk.h (enum dom_walker::reachability): New enum.
9233         (dom_walker::dom_walker): Convert bool param
9234         "skip_unreachable_blocks" to enum reachability.
9235         (set_all_edges_as_executable): New decl.
9236         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9237         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9238         "reachability".
9239         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9240         but converting true to REACHABLE_BLOCKS.
9241         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9242         * tree-vrp.c
9243         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9244         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9245         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9246         REACHABLE_BLOCKS.
9247         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9248         if check_all_array_refs will be called.
9250 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9252         * tree.c (selftest::test_location_wrappers): Add more test
9253         coverage.
9255 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9257         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9258         (selftest::test_bit_in_range): Likewise.
9260 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9262         PR testsuite/83888
9263         * doc/sourcebuild.texi (vect_float): Say that the selector
9264         only describes the situation when -funsafe-math-optimizations is on.
9265         (vect_float_strict): Document.
9267 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9269         PR tree-optimization/83965
9270         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9271         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9272         instead of checking only for a reduction.
9273         (vect_recog_widen_sum_pattern): Likewise.
9275 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9277         * predict.c (probably_never_executed): Only use precise profile info.
9278         (compute_function_frequency): Skip after inlining hack since we now
9279         have quality checking.
9281 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9283         * profile-count.h (profile_probability::very_unlikely,
9284         profile_probability::unlikely, profile_probability::even): Set
9285         precision to guessed.
9287 2018-01-23  Richard Biener  <rguenther@suse.de>
9289         PR tree-optimization/83963
9290         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9291         Properly terminate dominator walk when crossing the exit edge not
9292         when visiting its source block.
9294 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9296         PR c++/83918
9297         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9298         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9300 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9302         PR tree-optimization/83957
9303         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9304         semicolon after for body surrounded by braces.
9306         PR tree-optimization/83081
9307         * profile-count.h (profile_probability::split): New method.
9308         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9309         Use profile_probability::split.
9310         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9311         when splitting a single conditional jump into 2.
9313 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9315         PR tree-optimization/69452
9316         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9317         decl.
9319 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9321         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9322         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9323         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9325 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9327         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9328         * config/rl78/rl78.md (movdi): New define_expand.
9329         * config/rl78/rl78.c (rl78_split_movdi): New function.
9331 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9333         PR target/83862
9334         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9335         no longer used.
9336         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9337         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9338         128-bit to produce an UNSPEC move to get the double word with the
9339         signbit and then a shift directly to do signbit.
9340         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9341         implementation with a new version that just does either a direct
9342         move or a regular move.  Move memory interface to separate insns.
9343         Move insns so they are next to the expander.
9344         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9345         with signbit move.  Split big and little endian case.
9346         (signbit<mode>2_dm_mem_le): Likewise.
9347         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9348         (signbit<mode>2_dm2): Likewise.
9350 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9352         * config/rl78/rl78.md (anddi3): New define_expand.
9354 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9356         * config/rl78/rl78.md (umindi3): New define_expand.
9358 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9360         * config/rl78/rl78.md (smindi3): New define_expand.
9362 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9364         * config/rl78/rl78.md (smaxdi3): New define_expand.
9366 2018-01-22  Carl Love  <cel@us.ibm.com>
9368         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9369         LVX_V1TI): Add macro expansion.
9370         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9371         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9372         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9373         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9374         Change check to determine if the instruction is a byte reversing
9375         entry.  Fix typo in comment.
9376         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9377         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9378         Add def_builtin calls for new builtins.
9379         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9380         Add define_insn expansion.
9382 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9384         * config/rl78/rl78.md (umaxdi3): New define_expand.
9386 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9388         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9389         for non-QImode registers.
9391 2018-01-22  Richard Biener  <rguenther@suse.de>
9393         PR tree-optimization/83963
9394         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9395         including the loop exit block.
9396         (scop_detection::merge_sese): Likewise.
9397         (scop_detection::add_scop): Do it here instead.
9399 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9401         * doc/sourcebuild.texi (arm_softfloat): Document.
9403 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9405         PR gcc/77734
9406         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9407         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9408         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9410 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9411             David Edelsohn  <dje.gcc@gmail.com>
9413         PR target/83946
9414         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9415         Change "crset eq" to "crset 2".
9416         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9417         (*call_indirect_aix<mode>_nospec): Likewise.
9418         (*call_value_indirect_aix<mode>_nospec): Likewise.
9419         (*call_indirect_elfv2<mode>_nospec): Likewise.
9420         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9421         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9422         change assembly output from . to $.
9423         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9424         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9425         (*tablejump<mode>_internal1_nospec): Likewise.
9427 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9429         PR target/80870
9430         * config/sh/sh_optimize_sett_clrt.cc:
9431         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9433 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9435         PR tree-optimization/83940
9436         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9437         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9438         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9439         use it to pass back the definition type.
9440         (vect_check_store_rhs): Likewise rhs_dt_out.
9441         (vect_build_gather_load_calls): Add a mask_dt argument and use
9442         it instead of a call to vect_is_simple_use.
9443         (vectorizable_store): Update calls to vect_check_load_store_mask
9444         and vect_check_store_rhs.  Use the dt returned by the latter instead
9445         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9446         instead of calls to vect_is_simple_use.  Pass the scalar rather
9447         than the vector operand to vect_is_simple_use when handling
9448         second and subsequent copies of an rhs value.
9449         (vectorizable_load): Update calls to vect_check_load_store_mask
9450         and vect_build_gather_load_calls.  Use the cached mask_dt and
9451         gs_info.offset_dt instead of calls to vect_is_simple_use.
9453 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9455         PR middle-end/83945
9456         * tree-emutls.c: Include gimplify.h.
9457         (lower_emutls_2): New function.
9458         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9459         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9460         it before further processing.
9462         PR target/83930
9463         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9464         UINTVAL (trueop1) instead of INTVAL (op1).
9466 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9468         PR debug/81570
9469         PR debug/83728
9470         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9471         INCOMING_FRAME_SP_OFFSET if not defined.
9472         (scan_trace): Add ENTRY argument.  If true and
9473         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9474         emit a note to adjust the CFA offset.
9475         (create_cfi_notes): Adjust scan_trace callers.
9476         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9477         INCOMING_FRAME_SP_OFFSET in the CIE.
9478         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9479         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9480         Likewise.
9481         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9482         * doc/tm.texi: Regenerated.
9484 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9486         PR rtl-optimization/83147
9487         * lra-constraints.c (remove_inheritance_pseudos): Use
9488         lra_substitute_pseudo_within_insn.
9490 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9491             Cesar Philippidis  <cesar@codesourcery.com>
9493         PR target/83920
9494         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9496 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9498         PR target/83790
9499         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9500         spaces for function labels.
9502 2018-01-19  Martin Liska  <mliska@suse.cz>
9504         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9505         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9506         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9507         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9508         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9509         (PRED_CONST_RETURN): Change from 69 to 65.
9510         (PRED_NULL_RETURN): Change from 91 to 71.
9511         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9512         (PRED_LOOP_GUARD): Change from 66 to 73.
9514 2018-01-19  Martin Liska  <mliska@suse.cz>
9516         * predict.c (predict_insn_def): Add new assert.
9517         (struct branch_predictor): Change type to signed integer.
9518         (test_prediction_value_range): Amend test to cover
9519         PROB_UNINITIALIZED.
9520         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9521         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9522         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9523         (PRED_LOOP_IV_COMPARE): Likewise.
9524         * predict.h (PROB_UNINITIALIZED): Define new constant.
9526 2018-01-19  Martin Liska  <mliska@suse.cz>
9528         * predict.c (dump_prediction): Add new format for
9529         analyze_brprob.py script which is enabled with -details
9530         suboption.
9531         * profile-count.h (precise_p): New function.
9533 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9535         PR tree-optimization/83922
9536         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9537         there are no statements that need masking.
9538         (vect_active_double_reduction_p): New function.
9539         (vect_analyze_loop_operations): Use it when handling phis that
9540         are not in the loop header.
9542 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9544         PR tree-optimization/83914
9545         * tree-vect-loop.c (vectorizable_induction): Don't convert
9546         init_expr or apply the peeling adjustment for inductions
9547         that are nested within the vectorized loop.
9549 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9551         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9552         instead of NEG.
9554 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9556         PR sanitizer/81715
9557         PR testsuite/83882
9558         * function.h (gimplify_parameters): Add gimple_seq * argument.
9559         * function.c: Include gimple.h and options.h.
9560         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9561         for the added local temporaries if needed.
9562         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9563         if there are any parameter cleanups, wrap whole body into a
9564         try/finally with the cleanups.
9566 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9568         PR target/82964
9569         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9570         Use GET_MODE_CLASS for scalar floating point.
9572 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9574         PR ipa/82256
9575         patch by PaX Team
9576         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9577         Fix call of call_cgraph_insertion_hooks.
9579 2018-01-18  Martin Sebor  <msebor@redhat.com>
9581         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9583 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9585         PR ipa/83619
9586         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9587         frequencies.
9589 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9591         PR other/70268
9592         * common.opt: (-ffile-prefix-map): New option.
9593         * opts.c (common_handle_option): Defer it.
9594         * opts-global.c (handle_common_deferred_options): Handle it.
9595         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9596         * file-prefix-map.h: New file.
9597         (remap_debug_filename, add_debug_prefix_map): ...here.
9598         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9599         * final.c (debug_prefix_map, add_debug_prefix_map
9600         remap_debug_filename): Move to...
9601         * file-prefix-map.c: New file.
9602         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9603         generalize, get rid of alloca(), use strrchr() instead of strchr().
9604         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9605         Implement in terms of add_prefix_map().
9606         (remap_macro_filename, remap_debug_filename): Implement in term of
9607         remap_filename().
9608         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9609         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9610         * dbxout.c: Include file-prefix-map.h.
9611         * varasm.c: Likewise.
9612         * vmsdbgout.c: Likewise.
9613         * xcoffout.c: Likewise.
9614         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9615         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9616         * doc/invoke.texi (-ffile-prefix-map): Document.
9617         (-fdebug-prefix-map): Update description.
9619 2018-01-18  Martin Liska  <mliska@suse.cz>
9621         * config/i386/i386.c (indirect_thunk_name): Document that also
9622         lfence is emitted.
9623         (output_indirect_thunk): Document why both instructions
9624         (pause and lfence) are generated.
9626 2018-01-18  Richard Biener  <rguenther@suse.de>
9628         PR tree-optimization/83887
9629         * graphite-scop-detection.c
9630         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9631         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9632         (scop_detection::merge_sese): Re-implement with a flood-fill
9633         algorithm that properly finds a SESE region if it exists.
9635 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9637         PR c/61240
9638         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9639         pointer_diff optimizations use view_convert instead of convert.
9641 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9643         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9644         Generate different code for -mno-speculate-indirect-jumps.
9645         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9646         (*call_indirect_aix<mode>): Disable for
9647         -mno-speculate-indirect-jumps.
9648         (*call_indirect_aix<mode>_nospec): New define_insn.
9649         (*call_value_indirect_aix<mode>): Disable for
9650         -mno-speculate-indirect-jumps.
9651         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9652         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9653         -mno-speculate-indirect-jumps.
9654         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9656 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9658         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9659         long double type, set the flags for noting the default long double
9660         type, even if we don't pass or return a long double type.
9662 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9664         PR ipa/83051
9665         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9666         failure.
9668 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9670         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9671         support for merge[hl].
9672         (fold_mergehl_helper): New helper function.
9673         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9674         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9675         (altivec_vmrglw_direct): Add xxmrglw insn.
9677 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9679         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9680         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9682 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9684         PR lto/83121
9685         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9686         call the lto_location_cache before reading the
9687         DECL_SOURCE_LOCATION of the types.
9689 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9690             Richard Sandiford  <richard.sandiford@linaro.org>
9692         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9693         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9694         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9695         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9696         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9697         Add declaration.
9698         * config/aarch64/constraints.md (aarch64_movti_operand):
9699         Limit immediates.
9700         * config/aarch64/predicates.md (Uti): Add new constraint.
9702 2018-01-17 Carl Love  <cel@us.ibm.com>
9704         * config/rs6000/vsx.md (define_expand xl_len_r,
9705         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9706         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9707         lxvll.
9708         (define_expand, define_insn): Move the shift left from  the
9709         define_insn to the define_expand for lxvl and stxvl instructions.
9710         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9711         and XL_LEN_R definitions to PURE.
9713 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9715         * config/i386/i386.c (indirect_thunk_name): Declare regno
9716         as unsigned int.  Compare regno with INVALID_REGNUM.
9717         (output_indirect_thunk): Ditto.
9718         (output_indirect_thunk_function): Ditto.
9719         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9720         in the call to output_indirect_thunk_function.
9722 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9724         PR middle-end/83884
9725         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9726         rather than the size of inner_type to determine the stack slot size
9727         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9729 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9731         PR target/83546
9732         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9733         to PTA_SILVERMONT.
9735 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9737         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9738         endian Linux systems to optionally enable multilibs for selecting
9739         the long double type if the user configured an explicit type.
9740         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9741         have no long double multilibs if not defined.
9742         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9743         warn if the user used -mabi={ieee,ibm}longdouble and we built
9744         multilibs for long double.
9745         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9746         appropriate multilib option.
9747         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9748         multilib options.
9749         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9750         for building long double multilibs.
9751         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9753 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
9755         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9756         copies.
9758         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9759         64 bits.
9760         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9761         128 bits.
9763         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
9764         variables.
9766         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
9767         return value.
9769 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9771         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
9772         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
9774 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9776         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
9777         different rtl trees depending on TARGET_64BIT.
9778         (rs6000_gen_lvx): Likewise.
9780 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9782         * config/visium/visium.md (nop): Tweak comment.
9783         (hazard_nop): Likewise.
9785 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9787         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
9788         -mspeculate-indirect-jumps.
9789         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
9790         for -mno-speculate-indirect-jumps.
9791         (*call_indirect_elfv2<mode>_nospec): New define_insn.
9792         (*call_value_indirect_elfv2<mode>): Disable for
9793         -mno-speculate-indirect-jumps.
9794         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
9795         (indirect_jump): Emit different RTL for
9796         -mno-speculate-indirect-jumps.
9797         (*indirect_jump<mode>): Disable for
9798         -mno-speculate-indirect-jumps.
9799         (*indirect_jump<mode>_nospec): New define_insn.
9800         (tablejump): Emit different RTL for
9801         -mno-speculate-indirect-jumps.
9802         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
9803         (tablejumpsi_nospec): New define_expand.
9804         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
9805         (tablejumpdi_nospec): New define_expand.
9806         (*tablejump<mode>_internal1): Disable for
9807         -mno-speculate-indirect-jumps.
9808         (*tablejump<mode>_internal1_nospec): New define_insn.
9809         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9810         option.
9812 2018-01-16  Artyom Skrobov tyomitch@gmail.com
9814         * caller-save.c (insert_save): Drop unnecessary parameter.  All
9815         callers updated.
9817 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9818             Richard Biener  <rguenth@suse.de>
9820         PR libgomp/83590
9821         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9822         return early, inline manually is_gimple_sizepos.  Make sure if we
9823         call gimplify_expr we don't end up with a gimple constant.
9824         * tree.c (variably_modified_type_p): Don't return true for
9825         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
9826         * gimplify.h (is_gimple_sizepos): Remove.
9828 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9830         PR tree-optimization/83857
9831         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9832         vectorizable_live_operation for pure SLP statements.
9833         (vectorizable_live_operation): Handle PHIs.
9835 2018-01-16  Richard Biener  <rguenther@suse.de>
9837         PR tree-optimization/83867
9838         * tree-vect-stmts.c (vect_transform_stmt): Precompute
9839         nested_in_vect_loop_p since the scalar stmt may get invalidated.
9841 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9843         PR c/83844
9844         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9845         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9846         If off is not INTEGER_CST, issue a may not be aligned warning
9847         rather than isn't aligned.  Use isn%'t rather than isn't.
9848         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9849         into MULT_EXPR.
9850         <case MULT_EXPR>: Improve the case when bottom and one of the
9851         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9852         operand, in that case check if the other operand is multiple of
9853         bottom divided by the INTEGER_CST operand.
9855 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9857         PR target/83858
9858         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9859         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9860         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9861         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9862         * config/pa/pa.c (pa_function_arg_advance): Likewise.
9863         (pa_function_arg, pa_arg_partial_bytes): Likewise.
9864         (pa_function_arg_size): New function.
9866 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9868         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9869         in a separate statement.
9871 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9873         PR tree-optimization/83847
9874         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9875         group gathers and scatters.
9877 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9879         PR rtl-optimization/86620
9880         * params.def (max-sched-ready-insns): Bump minimum value to 1.
9882         PR rtl-optimization/83213
9883         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9884         to last if both are JUMP_INSNs.
9886         PR tree-optimization/83843
9887         * gimple-ssa-store-merging.c
9888         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9889         store_immediate_info for bswap/nop orig_stores.
9891 2018-01-15  Andrew Waterman  <andrew@sifive.com>
9893         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9894         !TARGET_MUL.
9895         <UDIV>: Increase cost if !TARGET_DIV.
9897 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
9899         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9900         (define_attr "cr_logical_3op"): New.
9901         (cceq_ior_compare): Adjust.
9902         (cceq_ior_compare_complement): Adjust.
9903         (*cceq_rev_compare): Adjust.
9904         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9905         (is_cracked_insn): Adjust.
9906         (insn_must_be_first_in_group): Adjust.
9907         * config/rs6000/40x.md: Adjust.
9908         * config/rs6000/440.md: Adjust.
9909         * config/rs6000/476.md: Adjust.
9910         * config/rs6000/601.md: Adjust.
9911         * config/rs6000/603.md: Adjust.
9912         * config/rs6000/6xx.md: Adjust.
9913         * config/rs6000/7450.md: Adjust.
9914         * config/rs6000/7xx.md: Adjust.
9915         * config/rs6000/8540.md: Adjust.
9916         * config/rs6000/cell.md: Adjust.
9917         * config/rs6000/e300c2c3.md: Adjust.
9918         * config/rs6000/e500mc.md: Adjust.
9919         * config/rs6000/e500mc64.md: Adjust.
9920         * config/rs6000/e5500.md: Adjust.
9921         * config/rs6000/e6500.md: Adjust.
9922         * config/rs6000/mpc.md: Adjust.
9923         * config/rs6000/power4.md: Adjust.
9924         * config/rs6000/power5.md: Adjust.
9925         * config/rs6000/power6.md: Adjust.
9926         * config/rs6000/power7.md: Adjust.
9927         * config/rs6000/power8.md: Adjust.
9928         * config/rs6000/power9.md: Adjust.
9929         * config/rs6000/rs64.md: Adjust.
9930         * config/rs6000/titan.md: Adjust.
9932 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9934         * config/i386/predicates.md (indirect_branch_operand): Rewrite
9935         ix86_indirect_branch_register logic.
9937 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9939         * config/i386/constraints.md (Bs): Update
9940         ix86_indirect_branch_register check.  Don't check
9941         ix86_indirect_branch_register with GOT_memory_operand.
9942         (Bw): Likewise.
9943         * config/i386/predicates.md (GOT_memory_operand): Don't check
9944         ix86_indirect_branch_register here.
9945         (GOT32_symbol_operand): Likewise.
9947 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9949         * config/i386/predicates.md (constant_call_address_operand):
9950         Rewrite ix86_indirect_branch_register logic.
9951         (sibcall_insn_operand): Likewise.
9953 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9955         * config/i386/constraints.md (Bs): Replace
9956         ix86_indirect_branch_thunk_register with
9957         ix86_indirect_branch_register.
9958         (Bw): Likewise.
9959         * config/i386/i386.md (indirect_jump): Likewise.
9960         (tablejump): Likewise.
9961         (*sibcall_memory): Likewise.
9962         (*sibcall_value_memory): Likewise.
9963         Peepholes of indirect call and jump via memory: Likewise.
9964         * config/i386/i386.opt: Likewise.
9965         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9966         (GOT_memory_operand): Likewise.
9967         (call_insn_operand): Likewise.
9968         (sibcall_insn_operand): Likewise.
9969         (GOT32_symbol_operand): Likewise.
9971 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9973         PR middle-end/83837
9974         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9975         type rather than type addr's type points to.
9976         (expand_omp_atomic_mutex): Likewise.
9977         (expand_omp_atomic): Likewise.
9979 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9981         PR target/83839
9982         * config/i386/i386.c (output_indirect_thunk_function): Use
9983         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9984         for  __x86_return_thunk.
9986 2018-01-15  Richard Biener  <rguenther@suse.de>
9988         PR middle-end/83850
9989         * expmed.c (extract_bit_field_1): Fix typo.
9991 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9993         PR target/83687
9994         * config/arm/iterators.md (VF): New mode iterator.
9995         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9996         Remove integer-related logic from pattern.
9997         (neon_vabd<mode>_3): Likewise.
9999 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10001         PR middle-end/82694
10002         * common.opt (fstrict-overflow): No longer an alias.
10003         (fwrapv-pointer): New option.
10004         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10005         also for pointer types based on flag_wrapv_pointer.
10006         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10007         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10008         opts->x_flag_wrapv got set.
10009         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10010         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10011         POINTER_TYPE_OVERFLOW_UNDEFINED.
10012         * match.pd: Likewise in address comparison pattern.
10013         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10015 2018-01-15  Richard Biener  <rguenther@suse.de>
10017         PR lto/83804
10018         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10019         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10020         Reset type names to their identifier if their TYPE_DECL doesn't
10021         have linkage (and thus is used for ODR and devirt).
10022         (save_debug_info_for_decl): Remove.
10023         (save_debug_info_for_type): Likewise.
10024         (add_tree_to_fld_list): Adjust.
10025         * tree-pretty-print.c (dump_generic_node): Make dumping of
10026         type names more robust.
10028 2018-01-15  Richard Biener  <rguenther@suse.de>
10030         * BASE-VER: Bump to 8.0.1.
10032 2018-01-14  Martin Sebor  <msebor@redhat.com>
10034         PR other/83508
10035         * builtins.c (check_access): Avoid warning when the no-warning bit
10036         is set.
10038 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10040         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10041         * ira-color (allocno_hard_regs_compare): Likewise.
10043 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10045         PR target/83013
10046         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10047         Use .pushsection/.popsection.
10049 2018-01-14  Martin Sebor  <msebor@redhat.com>
10051         PR c++/81327
10052         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10054 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10056         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10057         entry from extra_headers.
10058         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10059         extra_headers, make the list bitwise identical to the i?86-*-* one.
10061 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10063         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10064         -mcmodel=large with -mindirect-branch=thunk,
10065         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10066         -mfunction-return=thunk-extern.
10067         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10068         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10069         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10071 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10073         * config/i386/i386.c (print_reg): Print the name of the full
10074         integer register without '%'.
10075         (ix86_print_operand): Handle 'V'.
10076          * doc/extend.texi: Document 'V' modifier.
10078 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10080         * config/i386/constraints.md (Bs): Disallow memory operand for
10081         -mindirect-branch-register.
10082         (Bw): Likewise.
10083         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10084         (GOT_memory_operand): Likewise.
10085         (call_insn_operand): Likewise.
10086         (sibcall_insn_operand): Likewise.
10087         (GOT32_symbol_operand): Likewise.
10088         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10089         for -mindirect-branch-register.
10090         (tablejump): Likewise.
10091         (*sibcall_memory): Likewise.
10092         (*sibcall_value_memory): Likewise.
10093         Disallow peepholes of indirect call and jump via memory for
10094         -mindirect-branch-register.
10095         (*call_pop): Replace m with Bw.
10096         (*call_value_pop): Likewise.
10097         (*sibcall_pop_memory): Replace m with Bs.
10098         * config/i386/i386.opt (mindirect-branch-register): New option.
10099         * doc/invoke.texi: Document -mindirect-branch-register option.
10101 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10103         * config/i386/i386-protos.h (ix86_output_function_return): New.
10104         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10105         set function_return_type.
10106         (indirect_thunk_name): Add ret_p to indicate thunk for function
10107         return.
10108         (output_indirect_thunk_function): Pass false to
10109         indirect_thunk_name.
10110         (ix86_output_indirect_branch_via_reg): Likewise.
10111         (ix86_output_indirect_branch_via_push): Likewise.
10112         (output_indirect_thunk_function): Create alias for function
10113         return thunk if regno < 0.
10114         (ix86_output_function_return): New function.
10115         (ix86_handle_fndecl_attribute): Handle function_return.
10116         (ix86_attribute_table): Add function_return.
10117         * config/i386/i386.h (machine_function): Add
10118         function_return_type.
10119         * config/i386/i386.md (simple_return_internal): Use
10120         ix86_output_function_return.
10121         (simple_return_internal_long): Likewise.
10122         * config/i386/i386.opt (mfunction-return=): New option.
10123         (indirect_branch): Mention -mfunction-return=.
10124         * doc/extend.texi: Document function_return function attribute.
10125         * doc/invoke.texi: Document -mfunction-return= option.
10127 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10129         * config/i386/i386-opts.h (indirect_branch): New.
10130         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10131         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10132         with local indirect jump when converting indirect call and jump.
10133         (ix86_set_indirect_branch_type): New.
10134         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10135         (indirectlabelno): New.
10136         (indirect_thunk_needed): Likewise.
10137         (indirect_thunk_bnd_needed): Likewise.
10138         (indirect_thunks_used): Likewise.
10139         (indirect_thunks_bnd_used): Likewise.
10140         (INDIRECT_LABEL): Likewise.
10141         (indirect_thunk_name): Likewise.
10142         (output_indirect_thunk): Likewise.
10143         (output_indirect_thunk_function): Likewise.
10144         (ix86_output_indirect_branch_via_reg): Likewise.
10145         (ix86_output_indirect_branch_via_push): Likewise.
10146         (ix86_output_indirect_branch): Likewise.
10147         (ix86_output_indirect_jmp): Likewise.
10148         (ix86_code_end): Call output_indirect_thunk_function if needed.
10149         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10150         needed.
10151         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10152         (ix86_attribute_table): Add indirect_branch.
10153         * config/i386/i386.h (machine_function): Add indirect_branch_type
10154         and has_local_indirect_jump.
10155         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10156         to true.
10157         (tablejump): Likewise.
10158         (*indirect_jump): Use ix86_output_indirect_jmp.
10159         (*tablejump_1): Likewise.
10160         (simple_return_indirect_internal): Likewise.
10161         * config/i386/i386.opt (mindirect-branch=): New option.
10162         (indirect_branch): New.
10163         (keep): Likewise.
10164         (thunk): Likewise.
10165         (thunk-inline): Likewise.
10166         (thunk-extern): Likewise.
10167         * doc/extend.texi: Document indirect_branch function attribute.
10168         * doc/invoke.texi: Document -mindirect-branch= option.
10170 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10172         PR ipa/83051
10173         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10175 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10177         * ipa-inline.c (want_inline_small_function_p): Return false if
10178         inlining has already failed with CIF_FINAL_ERROR.
10179         (update_caller_keys): Call want_inline_small_function_p before
10180         can_inline_edge_p.
10181         (update_callee_keys): Likewise.
10183 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10185         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10186         New function.
10187         (rs6000_quadword_masked_address_p): Likewise.
10188         (quad_aligned_load_p): Likewise.
10189         (quad_aligned_store_p): Likewise.
10190         (const_load_sequence_p): Add comment to describe the outer-most loop.
10191         (mimic_memory_attributes_and_flags): New function.
10192         (rs6000_gen_stvx): Likewise.
10193         (replace_swapped_aligned_store): Likewise.
10194         (rs6000_gen_lvx): Likewise.
10195         (replace_swapped_aligned_load): Likewise.
10196         (replace_swapped_load_constant): Capitalize argument name in
10197         comment describing this function.
10198         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10199         and stores that access quad-word aligned addresses and replace
10200         with stvx or lvx instructions when appropriate.
10201         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10202         New function prototype.
10203         (rs6000_quadword_masked_address_p): Likewise.
10204         (rs6000_gen_lvx): Likewise.
10205         (rs6000_gen_stvx): Likewise.
10206         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10207         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10208         when memory address is aligned.
10209         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10210         this split to select lvx instruction when memory address is aligned.
10211         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10212         instruction when memory address is aligned.
10213         (*vsx_le_perm_load_v16qi): Likewise.
10214         (four unnamed splitters): Modify to select the stvx instruction
10215         when memory is aligned.
10217 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10219         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10220         which appears in the queue multiple times.
10222 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10223             Alan Hayward  <alan.hayward@arm.com>
10224             David Sherwood  <david.sherwood@arm.com>
10226         * tree-vectorizer.h (vec_lower_bound): New structure.
10227         (_loop_vec_info): Add check_nonzero and lower_bounds.
10228         (LOOP_VINFO_CHECK_NONZERO): New macro.
10229         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10230         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10231         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10232         fields.  Make seg_len the distance travelled, not including the
10233         access size.
10234         (dr_direction_indicator): Declare.
10235         (dr_zero_step_indicator): Likewise.
10236         (dr_known_forward_stride_p): Likewise.
10237         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10238         tree-ssanames.h.
10239         (runtime_alias_check_p): Allow runtime alias checks with
10240         variable strides.
10241         (operator ==): Compare access_size and align.
10242         (prune_runtime_alias_test_list): Rework for new distinction between
10243         the access_size and seg_len.
10244         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10245         segment lengths.
10246         (get_segment_min_max): New function.
10247         (create_intersect_range_checks): Use it.
10248         (dr_step_indicator): New function.
10249         (dr_direction_indicator): Likewise.
10250         (dr_zero_step_indicator): Likewise.
10251         (dr_known_forward_stride_p): Likewise.
10252         * tree-loop-distribution.c (data_ref_segment_size): Return
10253         DR_STEP * (niters - 1).
10254         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10255         constructor.
10256         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10257         (vect_preserves_scalar_order_p): New function, split out from...
10258         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10259         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10260         (vect_vfa_access_size): New function.
10261         (vect_vfa_align): Likewise.
10262         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10263         (dump_lower_bound): New function.
10264         (vect_check_lower_bound): Likewise.
10265         (vect_small_gap_p): Likewise.
10266         (vectorizable_with_step_bound_p): Likewise.
10267         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10268         depencies if the vectorization factor is 1.  Convert the checks
10269         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10270         a bunds check for variable steps if the minimum required step is
10271         relatively small. Update calls to the dr_with_seg_len
10272         constructor and to vect_compile_time_alias.
10273         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10274         function.
10275         (vect_loop_versioning): Call it.
10276         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10277         when retrying.
10278         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10280 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10281             Alan Hayward  <alan.hayward@arm.com>
10282             David Sherwood  <david.sherwood@arm.com>
10284         * doc/sourcebuild.texi (vect_scatter_store): Document.
10285         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10286         optabs.
10287         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10288         Document.
10289         * genopinit.c (main): Add supports_vec_scatter_store and
10290         supports_vec_scatter_store_cached to target_optabs.
10291         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10292         IFN_MASK_SCATTER_STORE.
10293         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10294         functions.
10295         * internal-fn.h (internal_store_fn_p): Declare.
10296         (internal_fn_stored_value_index): Likewise.
10297         * internal-fn.c (scatter_store_direct): New macro.
10298         (expand_scatter_store_optab_fn): New function.
10299         (direct_scatter_store_optab_supported_p): New macro.
10300         (internal_store_fn_p): New function.
10301         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10302         IFN_MASK_SCATTER_STORE.
10303         (internal_fn_mask_index): Likewise.
10304         (internal_fn_stored_value_index): New function.
10305         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10306         for scatter stores.
10307         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10308         * optabs-query.c (supports_vec_scatter_store_p): New function.
10309         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10310         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10311         true for scatter stores.
10312         (vect_gather_scatter_fn_p): Handle scatter stores too.
10313         (vect_check_gather_scatter): Consider using scatter stores if
10314         supports_vec_scatter_store_p.
10315         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10316         scatter stores too.
10317         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10318         internal_fn_stored_value_index.
10319         (check_load_store_masking): Handle scatter stores too.
10320         (vect_get_store_rhs): Make public.
10321         (vectorizable_call): Use internal_store_fn_p.
10322         (vectorizable_store): Handle scatter store internal functions.
10323         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10324         when deciding whether the end of the group has been reached.
10325         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10326         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10327         (mask_scatter_store<mode>): New insns.
10329 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10330             Alan Hayward  <alan.hayward@arm.com>
10331             David Sherwood  <david.sherwood@arm.com>
10333         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10334         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10335         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10336         function.
10337         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10338         Use vect_truncate_gather_scatter_offset if we can't treat the
10339         operation as a normal gather load or scatter store.
10340         (get_group_load_store_type): Take the gather_scatter_info
10341         as argument.  Try using a gather load or scatter store for
10342         single-element groups.
10343         (get_load_store_type): Update calls to get_group_load_store_type
10344         and vect_use_strided_gather_scatters_p.
10346 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10347             Alan Hayward  <alan.hayward@arm.com>
10348             David Sherwood  <david.sherwood@arm.com>
10350         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10351         optional tree argument.
10352         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10353         null target hooks.
10354         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10355         but continue to use the current value as a fallback.
10356         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10357         to compare the updates.
10358         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10359         (get_load_store_type): Use it when handling a strided access.
10360         (vect_get_strided_load_store_ops): New function.
10361         (vect_get_data_ptr_increment): Likewise.
10362         (vectorizable_load): Handle strided gather loads.  Always pass
10363         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10366             Alan Hayward  <alan.hayward@arm.com>
10367             David Sherwood  <david.sherwood@arm.com>
10369         * doc/md.texi (gather_load@var{m}): Document.
10370         (mask_gather_load@var{m}): Likewise.
10371         * genopinit.c (main): Add supports_vec_gather_load and
10372         supports_vec_gather_load_cached to target_optabs.
10373         * optabs-tree.c (init_tree_optimization_optabs): Use
10374         ggc_cleared_alloc to allocate target_optabs.
10375         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10376         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10377         functions.
10378         * internal-fn.h (internal_load_fn_p): Declare.
10379         (internal_gather_scatter_fn_p): Likewise.
10380         (internal_fn_mask_index): Likewise.
10381         (internal_gather_scatter_fn_supported_p): Likewise.
10382         * internal-fn.c (gather_load_direct): New macro.
10383         (expand_gather_load_optab_fn): New function.
10384         (direct_gather_load_optab_supported_p): New macro.
10385         (direct_internal_fn_optab): New function.
10386         (internal_load_fn_p): Likewise.
10387         (internal_gather_scatter_fn_p): Likewise.
10388         (internal_fn_mask_index): Likewise.
10389         (internal_gather_scatter_fn_supported_p): Likewise.
10390         * optabs-query.c (supports_at_least_one_mode_p): New function.
10391         (supports_vec_gather_load_p): Likewise.
10392         * optabs-query.h (supports_vec_gather_load_p): Declare.
10393         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10394         and memory_type field.
10395         (NUM_PATTERNS): Bump to 15.
10396         * tree-vect-data-refs.c: Include internal-fn.h.
10397         (vect_gather_scatter_fn_p): New function.
10398         (vect_describe_gather_scatter_call): Likewise.
10399         (vect_check_gather_scatter): Try using internal functions for
10400         gather loads.  Recognize existing calls to a gather load function.
10401         (vect_analyze_data_refs): Consider using gather loads if
10402         supports_vec_gather_load_p.
10403         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10404         (vect_get_gather_scatter_offset_type): Likewise.
10405         (vect_convert_mask_for_vectype): Likewise.
10406         (vect_add_conversion_to_patterm): Likewise.
10407         (vect_try_gather_scatter_pattern): Likewise.
10408         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10409         (vect_vect_recog_func_ptrs): Add it.
10410         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10411         internal_fn_mask_index and internal_gather_scatter_fn_p.
10412         (check_load_store_masking): Take the gather_scatter_info as an
10413         argument and handle gather loads.
10414         (vect_get_gather_scatter_ops): New function.
10415         (vectorizable_call): Check internal_load_fn_p.
10416         (vectorizable_load): Likewise.  Handle gather load internal
10417         functions.
10418         (vectorizable_store): Update call to check_load_store_masking.
10419         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10420         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10421         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10422         (aarch64_gather_scale_operand_d): New predicates.
10423         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10424         (mask_gather_load<mode>): New insns.
10426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10427             Alan Hayward  <alan.hayward@arm.com>
10428             David Sherwood  <david.sherwood@arm.com>
10430         * optabs.def (fold_left_plus_optab): New optab.
10431         * doc/md.texi (fold_left_plus_@var{m}): Document.
10432         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10433         * internal-fn.c (fold_left_direct): Define.
10434         (expand_fold_left_optab_fn): Likewise.
10435         (direct_fold_left_optab_supported_p): Likewise.
10436         * fold-const-call.c (fold_const_fold_left): New function.
10437         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10438         * tree-parloops.c (valid_reduction_p): New function.
10439         (gather_scalar_reductions): Use it.
10440         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10441         (vect_finish_replace_stmt): Declare.
10442         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10443         (needs_fold_left_reduction_p): New function, split out from...
10444         (vect_is_simple_reduction): ...here.  Accept reductions that
10445         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10446         (vect_force_simple_reduction): Also store the reduction type in
10447         the assignment's STMT_VINFO_REDUC_TYPE.
10448         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10449         (merge_with_identity): New function.
10450         (vect_expand_fold_left): Likewise.
10451         (vectorize_fold_left_reduction): Likewise.
10452         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10453         scalar phi in place for it.  Check for target support and reject
10454         cases that would reassociate the operation.  Defer the transform
10455         phase to vectorize_fold_left_reduction.
10456         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10457         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10458         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10462         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10463         call to ifc_temp_var.
10465 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10466             Alan Hayward  <alan.hayward@arm.com>
10467             David Sherwood  <david.sherwood@arm.com>
10469         * target.def (legitimize_address_displacement): Take the original
10470         offset as a poly_int.
10471         * targhooks.h (default_legitimize_address_displacement): Update
10472         accordingly.
10473         * targhooks.c (default_legitimize_address_displacement): Likewise.
10474         * doc/tm.texi: Regenerate.
10475         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10476         as an argument, moving assert of ad->disp == ad->disp_term to...
10477         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10478         Try calling targetm.legitimize_address_displacement before expanding
10479         the address rather than afterwards, and adjust for the new interface.
10480         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10481         Match the new hook interface.  Handle SVE addresses.
10482         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10483         new hook interface.
10485 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10487         * Makefile.in (OBJS): Add early-remat.o.
10488         * target.def (select_early_remat_modes): New hook.
10489         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10490         * doc/tm.texi: Regenerate.
10491         * targhooks.h (default_select_early_remat_modes): Declare.
10492         * targhooks.c (default_select_early_remat_modes): New function.
10493         * timevar.def (TV_EARLY_REMAT): New timevar.
10494         * passes.def (pass_early_remat): New pass.
10495         * tree-pass.h (make_pass_early_remat): Declare.
10496         * early-remat.c: New file.
10497         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10498         function.
10499         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10501 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10502             Alan Hayward  <alan.hayward@arm.com>
10503             David Sherwood  <david.sherwood@arm.com>
10505         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10506         vfm1 with a bound_epilog parameter.
10507         (vect_do_peeling): Update calls accordingly, and move the prologue
10508         call earlier in the function.  Treat the base bound_epilog as 0 for
10509         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10510         this base when peeling for gaps.
10511         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10512         with fully-masked loops.
10513         (vect_estimate_min_profitable_iters): Handle the single peeled
10514         iteration in that case.
10516 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10517             Alan Hayward  <alan.hayward@arm.com>
10518             David Sherwood  <david.sherwood@arm.com>
10520         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10521         single-element interleaving even if the size is not a power of 2.
10522         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10523         accesses for single-element interleaving if the group size is
10524         not a power of 2.
10526 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10527             Alan Hayward  <alan.hayward@arm.com>
10528             David Sherwood  <david.sherwood@arm.com>
10530         * doc/md.texi (fold_extract_last_@var{m}): Document.
10531         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10532         * optabs.def (fold_extract_last_optab): New optab.
10533         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10534         * internal-fn.c (fold_extract_direct): New macro.
10535         (expand_fold_extract_optab_fn): Likewise.
10536         (direct_fold_extract_optab_supported_p): Likewise.
10537         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10538         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10539         EXTRACT_LAST_REDUCTION.
10540         (get_initial_def_for_reduction): Do not create an initial vector
10541         for EXTRACT_LAST_REDUCTION reductions.
10542         (vectorizable_reduction): Leave the scalar phi in place for
10543         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10544         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10545         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10546         transform phase to vectorizable_condition.
10547         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10548         split out from...
10549         (vect_finish_stmt_generation): ...here.
10550         (vect_finish_replace_stmt): New function.
10551         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10552         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10553         pattern.
10554         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10556 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10557             Alan Hayward  <alan.hayward@arm.com>
10558             David Sherwood  <david.sherwood@arm.com>
10560         * doc/md.texi (extract_last_@var{m}): Document.
10561         * optabs.def (extract_last_optab): New optab.
10562         * internal-fn.def (EXTRACT_LAST): New internal function.
10563         * internal-fn.c (cond_unary_direct): New macro.
10564         (expand_cond_unary_optab_fn): Likewise.
10565         (direct_cond_unary_optab_supported_p): Likewise.
10566         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10567         loops using EXTRACT_LAST.
10568         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10569         (extract_last_<mode>): ...this optab.
10570         (vec_extract<mode><Vel>): Update accordingly.
10572 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10573             Alan Hayward  <alan.hayward@arm.com>
10574             David Sherwood  <david.sherwood@arm.com>
10576         * target.def (empty_mask_is_expensive): New hook.
10577         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10578         * doc/tm.texi: Regenerate.
10579         * targhooks.h (default_empty_mask_is_expensive): Declare.
10580         * targhooks.c (default_empty_mask_is_expensive): New function.
10581         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10582         if the target says that empty masks are expensive.
10583         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10584         New function.
10585         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10587 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10588             Alan Hayward  <alan.hayward@arm.com>
10589             David Sherwood  <david.sherwood@arm.com>
10591         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10592         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10593         (vect_use_loop_mask_for_alignment_p): New function.
10594         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10595         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10596         niters_skip argument.  Make sure that the first niters_skip elements
10597         of the first iteration are inactive.
10598         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10599         Update call to vect_set_loop_masks_directly.
10600         (get_misalign_in_elems): New function, split out from...
10601         (vect_gen_prolog_loop_niters): ...here.
10602         (vect_update_init_of_dr): Take a code argument that specifies whether
10603         the adjustment should be added or subtracted.
10604         (vect_update_init_of_drs): Likewise.
10605         (vect_prepare_for_masked_peels): New function.
10606         (vect_do_peeling): Skip prologue peeling if we're using a mask
10607         instead.  Update call to vect_update_inits_of_drs.
10608         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10609         mask_skip_niters.
10610         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10611         alignment.  Do not include the number of peeled iterations in
10612         the minimum threshold in that case.
10613         (vectorizable_induction): Adjust the start value down by
10614         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10615         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10616         Take the number of skipped iterations into account when calculating
10617         the loop bounds.
10618         * tree-vect-stmts.c (vect_gen_while_not): New function.
10620 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10621             Alan Hayward  <alan.hayward@arm.com>
10622             David Sherwood  <david.sherwood@arm.com>
10624         * doc/sourcebuild.texi (vect_fully_masked): Document.
10625         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10626         default value to 0.
10627         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10628         split out from...
10629         (vect_analyze_loop_2): ...here. Don't check the vectorization
10630         factor against the number of loop iterations if the loop is
10631         fully-masked.
10633 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10634             Alan Hayward  <alan.hayward@arm.com>
10635             David Sherwood  <david.sherwood@arm.com>
10637         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10638         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10639         (dump_groups): Update accordingly.
10640         (iv_use::mem_type): New member variable.
10641         (address_p): New function.
10642         (record_use): Add a mem_type argument and initialize the new
10643         mem_type field.
10644         (record_group_use): Add a mem_type argument.  Use address_p.
10645         Remove obsolete null checks of base_object.  Update call to record_use.
10646         (find_interesting_uses_op): Update call to record_group_use.
10647         (find_interesting_uses_cond): Likewise.
10648         (find_interesting_uses_address): Likewise.
10649         (get_mem_type_for_internal_fn): New function.
10650         (find_address_like_use): Likewise.
10651         (find_interesting_uses_stmt): Try find_address_like_use before
10652         calling find_interesting_uses_op.
10653         (addr_offset_valid_p): Use the iv mem_type field as the type
10654         of the addressed memory.
10655         (add_autoinc_candidates): Likewise.
10656         (get_address_cost): Likewise.
10657         (split_small_address_groups_p): Use address_p.
10658         (split_address_groups): Likewise.
10659         (add_iv_candidate_for_use): Likewise.
10660         (autoinc_possible_for_pair): Likewise.
10661         (rewrite_groups): Likewise.
10662         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10663         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10664         (get_alias_ptr_type_for_ptr_address): New function.
10665         (rewrite_use_address): Rewrite address uses in calls that were
10666         identified by find_address_like_use.
10668 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10669             Alan Hayward  <alan.hayward@arm.com>
10670             David Sherwood  <david.sherwood@arm.com>
10672         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10673         TARGET_MEM_REFs.
10674         * gimple-expr.h (is_gimple_addressable: Likewise.
10675         * gimple-expr.c (is_gimple_address): Likewise.
10676         * internal-fn.c (expand_call_mem_ref): New function.
10677         (expand_mask_load_optab_fn): Use it.
10678         (expand_mask_store_optab_fn): Likewise.
10680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10681             Alan Hayward  <alan.hayward@arm.com>
10682             David Sherwood  <david.sherwood@arm.com>
10684         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10685         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10686         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10687         (cond_umax@var{mode}): Document.
10688         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10689         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10690         (cond_umin_optab, cond_umax_optab): New optabs.
10691         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10692         (COND_IOR, COND_XOR): New internal functions.
10693         * internal-fn.h (get_conditional_internal_fn): Declare.
10694         * internal-fn.c (cond_binary_direct): New macro.
10695         (expand_cond_binary_optab_fn): Likewise.
10696         (direct_cond_binary_optab_supported_p): Likewise.
10697         (get_conditional_internal_fn): New function.
10698         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10699         Cope with reduction statements that are vectorized as calls rather
10700         than assignments.
10701         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10702         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10703         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10704         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10705         (UNSPEC_COND_EOR): New unspecs.
10706         (optab): Add mappings for them.
10707         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10708         (sve_int_op, sve_fp_op): New int attributes.
10710 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10711             Alan Hayward  <alan.hayward@arm.com>
10712             David Sherwood  <david.sherwood@arm.com>
10714         * optabs.def (while_ult_optab): New optab.
10715         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10716         * internal-fn.def (WHILE_ULT): New internal function.
10717         * internal-fn.h (direct_internal_fn_supported_p): New override
10718         that takes two types as argument.
10719         * internal-fn.c (while_direct): New macro.
10720         (expand_while_optab_fn): New function.
10721         (convert_optab_supported_p): Likewise.
10722         (direct_while_optab_supported_p): New macro.
10723         * wide-int.h (wi::udiv_ceil): New function.
10724         * tree-vectorizer.h (rgroup_masks): New structure.
10725         (vec_loop_masks): New typedef.
10726         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10727         and fully_masked_p.
10728         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10729         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10730         (vect_max_vf): New function.
10731         (slpeel_make_loop_iterate_ntimes): Delete.
10732         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10733         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10734         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10735         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10736         internal-fn.h, stor-layout.h and optabs-query.h.
10737         (vect_set_loop_mask): New function.
10738         (add_preheader_seq): Likewise.
10739         (add_header_seq): Likewise.
10740         (interleave_supported_p): Likewise.
10741         (vect_maybe_permute_loop_masks): Likewise.
10742         (vect_set_loop_masks_directly): Likewise.
10743         (vect_set_loop_condition_masked): Likewise.
10744         (vect_set_loop_condition_unmasked): New function, split out from
10745         slpeel_make_loop_iterate_ntimes.
10746         (slpeel_make_loop_iterate_ntimes): Rename to..
10747         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10748         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10749         (vect_do_peeling): Update call accordingly.
10750         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10751         loops.
10752         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10753         mask_compare_type, can_fully_mask_p and fully_masked_p.
10754         (release_vec_loop_masks): New function.
10755         (_loop_vec_info): Use it to free the loop masks.
10756         (can_produce_all_loop_masks_p): New function.
10757         (vect_get_max_nscalars_per_iter): Likewise.
10758         (vect_verify_full_masking): Likewise.
10759         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10760         retries, and free the mask rgroups before retrying.  Check loop-wide
10761         reasons for disallowing fully-masked loops.  Make the final decision
10762         about whether use a fully-masked loop or not.
10763         (vect_estimate_min_profitable_iters): Do not assume that peeling
10764         for the number of iterations will be needed for fully-masked loops.
10765         (vectorizable_reduction): Disable fully-masked loops.
10766         (vectorizable_live_operation): Likewise.
10767         (vect_halve_mask_nunits): New function.
10768         (vect_double_mask_nunits): Likewise.
10769         (vect_record_loop_mask): Likewise.
10770         (vect_get_loop_mask): Likewise.
10771         (vect_transform_loop): Handle the case in which the final loop
10772         iteration might handle a partial vector.  Call vect_set_loop_condition
10773         instead of slpeel_make_loop_iterate_ntimes.
10774         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
10775         (check_load_store_masking): New function.
10776         (prepare_load_store_mask): Likewise.
10777         (vectorizable_store): Handle fully-masked loops.
10778         (vectorizable_load): Likewise.
10779         (supportable_widening_operation): Use vect_halve_mask_nunits for
10780         booleans.
10781         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
10782         (vect_gen_while): New function.
10783         * config/aarch64/aarch64.md (umax<mode>3): New expander.
10784         (aarch64_uqdec<mode>): New insn.
10786 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10787             Alan Hayward  <alan.hayward@arm.com>
10788             David Sherwood  <david.sherwood@arm.com>
10790         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
10791         (reduc_xor_scal_optab): New optabs.
10792         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
10793         (reduc_xor_scal_@var{m}): Document.
10794         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
10795         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
10796         internal functions.
10797         * fold-const-call.c (fold_const_call): Handle them.
10798         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
10799         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
10800         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
10801         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
10802         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
10803         (UNSPEC_XORV): New unspecs.
10804         (optab): Add entries for them.
10805         (BITWISEV): New int iterator.
10806         (bit_reduc_op): New int attributes.
10808 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10809             Alan Hayward  <alan.hayward@arm.com>
10810             David Sherwood  <david.sherwood@arm.com>
10812         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10813         * internal-fn.def (VEC_SHL_INSERT): New internal function.
10814         * optabs.def (vec_shl_insert_optab): New optab.
10815         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10816         (duplicate_and_interleave): Likewise.
10817         * tree-vect-loop.c: Include internal-fn.h.
10818         (neutral_op_for_slp_reduction): New function, split out from
10819         get_initial_defs_for_reduction.
10820         (get_initial_def_for_reduction): Handle option 2 for variable-length
10821         vectors by loading the neutral value into a vector and then shifting
10822         the initial value into element 0.
10823         (get_initial_defs_for_reduction): Replace the code argument with
10824         the neutral value calculated by neutral_op_for_slp_reduction.
10825         Use gimple_build_vector for constant-length vectors.
10826         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10827         but the first group_size elements have a neutral value.
10828         Use duplicate_and_interleave otherwise.
10829         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10830         Update call to get_initial_defs_for_reduction.  Handle SLP
10831         reductions for variable-length vectors by creating one vector
10832         result for each scalar result, with the elements associated
10833         with other scalar results stubbed out with the neutral value.
10834         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10835         Require IFN_VEC_SHL_INSERT for double reductions on
10836         variable-length vectors, or SLP reductions that have
10837         a neutral value.  Require can_duplicate_and_interleave_p
10838         support for variable-length unchained SLP reductions if there
10839         is no neutral value, such as for MIN/MAX reductions.  Also require
10840         the number of vector elements to be a multiple of the number of
10841         SLP statements when doing variable-length unchained SLP reductions.
10842         Update call to vect_create_epilog_for_reduction.
10843         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10844         and remove initial values.
10845         (duplicate_and_interleave): Make public.
10846         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10847         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10849 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10850             Alan Hayward  <alan.hayward@arm.com>
10851             David Sherwood  <david.sherwood@arm.com>
10853         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10854         (can_duplicate_and_interleave_p): New function.
10855         (vect_get_and_check_slp_defs): Take the vector of statements
10856         rather than just the current one.  Remove excess parentheses.
10857         Restriction rejectinon of vect_constant_def and vect_external_def
10858         for variable-length vectors to boolean types, or types for which
10859         can_duplicate_and_interleave_p is false.
10860         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10861         (duplicate_and_interleave): New function.
10862         (vect_get_constant_vectors): Use gimple_build_vector for
10863         constant-length vectors and suitable variable-length constant
10864         vectors.  Use duplicate_and_interleave for other variable-length
10865         vectors.  Don't defer the update when inserting new statements.
10867 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10868             Alan Hayward  <alan.hayward@arm.com>
10869             David Sherwood  <david.sherwood@arm.com>
10871         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10872         min_profitable_iters doesn't go negative.
10874 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10875             Alan Hayward  <alan.hayward@arm.com>
10876             David Sherwood  <david.sherwood@arm.com>
10878         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10879         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10880         * optabs.def (vec_mask_load_lanes_optab): New optab.
10881         (vec_mask_store_lanes_optab): Likewise.
10882         * internal-fn.def (MASK_LOAD_LANES): New internal function.
10883         (MASK_STORE_LANES): Likewise.
10884         * internal-fn.c (mask_load_lanes_direct): New macro.
10885         (mask_store_lanes_direct): Likewise.
10886         (expand_mask_load_optab_fn): Handle masked operations.
10887         (expand_mask_load_lanes_optab_fn): New macro.
10888         (expand_mask_store_optab_fn): Handle masked operations.
10889         (expand_mask_store_lanes_optab_fn): New macro.
10890         (direct_mask_load_lanes_optab_supported_p): Likewise.
10891         (direct_mask_store_lanes_optab_supported_p): Likewise.
10892         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10893         parameter.
10894         (vect_load_lanes_supported): Likewise.
10895         * tree-vect-data-refs.c (strip_conversion): New function.
10896         (can_group_stmts_p): Likewise.
10897         (vect_analyze_data_ref_accesses): Use it instead of checking
10898         for a pair of assignments.
10899         (vect_store_lanes_supported): Take a masked_p parameter.
10900         (vect_load_lanes_supported): Likewise.
10901         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10902         vect_store_lanes_supported and vect_load_lanes_supported.
10903         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10904         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10905         parameter.  Don't allow gaps for masked accesses.
10906         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
10907         and vect_load_lanes_supported.
10908         (get_load_store_type): Take a masked_p parameter and update
10909         call to get_group_load_store_type.
10910         (vectorizable_store): Update call to get_load_store_type.
10911         Handle IFN_MASK_STORE_LANES.
10912         (vectorizable_load): Update call to get_load_store_type.
10913         Handle IFN_MASK_LOAD_LANES.
10915 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10916             Alan Hayward  <alan.hayward@arm.com>
10917             David Sherwood  <david.sherwood@arm.com>
10919         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10920         modes for SVE.
10921         * config/aarch64/aarch64-protos.h
10922         (aarch64_sve_struct_memory_operand_p): Declare.
10923         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10924         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10925         (VPRED, vpred): Handle SVE structure modes.
10926         * config/aarch64/constraints.md (Utx): New constraint.
10927         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10928         (aarch64_sve_struct_nonimmediate_operand): New predicates.
10929         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10930         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10931         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10932         structure modes.  Split into pieces after RA.
10933         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10934         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10935         New patterns.
10936         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10937         SVE structure modes.
10938         (aarch64_classify_address): Likewise.
10939         (sizetochar): Move earlier in file.
10940         (aarch64_print_operand): Handle SVE register lists.
10941         (aarch64_array_mode): New function.
10942         (aarch64_sve_struct_memory_operand_p): Likewise.
10943         (TARGET_ARRAY_MODE): Redefine.
10945 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10946             Alan Hayward  <alan.hayward@arm.com>
10947             David Sherwood  <david.sherwood@arm.com>
10949         * target.def (array_mode): New target hook.
10950         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10951         * doc/tm.texi: Regenerate.
10952         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10953         * hooks.c (hook_optmode_mode_uhwi_none): New function.
10954         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10955         targetm.array_mode.
10956         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
10957         type sizes.
10959 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10960             Alan Hayward  <alan.hayward@arm.com>
10961             David Sherwood  <david.sherwood@arm.com>
10963         * fold-const.c (fold_binary_loc): Check the argument types
10964         rather than the result type when testing for a vector operation.
10966 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10968         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10969         * doc/tm.texi: Regenerate.
10971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10972             Alan Hayward  <alan.hayward@arm.com>
10973             David Sherwood  <david.sherwood@arm.com>
10975         * doc/invoke.texi (-msve-vector-bits=): Document new option.
10976         (sve): Document new AArch64 extension.
10977         * doc/md.texi (w): Extend the description of the AArch64
10978         constraint to include SVE vectors.
10979         (Upl, Upa): Document new AArch64 predicate constraints.
10980         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10981         enum.
10982         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10983         (msve-vector-bits=): New option.
10984         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10985         SVE when these are disabled.
10986         (sve): New extension.
10987         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10988         modes.  Adjust their number of units based on aarch64_sve_vg.
10989         (MAX_BITSIZE_MODE_ANY_MODE): Define.
10990         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10991         aarch64_addr_query_type.
10992         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10993         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10994         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10995         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10996         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10997         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10998         (aarch64_simd_imm_zero_p): Delete.
10999         (aarch64_check_zero_based_sve_index_immediate): Declare.
11000         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11001         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11002         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11003         (aarch64_sve_float_mul_immediate_p): Likewise.
11004         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11005         rather than an rtx.
11006         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11007         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11008         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11009         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11010         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11011         (aarch64_regmode_natural_size): Likewise.
11012         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11013         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11014         left one place.
11015         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11016         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11017         for VG and the SVE predicate registers.
11018         (V_ALIASES): Add a "z"-prefixed alias.
11019         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11020         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11021         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11022         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11023         (REG_CLASS_NAMES): Add entries for them.
11024         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11025         and the predicate registers.
11026         (aarch64_sve_vg): Declare.
11027         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11028         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11029         (REGMODE_NATURAL_SIZE): Define.
11030         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11031         SVE macros.
11032         * config/aarch64/aarch64.c: Include cfgrtl.h.
11033         (simd_immediate_info): Add a constructor for series vectors,
11034         and an associated step field.
11035         (aarch64_sve_vg): New variable.
11036         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11037         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11038         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11039         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11040         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11041         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11042         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11043         (aarch64_get_mask_mode): New functions.
11044         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11045         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11046         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11047         predicate modes and predicate registers.  Explicitly restrict
11048         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11049         to store a vector mode if it is recognized by
11050         aarch64_classify_vector_mode.
11051         (aarch64_regmode_natural_size): New function.
11052         (aarch64_hard_regno_caller_save_mode): Return the original mode
11053         for predicates.
11054         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11055         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11056         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11057         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11058         functions.
11059         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11060         does not overlap dest if the function is frame-related.  Handle
11061         SVE constants.
11062         (aarch64_split_add_offset): New function.
11063         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11064         them aarch64_add_offset.
11065         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11066         and update call to aarch64_sub_sp.
11067         (aarch64_add_cfa_expression): New function.
11068         (aarch64_expand_prologue): Pass extra temporary registers to the
11069         functions above.  Handle the case in which we need to emit new
11070         DW_CFA_expressions for registers that were originally saved
11071         relative to the stack pointer, but now have to be expressed
11072         relative to the frame pointer.
11073         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11074         functions above.
11075         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11076         IP0 and IP1 values for SVE frames.
11077         (aarch64_expand_vec_series): New function.
11078         (aarch64_expand_sve_widened_duplicate): Likewise.
11079         (aarch64_expand_sve_const_vector): Likewise.
11080         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11081         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11082         into the register, rather than emitting a SET directly.
11083         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11084         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11085         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11086         (offset_9bit_signed_scaled_p): New functions.
11087         (aarch64_replicate_bitmask_imm): New function.
11088         (aarch64_bitmask_imm): Use it.
11089         (aarch64_cannot_force_const_mem): Reject expressions involving
11090         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11091         (aarch64_classify_index): Handle SVE indices, by requiring
11092         a plain register index with a scale that matches the element size.
11093         (aarch64_classify_address): Handle SVE addresses.  Assert that
11094         the mode of the address is VOIDmode or an integer mode.
11095         Update call to aarch64_classify_symbol.
11096         (aarch64_classify_symbolic_expression): Update call to
11097         aarch64_classify_symbol.
11098         (aarch64_const_vec_all_in_range_p): New function.
11099         (aarch64_print_vector_float_operand): Likewise.
11100         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11101         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11102         and the FP immediates 1.0 and 0.5.
11103         (aarch64_print_address_internal): Handle SVE addresses.
11104         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11105         (aarch64_regno_regclass): Handle predicate registers.
11106         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11107         data modes.
11108         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11109         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11110         (aarch64_convert_sve_vector_bits): New function.
11111         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11112         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11113         rather than an rtx.
11114         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11115         Handle SVE vector and predicate modes.  Accept VL-based constants
11116         that need only one temporary register, and VL offsets that require
11117         no temporary registers.
11118         (aarch64_conditional_register_usage): Mark the predicate registers
11119         as fixed if SVE isn't available.
11120         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11121         Return true for SVE vector and predicate modes.
11122         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11123         rather than an unsigned int.  Handle SVE modes.
11124         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11125         SVE modes.
11126         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11127         if SVE is enabled.
11128         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11129         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11130         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11131         (aarch64_sve_float_mul_immediate_p): New functions.
11132         (aarch64_sve_valid_immediate): New function.
11133         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11134         Explicitly reject structure modes.  Check for INDEX constants.
11135         Handle PTRUE and PFALSE constants.
11136         (aarch64_check_zero_based_sve_index_immediate): New function.
11137         (aarch64_simd_imm_zero_p): Delete.
11138         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11139         vector modes.  Accept constants in the range of CNT[BHWD].
11140         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11141         ask for an Advanced SIMD mode.
11142         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11143         (aarch64_simd_vector_alignment): Handle SVE predicates.
11144         (aarch64_vectorize_preferred_vector_alignment): New function.
11145         (aarch64_simd_vector_alignment_reachable): Use it instead of
11146         the vector size.
11147         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11148         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11149         functions.
11150         (MAX_VECT_LEN): Delete.
11151         (expand_vec_perm_d): Add a vec_flags field.
11152         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11153         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11154         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11155         for SVE modes.
11156         (aarch64_evpc_rev): Rename to...
11157         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11158         (aarch64_evpc_rev_global): New function.
11159         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11160         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11161         MAX_VECT_LEN.
11162         (aarch64_evpc_sve_tbl): New function.
11163         (aarch64_expand_vec_perm_const_1): Update after rename of
11164         aarch64_evpc_rev.  Handle SVE permutes too, trying
11165         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11166         than aarch64_evpc_tbl.
11167         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11168         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11169         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11170         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11171         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11172         (aarch64_expand_sve_vcond): New functions.
11173         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11174         of aarch64_vector_mode_p.
11175         (aarch64_dwarf_poly_indeterminate_value): New function.
11176         (aarch64_compute_pressure_classes): Likewise.
11177         (aarch64_can_change_mode_class): Likewise.
11178         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11179         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11180         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11181         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11182         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11183         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11184         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11185         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11186         constraints.
11187         (Dn, Dl, Dr): Accept const as well as const_vector.
11188         (Dz): Likewise.  Compare against CONST0_RTX.
11189         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11190         of "vector" where appropriate.
11191         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11192         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11193         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11194         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11195         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11196         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11197         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11198         (v_int_equiv): Extend to SVE modes.
11199         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11200         mode attributes.
11201         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11202         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11203         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11204         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11205         (SVE_COND_FP_CMP): New int iterators.
11206         (perm_hilo): Handle the new unpack unspecs.
11207         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11208         attributes.
11209         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11210         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11211         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11212         (aarch64_equality_operator, aarch64_constant_vector_operand)
11213         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11214         (aarch64_sve_nonimmediate_operand): Likewise.
11215         (aarch64_sve_general_operand): Likewise.
11216         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11217         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11218         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11219         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11220         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11221         (aarch64_sve_float_arith_immediate): Likewise.
11222         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11223         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11224         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11225         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11226         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11227         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11228         (aarch64_sve_float_arith_operand): Likewise.
11229         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11230         (aarch64_sve_float_mul_operand): Likewise.
11231         (aarch64_sve_vec_perm_operand): Likewise.
11232         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11233         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11234         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11235         as well as const_vector.
11236         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11237         in file.  Use CONST0_RTX and CONSTM1_RTX.
11238         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11239         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11240         Use aarch64_simd_imm_zero.
11241         * config/aarch64/aarch64-sve.md: New file.
11242         * config/aarch64/aarch64.md: Include it.
11243         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11244         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11245         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11246         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11247         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11248         (sve): New attribute.
11249         (enabled): Disable instructions with the sve attribute unless
11250         TARGET_SVE.
11251         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11252         aarch64_expand_mov_immediate.
11253         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11254         CNT[BHSD] immediates.
11255         (movti): Split CONST_POLY_INT moves into two halves.
11256         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11257         Split additions that need a temporary here if the destination
11258         is the stack pointer.
11259         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11260         (*add<mode>3_poly_1): New instruction.
11261         (set_clobber_cc): New expander.
11263 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11265         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11266         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11267         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11268         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11269         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11270         Change innermode from fixed_mode_size to machine_mode.
11271         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11272         subreg of a variable-length CONST_VECTOR.
11274 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11275             Alan Hayward  <alan.hayward@arm.com>
11276             David Sherwood  <david.sherwood@arm.com>
11278         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11279         (add_offset_to_base): New function, split out from...
11280         (create_mem_ref): ...here.  When handling a scale other than 1,
11281         check first whether the address is valid without the offset.
11282         Add it into the base if so, leaving the index and scale as-is.
11284 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11286         PR c++/83778
11287         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11288         fold_for_warn before checking if arg2 is INTEGER_CST.
11290 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11292         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11293         (store_multiple_operation): Delete.
11294         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11295         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11296         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11297         guarded by TARGET_STRING.
11298         (rs6000_output_load_multiple): Delete.
11299         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11300         OPTION_MASK_STRING / TARGET_STRING handling.
11301         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11302         (const rs6000_opt_masks) <"string">: Change mask to 0.
11303         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11304         (MASK_STRING): Delete.
11305         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11306         parts.  Simplify.
11307         (load_multiple): Delete.
11308         (*ldmsi8): Delete.
11309         (*ldmsi7): Delete.
11310         (*ldmsi6): Delete.
11311         (*ldmsi5): Delete.
11312         (*ldmsi4): Delete.
11313         (*ldmsi3): Delete.
11314         (store_multiple): Delete.
11315         (*stmsi8): Delete.
11316         (*stmsi7): Delete.
11317         (*stmsi6): Delete.
11318         (*stmsi5): Delete.
11319         (*stmsi4): Delete.
11320         (*stmsi3): Delete.
11321         (movmemsi_8reg): Delete.
11322         (corresponding unnamed define_insn): Delete.
11323         (movmemsi_6reg): Delete.
11324         (corresponding unnamed define_insn): Delete.
11325         (movmemsi_4reg): Delete.
11326         (corresponding unnamed define_insn): Delete.
11327         (movmemsi_2reg): Delete.
11328         (corresponding unnamed define_insn): Delete.
11329         (movmemsi_1reg): Delete.
11330         (corresponding unnamed define_insn): Delete.
11331         * config/rs6000/rs6000.opt (mno-string): New.
11332         (mstring): Replace by deprecation warning stub.
11333         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11335 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11337         * regrename.c (regrename_do_replace): If replacing the same
11338         reg multiple times, try to reuse last created gen_raw_REG.
11340         PR debug/81155
11341         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11342         main to workaround a bug in GDB.
11344 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11346         PR target/83737
11347         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11349 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11351         PR rtl-optimization/80481
11352         * ira-color.c (get_cap_member): New function.
11353         (allocnos_conflict_by_live_ranges_p): Use it.
11354         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11355         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11357 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11359         PR target/83628
11360         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11361         (*saddl_se_1): Ditto.
11362         (*ssubsi_1): Ditto.
11363         (*ssubl_se_1): Ditto.
11365 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11367         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11368         rather than wi::to_widest for DR_INITs.
11369         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11370         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11371         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11372         INTEGER_CSTs.
11373         (vect_analyze_group_access_1): Note that here.
11375 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11377         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11378         polynomial type sizes.
11380 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11382         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11383         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11384         (gimple_add_tmp_var): Likewise.
11386 2018-01-12  Martin Liska  <mliska@suse.cz>
11388         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11389         (gimple_alloc_sizes): Likewise.
11390         (dump_gimple_statistics): Use PRIu64 in printf format.
11391         * gimple.h: Change uint64_t to int.
11393 2018-01-12  Martin Liska  <mliska@suse.cz>
11395         * tree-core.h: Use uint64_t instead of int.
11396         * tree.c (tree_node_counts): Likewise.
11397         (tree_node_sizes): Likewise.
11398         (dump_tree_statistics): Use PRIu64 in printf format.
11400 2018-01-12  Martin Liska  <mliska@suse.cz>
11402         * Makefile.in: As qsort_chk is implemented in vec.c, add
11403         vec.o to linkage of gencfn-macros.
11404         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11405         passing the info to record_node_allocation_statistics.
11406         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11407         and pass the info.
11408         * ggc-common.c (struct ggc_usage): Add operator== and use
11409         it in operator< and compare function.
11410         * mem-stats.h (struct mem_usage): Likewise.
11411         * vec.c (struct vec_usage): Remove operator< and compare
11412         function. Can be simply inherited.
11414 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11416         PR target/81616
11417         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11418         * tree-ssa-math-opts.c: Include domwalk.h.
11419         (convert_mult_to_fma_1): New function.
11420         (fma_transformation_info): New type.
11421         (fma_deferring_state): Likewise.
11422         (cancel_fma_deferring): New function.
11423         (result_of_phi): Likewise.
11424         (last_fma_candidate_feeds_initial_phi): Likewise.
11425         (convert_mult_to_fma): Added deferring logic, split actual
11426         transformation to convert_mult_to_fma_1.
11427         (math_opts_dom_walker): New type.
11428         (math_opts_dom_walker::after_dom_children): New method, body moved
11429         here from pass_optimize_widening_mul::execute, added deferring logic
11430         bits.
11431         (pass_optimize_widening_mul::execute): Moved most of code to
11432         math_opts_dom_walker::after_dom_children.
11433         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11434         * config/i386/i386.c (ix86_option_override_internal): Added
11435         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11437 2018-01-12  Richard Biener  <rguenther@suse.de>
11439         PR debug/83157
11440         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11441         inline instance vars.
11443 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11445         PR target/81819
11446         * config/rx/rx.c (rx_is_restricted_memory_address):
11447         Handle SUBREG case.
11449 2018-01-12  Richard Biener  <rguenther@suse.de>
11451         PR tree-optimization/80846
11452         * target.def (split_reduction): New target hook.
11453         * targhooks.c (default_split_reduction): New function.
11454         * targhooks.h (default_split_reduction): Declare.
11455         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11456         target requests first reduce vectors by combining low and high
11457         parts.
11458         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11459         (get_vectype_for_scalar_type_and_size): Export.
11460         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11461         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11462         * doc/tm.texi: Regenerate.
11463         * config/i386/i386.c (ix86_split_reduction): Implement
11464         TARGET_VECTORIZE_SPLIT_REDUCTION.
11466 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11468         PR target/83368
11469         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11470         in PIC mode except for TARGET_VXWORKS_RTP.
11471         * config/sparc/sparc.c: Include cfgrtl.h.
11472         (TARGET_INIT_PIC_REG): Define.
11473         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11474         (sparc_pic_register_p): New predicate.
11475         (sparc_legitimate_address_p): Use it.
11476         (sparc_legitimize_pic_address): Likewise.
11477         (sparc_delegitimize_address): Likewise.
11478         (sparc_mode_dependent_address_p): Likewise.
11479         (gen_load_pcrel_sym): Remove 4th parameter.
11480         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11481         (sparc_expand_prologue): Do not call load_got_register here.
11482         (sparc_flat_expand_prologue): Likewise.
11483         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11484         (sparc_use_pseudo_pic_reg): New function.
11485         (sparc_init_pic_reg): Likewise.
11486         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11487         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11489 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11491         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11492         Add item for branch_cost.
11494 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11496         PR rtl-optimization/83565
11497         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11498         not extend the result to a larger mode for rotate operations.
11499         (num_sign_bit_copies1): Likewise.
11501 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11503         PR target/40411
11504         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11505         -symbolic.
11506         Use values-Xc.o for -pedantic.
11507         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11509 2018-01-12  Martin Liska  <mliska@suse.cz>
11511         PR ipa/83054
11512         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11513         New function.
11514         (possible_polymorphic_call_targets): Use it.
11515         (ipa_devirt): Likewise.
11517 2018-01-12  Martin Liska  <mliska@suse.cz>
11519         * profile-count.h (enum profile_quality): Use 0 as invalid
11520         enum value of profile_quality.
11522 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11524         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11525         -mext-string options.
11527 2018-01-12  Richard Biener  <rguenther@suse.de>
11529         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11530         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11531         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11532         Likewise.
11533         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11535 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11537         * configure.ac (--with-long-double-format): Add support for the
11538         configuration option to change the default long double format on
11539         PowerPC systems.
11540         * config.gcc (powerpc*-linux*-*): Likewise.
11541         * configure: Regenerate.
11542         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11543         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11544         used without modification.
11546 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11548         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11549         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11550         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11551         MISC_BUILTIN_SPEC_BARRIER.
11552         (rs6000_init_builtins): Likewise.
11553         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11554         enum value.
11555         (speculation_barrier): New define_insn.
11556         * doc/extend.texi: Document __builtin_speculation_barrier.
11558 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11560         PR target/83203
11561         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11562         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11563         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11564         iterators.
11565         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11566         integral modes instead of "ss" and "sd".
11567         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11568         vectors with 32-bit and 64-bit elements.
11569         (vecdupssescalarmodesuffix): New mode attribute.
11570         (vec_dup<mode>): Use it.
11572 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11574         PR target/83330
11575         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11576         frame if argument is passed on stack.
11578 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11580         PR target/82682
11581         * ree.c (combine_reaching_defs): Optimize also
11582         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11583         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11585 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11587         PR middle-end/83189
11588         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11590 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11592         PR middle-end/83718
11593         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11594         after they are computed.
11596 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11598         PR tree-optimization/83695
11599         * gimple-loop-linterchange.cc
11600         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11601         reset cached scev information after interchange.
11602         (pass_linterchange::execute): Remove call to scev_reset_htab.
11604 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11606         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11607         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11608         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11609         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11610         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11611         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11612         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11613         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11614         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11615         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11616         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11617         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11618         (V_lane_reg): Likewise.
11619         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11620         New define_expand.
11621         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11622         (vfmal_lane_low<mode>_intrinsic,
11623         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11624         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11625         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11626         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11627         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11628         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11630 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11632         * config/arm/arm-cpus.in (fp16fml): New feature.
11633         (ALL_SIMD): Add fp16fml.
11634         (armv8.2-a): Add fp16fml as an option.
11635         (armv8.3-a): Likewise.
11636         (armv8.4-a): Add fp16fml as part of fp16.
11637         * config/arm/arm.h (TARGET_FP16FML): Define.
11638         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11639         when appropriate.
11640         * config/arm/arm-modes.def (V2HF): Define.
11641         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11642         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11643         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11644         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11645         vfmsl_low, vfmsl_high): New set of builtins.
11646         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11647         (vfml_op): New code attribute.
11648         (VFMLHALVES): New int iterator.
11649         (VFML, VFMLSEL): New mode attributes.
11650         (V_reg): Define mapping for V2HF.
11651         (V_hi, V_lo): New mode attributes.
11652         (VF_constraint): Likewise.
11653         (vfml_half, vfml_half_selector): New int attributes.
11654         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11655         define_expand.
11656         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11657         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11658         New define_insn.
11659         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11660         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11661         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11662         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11663         documentation.
11664         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11665         Document new effective target and option set.
11667 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11669         * config/arm/arm-cpus.in (armv8_4): New feature.
11670         (ARMv8_4a): New fgroup.
11671         (armv8.4-a): New arch.
11672         * config/arm/arm-tables.opt: Regenerate.
11673         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11674         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11675         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11676         Add matching rules for -march=armv8.4-a and extensions.
11677         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11679 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11681         PR target/81821
11682         * config/rx/rx.md (BW): New mode attribute.
11683         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11685 2018-01-11  Richard Biener  <rguenther@suse.de>
11687         PR tree-optimization/83435
11688         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11689         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11690         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11692 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11693             Alan Hayward  <alan.hayward@arm.com>
11694             David Sherwood  <david.sherwood@arm.com>
11696         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11697         field.
11698         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11699         (aarch64_print_address_internal): Use it to check for a zero offset.
11701 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11702             Alan Hayward  <alan.hayward@arm.com>
11703             David Sherwood  <david.sherwood@arm.com>
11705         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11706         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11707         Return a poly_int64 rather than a HOST_WIDE_INT.
11708         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11709         rather than a HOST_WIDE_INT.
11710         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11711         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11712         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11713         final_offset from HOST_WIDE_INT to poly_int64.
11714         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11715         to_constant when getting the number of units in an Advanced SIMD
11716         mode.
11717         (aarch64_builtin_vectorized_function): Check for a constant number
11718         of units.
11719         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11720         GET_MODE_SIZE.
11721         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11722         attribute instead of GET_MODE_NUNITS.
11723         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11724         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11725         GET_MODE_SIZE for fixed-size registers.
11726         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11727         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11728         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11729         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11730         (aarch64_print_operand, aarch64_print_address_internal)
11731         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11732         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11733         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11734         Handle polynomial GET_MODE_SIZE.
11735         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11736         wider than SImode without modification.
11737         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11738         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11739         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11740         passing and returning SVE modes.
11741         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11742         rather than GEN_INT.
11743         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11744         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11745         (aarch64_allocate_and_probe_stack_space): Likewise.
11746         (aarch64_layout_frame): Cope with polynomial offsets.
11747         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11748         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11749         polynomial offsets.
11750         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11751         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11752         poly_int64 rather than a HOST_WIDE_INT.
11753         (aarch64_get_separate_components, aarch64_process_components)
11754         (aarch64_expand_prologue, aarch64_expand_epilogue)
11755         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11756         (aarch64_anchor_offset): New function, split out from...
11757         (aarch64_legitimize_address): ...here.
11758         (aarch64_builtin_vectorization_cost): Handle polynomial
11759         TYPE_VECTOR_SUBPARTS.
11760         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11761         GET_MODE_NUNITS.
11762         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
11763         number of elements from the PARALLEL rather than the mode.
11764         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
11765         rather than GET_MODE_BITSIZE.
11766         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
11767         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
11768         (aarch64_expand_vec_perm_const_1): Handle polynomial
11769         d->perm.length () and d->perm elements.
11770         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
11771         Apply to_constant to d->perm elements.
11772         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
11773         polynomial CONST_VECTOR_NUNITS.
11774         (aarch64_move_pointer): Take amount as a poly_int64 rather
11775         than an int.
11776         (aarch64_progress_pointer): Avoid temporary variable.
11777         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
11778         the mode attribute instead of GET_MODE.
11780 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11781             Alan Hayward  <alan.hayward@arm.com>
11782             David Sherwood  <david.sherwood@arm.com>
11784         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
11785         x exists before using it.
11786         (aarch64_add_constant_internal): Rename to...
11787         (aarch64_add_offset_1): ...this.  Replace regnum with separate
11788         src and dest rtxes.  Handle the case in which they're different,
11789         including when the offset is zero.  Replace scratchreg with an rtx.
11790         Use 2 additions if there is no spare register into which we can
11791         move a 16-bit constant.
11792         (aarch64_add_constant): Delete.
11793         (aarch64_add_offset): Replace reg with separate src and dest
11794         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
11795         Use aarch64_add_offset_1.
11796         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
11797         an rtx rather than an int.  Take the delta as a poly_int64
11798         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
11799         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
11800         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
11801         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
11802         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
11803         and aarch64_add_sp.
11804         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
11805         aarch64_add_constant.
11807 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11809         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11810         Use scalar_float_mode.
11812 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11814         * config/aarch64/aarch64-simd.md
11815         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11816         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11817         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11818         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11819         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11820         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11821         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11822         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11823         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11824         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11826 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11828         PR target/83514
11829         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11830         targ_options->x_arm_arch_string is non NULL.
11832 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
11834         * config/aarch64/aarch64.h
11835         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
11837 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
11839         PR target/82096
11840         * expmed.c (emit_store_flag_force): Swap if const op0
11841         and change VOIDmode to mode of op0.
11843 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11845         PR rtl-optimization/83761
11846         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11847         than bytes to mode_for_size.
11849 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11851         PR middle-end/83189
11852         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11853         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11854         profile.
11856 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11858         PR middle-end/83575
11859         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11860         when in layout mode.
11861         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11862         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11863         partition fixup.
11865 2018-01-10  Michael Collison  <michael.collison@arm.com>
11867         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11868         * config/aarch64/aarch64-option-extension.def: Add
11869         AARCH64_OPT_EXTENSION of 'fp16fml'.
11870         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11871         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11872         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11873         * config/aarch64/constraints.md (Ui7): New constraint.
11874         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11875         (VFMLA_SEL_W): Ditto.
11876         (f16quad): Ditto.
11877         (f16mac1): Ditto.
11878         (VFMLA16_LOW): New int iterator.
11879         (VFMLA16_HIGH): Ditto.
11880         (UNSPEC_FMLAL): New unspec.
11881         (UNSPEC_FMLSL): Ditto.
11882         (UNSPEC_FMLAL2): Ditto.
11883         (UNSPEC_FMLSL2): Ditto.
11884         (f16mac): New code attribute.
11885         * config/aarch64/aarch64-simd-builtins.def
11886         (aarch64_fmlal_lowv2sf): Ditto.
11887         (aarch64_fmlsl_lowv2sf): Ditto.
11888         (aarch64_fmlalq_lowv4sf): Ditto.
11889         (aarch64_fmlslq_lowv4sf): Ditto.
11890         (aarch64_fmlal_highv2sf): Ditto.
11891         (aarch64_fmlsl_highv2sf): Ditto.
11892         (aarch64_fmlalq_highv4sf): Ditto.
11893         (aarch64_fmlslq_highv4sf): Ditto.
11894         (aarch64_fmlal_lane_lowv2sf): Ditto.
11895         (aarch64_fmlsl_lane_lowv2sf): Ditto.
11896         (aarch64_fmlal_laneq_lowv2sf): Ditto.
11897         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11898         (aarch64_fmlalq_lane_lowv4sf): Ditto.
11899         (aarch64_fmlsl_lane_lowv4sf): Ditto.
11900         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11901         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11902         (aarch64_fmlal_lane_highv2sf): Ditto.
11903         (aarch64_fmlsl_lane_highv2sf): Ditto.
11904         (aarch64_fmlal_laneq_highv2sf): Ditto.
11905         (aarch64_fmlsl_laneq_highv2sf): Ditto.
11906         (aarch64_fmlalq_lane_highv4sf): Ditto.
11907         (aarch64_fmlsl_lane_highv4sf): Ditto.
11908         (aarch64_fmlalq_laneq_highv4sf): Ditto.
11909         (aarch64_fmlsl_laneq_highv4sf): Ditto.
11910         * config/aarch64/aarch64-simd.md:
11911         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11912         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11913         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11914         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11915         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11916         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11917         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11918         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11919         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11920         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11921         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11922         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11923         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11924         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11925         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11926         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11927         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11928         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11929         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11930         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11931         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11932         (vfmlsl_low_u32): Ditto.
11933         (vfmlalq_low_u32): Ditto.
11934         (vfmlslq_low_u32): Ditto.
11935         (vfmlal_high_u32): Ditto.
11936         (vfmlsl_high_u32): Ditto.
11937         (vfmlalq_high_u32): Ditto.
11938         (vfmlslq_high_u32): Ditto.
11939         (vfmlal_lane_low_u32): Ditto.
11940         (vfmlsl_lane_low_u32): Ditto.
11941         (vfmlal_laneq_low_u32): Ditto.
11942         (vfmlsl_laneq_low_u32): Ditto.
11943         (vfmlalq_lane_low_u32): Ditto.
11944         (vfmlslq_lane_low_u32): Ditto.
11945         (vfmlalq_laneq_low_u32): Ditto.
11946         (vfmlslq_laneq_low_u32): Ditto.
11947         (vfmlal_lane_high_u32): Ditto.
11948         (vfmlsl_lane_high_u32): Ditto.
11949         (vfmlal_laneq_high_u32): Ditto.
11950         (vfmlsl_laneq_high_u32): Ditto.
11951         (vfmlalq_lane_high_u32): Ditto.
11952         (vfmlslq_lane_high_u32): Ditto.
11953         (vfmlalq_laneq_high_u32): Ditto.
11954         (vfmlslq_laneq_high_u32): Ditto.
11955         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11956         (AARCH64_FL_FOR_ARCH8_4): New.
11957         (AARCH64_ISA_F16FML): New ISA flag.
11958         (TARGET_F16FML): New feature flag for fp16fml.
11959         (doc/invoke.texi): Document new fp16fml option.
11961 2018-01-10  Michael Collison  <michael.collison@arm.com>
11963         * config/aarch64/aarch64-builtins.c:
11964         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11965         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11966         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11967         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11968         (AARCH64_ISA_SHA3): New ISA flag.
11969         (TARGET_SHA3): New feature flag for sha3.
11970         * config/aarch64/iterators.md (sha512_op): New int attribute.
11971         (CRYPTO_SHA512): New int iterator.
11972         (UNSPEC_SHA512H): New unspec.
11973         (UNSPEC_SHA512H2): Ditto.
11974         (UNSPEC_SHA512SU0): Ditto.
11975         (UNSPEC_SHA512SU1): Ditto.
11976         * config/aarch64/aarch64-simd-builtins.def
11977         (aarch64_crypto_sha512hqv2di): New builtin.
11978         (aarch64_crypto_sha512h2qv2di): Ditto.
11979         (aarch64_crypto_sha512su0qv2di): Ditto.
11980         (aarch64_crypto_sha512su1qv2di): Ditto.
11981         (aarch64_eor3qv8hi): Ditto.
11982         (aarch64_rax1qv2di): Ditto.
11983         (aarch64_xarqv2di): Ditto.
11984         (aarch64_bcaxqv8hi): Ditto.
11985         * config/aarch64/aarch64-simd.md:
11986         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11987         (aarch64_crypto_sha512su0qv2di): Ditto.
11988         (aarch64_crypto_sha512su1qv2di): Ditto.
11989         (aarch64_eor3qv8hi): Ditto.
11990         (aarch64_rax1qv2di): Ditto.
11991         (aarch64_xarqv2di): Ditto.
11992         (aarch64_bcaxqv8hi): Ditto.
11993         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11994         (vsha512h2q_u64): Ditto.
11995         (vsha512su0q_u64): Ditto.
11996         (vsha512su1q_u64): Ditto.
11997         (veor3q_u16): Ditto.
11998         (vrax1q_u64): Ditto.
11999         (vxarq_u64): Ditto.
12000         (vbcaxq_u16): Ditto.
12001         * config/arm/types.md (crypto_sha512): New type attribute.
12002         (crypto_sha3): Ditto.
12003         (doc/invoke.texi): Document new sha3 option.
12005 2018-01-10  Michael Collison  <michael.collison@arm.com>
12007         * config/aarch64/aarch64-builtins.c:
12008         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12009         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12010         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12011         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12012         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12013         (AARCH64_ISA_SM4): New ISA flag.
12014         (TARGET_SM4): New feature flag for sm4.
12015         * config/aarch64/aarch64-simd-builtins.def
12016         (aarch64_sm3ss1qv4si): Ditto.
12017         (aarch64_sm3tt1aq4si): Ditto.
12018         (aarch64_sm3tt1bq4si): Ditto.
12019         (aarch64_sm3tt2aq4si): Ditto.
12020         (aarch64_sm3tt2bq4si): Ditto.
12021         (aarch64_sm3partw1qv4si): Ditto.
12022         (aarch64_sm3partw2qv4si): Ditto.
12023         (aarch64_sm4eqv4si): Ditto.
12024         (aarch64_sm4ekeyqv4si): Ditto.
12025         * config/aarch64/aarch64-simd.md:
12026         (aarch64_sm3ss1qv4si): Ditto.
12027         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12028         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12029         (aarch64_sm4eqv4si): Ditto.
12030         (aarch64_sm4ekeyqv4si): Ditto.
12031         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12032         (sm3part_op): Ditto.
12033         (CRYPTO_SM3TT): Ditto.
12034         (CRYPTO_SM3PART): Ditto.
12035         (UNSPEC_SM3SS1): New unspec.
12036         (UNSPEC_SM3TT1A): Ditto.
12037         (UNSPEC_SM3TT1B): Ditto.
12038         (UNSPEC_SM3TT2A): Ditto.
12039         (UNSPEC_SM3TT2B): Ditto.
12040         (UNSPEC_SM3PARTW1): Ditto.
12041         (UNSPEC_SM3PARTW2): Ditto.
12042         (UNSPEC_SM4E): Ditto.
12043         (UNSPEC_SM4EKEY): Ditto.
12044         * config/aarch64/constraints.md (Ui2): New constraint.
12045         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12046         * config/arm/types.md (crypto_sm3): New type attribute.
12047         (crypto_sm4): Ditto.
12048         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12049         (vsm3tt1aq_u32): Ditto.
12050         (vsm3tt1bq_u32): Ditto.
12051         (vsm3tt2aq_u32): Ditto.
12052         (vsm3tt2bq_u32): Ditto.
12053         (vsm3partw1q_u32): Ditto.
12054         (vsm3partw2q_u32): Ditto.
12055         (vsm4eq_u32): Ditto.
12056         (vsm4ekeyq_u32): Ditto.
12057         (doc/invoke.texi): Document new sm4 option.
12059 2018-01-10  Michael Collison  <michael.collison@arm.com>
12061         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12062         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12063         (AARCH64_FL_FOR_ARCH8_4): New.
12064         (AARCH64_FL_V8_4): New flag.
12065         (doc/invoke.texi): Document new armv8.4-a option.
12067 2018-01-10  Michael Collison  <michael.collison@arm.com>
12069         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12070         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12071         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12072         * config/aarch64/aarch64-option-extension.def: Add
12073         AARCH64_OPT_EXTENSION of 'sha2'.
12074         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12075         (crypto): Disable sha2 and aes if crypto disabled.
12076         (crypto): Enable aes and sha2 if enabled.
12077         (simd): Disable sha2 and aes if simd disabled.
12078         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12079         New flags.
12080         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12081         (TARGET_SHA2): New feature flag for sha2.
12082         (TARGET_AES): New feature flag for aes.
12083         * config/aarch64/aarch64-simd.md:
12084         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12085         conditional on TARGET_AES.
12086         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12087         (aarch64_crypto_sha1hsi): Make pattern conditional
12088         on TARGET_SHA2.
12089         (aarch64_crypto_sha1hv4si): Ditto.
12090         (aarch64_be_crypto_sha1hv4si): Ditto.
12091         (aarch64_crypto_sha1su1v4si): Ditto.
12092         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12093         (aarch64_crypto_sha1su0v4si): Ditto.
12094         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12095         (aarch64_crypto_sha256su0v4si): Ditto.
12096         (aarch64_crypto_sha256su1v4si): Ditto.
12097         (doc/invoke.texi): Document new aes and sha2 options.
12099 2018-01-10  Martin Sebor  <msebor@redhat.com>
12101         PR tree-optimization/83781
12102         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12103         as string arrays.
12105 2018-01-11  Martin Sebor  <msebor@gmail.com>
12106             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12108         PR tree-optimization/83501
12109         PR tree-optimization/81703
12111         * tree-ssa-strlen.c (get_string_cst): Rename...
12112         (get_string_len): ...to this.  Handle global constants.
12113         (handle_char_store): Adjust.
12115 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12116             Jim Wilson  <jimw@sifive.com>
12118         * config/riscv/riscv-protos.h (riscv_output_return): New.
12119         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12120         (riscv_attribute_table, riscv_output_return),
12121         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12122         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12123         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12124         function.
12125         (riscv_expand_prologue): Add early return for naked function.
12126         (riscv_expand_epilogue): Likewise.
12127         (riscv_function_ok_for_sibcall): Return false for naked function.
12128         (riscv_set_current_function): New.
12129         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12130         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12131         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12132         * doc/extend.texi (RISC-V Function Attributes): New.
12134 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12136         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12137         check for 128-bit long double before checking TCmode.
12138         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12139         128-bit long doubles before checking TFmode or TCmode.
12140         (FLOAT128_IBM_P): Likewise.
12142 2018-01-10  Martin Sebor  <msebor@redhat.com>
12144         PR tree-optimization/83671
12145         * builtins.c (c_strlen): Unconditionally return zero for the empty
12146         string.
12147         Use -Warray-bounds for warnings.
12148         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12149         for non-constant array indices with COMPONENT_REF, arrays of
12150         arrays, and pointers to arrays.
12151         (gimple_fold_builtin_strlen): Determine and set length range for
12152         non-constant character arrays.
12154 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12156         PR middle-end/81897
12157         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12158         empty blocks.
12160 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12162         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12164 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12166         PR target/83399
12167         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12168         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12169         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12170         indexed_or_indirect_operand predicate.
12171         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12172         (*vsx_le_perm_load_v8hi): Likewise.
12173         (*vsx_le_perm_load_v16qi): Likewise.
12174         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12175         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12176         (*vsx_le_perm_store_v8hi): Likewise.
12177         (*vsx_le_perm_store_v16qi): Likewise.
12178         (eight unnamed splitters): Likewise.
12180 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12182         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12183         * config/rs6000/emmintrin.h: Likewise.
12184         * config/rs6000/mmintrin.h: Likewise.
12185         * config/rs6000/xmmintrin.h: Likewise.
12187 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12189         PR c++/43486
12190         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12191         "public_flag".
12192         * tree.c (tree_nop_conversion): Return true for location wrapper
12193         nodes.
12194         (maybe_wrap_with_location): New function.
12195         (selftest::check_strip_nops): New function.
12196         (selftest::test_location_wrappers): New function.
12197         (selftest::tree_c_tests): Call it.
12198         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12199         (maybe_wrap_with_location): New decl.
12200         (EXPR_LOCATION_WRAPPER_P): New macro.
12201         (location_wrapper_p): New inline function.
12202         (tree_strip_any_location_wrapper): New inline function.
12204 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12206         PR target/83735
12207         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12208         stack_realign_offset for the largest alignment of stack slot
12209         actually used.
12210         (ix86_find_max_used_stack_alignment): New function.
12211         (ix86_finalize_stack_frame_flags): Use it.  Set
12212         max_used_stack_alignment if we don't realign stack.
12213         * config/i386/i386.h (machine_function): Add
12214         max_used_stack_alignment.
12216 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12218         * config/arm/arm.opt (-mbranch-cost): New option.
12219         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12220         account.
12222 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12224         PR target/83629
12225         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12226         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12228 2018-01-10  Richard Biener  <rguenther@suse.de>
12230         PR debug/83765
12231         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12232         early out so it also covers the case where we have a non-NULL
12233         origin.
12235 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12237         PR tree-optimization/83753
12238         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12239         for non-strided grouped accesses if the number of elements is 1.
12241 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12243         PR target/81616
12244         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12245         * i386.h (TARGET_USE_GATHER): Define.
12246         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12248 2018-01-10  Martin Liska  <mliska@suse.cz>
12250         PR bootstrap/82831
12251         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12252         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12253         partitioning.
12254         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12255         CLEANUP_NO_PARTITIONING is not set.
12257 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12259         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12260         for vectors, as a partial revert of r254296.
12261         * rtl.h (const_vec_p): Delete.
12262         (const_vec_duplicate_p): Don't test for vector CONSTs.
12263         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12264         * expmed.c (make_tree): Likewise.
12266         Revert:
12267         * common.md (E, F): Use CONSTANT_P instead of checking for
12268         CONST_VECTOR.
12269         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12270         checking for CONST_VECTOR.
12272 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12274         PR middle-end/83575
12275         * predict.c (force_edge_cold): Handle in more sane way edges
12276         with no prediction.
12278 2018-01-09  Carl Love  <cel@us.ibm.com>
12280         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12281         V4SI, V4SF types.
12282         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12283         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12284         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12285         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12286         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12287         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12288         * config/rs6000/rs6000-protos.h: Add extern defition for
12289         rs6000_generate_float2_double_code.
12290         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12291         function.
12292         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12293         (float2_v2df): Add define_expand.
12295 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12297         PR target/83628
12298         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12299         op_mode in the force_to_mode call.
12301 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12303         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12304         instead of checking each element individually.
12305         (aarch64_evpc_uzp): Likewise.
12306         (aarch64_evpc_zip): Likewise.
12307         (aarch64_evpc_ext): Likewise.
12308         (aarch64_evpc_rev): Likewise.
12309         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12310         instead of checking each element individually.  Return true without
12311         generating rtl if
12312         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12313         whether all selected elements come from the same input, instead of
12314         checking each element individually.  Remove calls to gen_rtx_REG,
12315         start_sequence and end_sequence and instead assert that no rtl is
12316         generated.
12318 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12320         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12321         order of HIGH and CONST checks.
12323 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12325         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12326         if the destination isn't an SSA_NAME.
12328 2018-01-09  Richard Biener  <rguenther@suse.de>
12330         PR tree-optimization/83668
12331         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12332         move prologue...
12333         (canonicalize_loop_form): ... here, renamed from ...
12334         (canonicalize_loop_closed_ssa_form): ... this and amended to
12335         swap successor edges for loop exit blocks to make us use
12336         the RPO order we need for initial schedule generation.
12338 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12340         PR tree-optimization/64811
12341         * match.pd: When optimizing comparisons with Inf, avoid
12342         introducing or losing exceptions from comparisons with NaN.
12344 2018-01-09  Martin Liska  <mliska@suse.cz>
12346         PR sanitizer/82517
12347         * asan.c (shadow_mem_size): Add gcc_assert.
12349 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12351         Don't save registers in main().
12353         PR target/83738
12354         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12355         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12356         * config/avr/avr.c (avr_set_current_function): Don't error if
12357         naked, OS_task or OS_main are specified at the same time.
12358         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12359         OS_main.
12360         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12361         attribute.
12362         * common/config/avr/avr-common.c (avr_option_optimization_table):
12363         Switch on -mmain-is-OS_task for optimizing compilations.
12365 2018-01-09  Richard Biener  <rguenther@suse.de>
12367         PR tree-optimization/83572
12368         * graphite.c: Include cfganal.h.
12369         (graphite_transform_loops): Connect infinite loops to exit
12370         and remove fake edges at the end.
12372 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12374         * ipa-inline.c (edge_badness): Revert accidental checkin.
12376 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12378         PR ipa/80763
12379         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12380         symbols; not inline clones.
12382 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12384         PR target/83507
12385         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12386         hard registers.  Formatting fixes.
12388         PR preprocessor/83722
12389         * gcc.c (try_generate_repro): Pass
12390         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12391         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12392         do_report_bug.
12394 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12395             Kito Cheng  <kito.cheng@gmail.com>
12397         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12398         (riscv_leaf_function_p): Delete.
12399         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12401 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12403         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12404         function.
12405         (do_ifelse): New function.
12406         (do_isel): New function.
12407         (do_sub3): New function.
12408         (do_add3): New function.
12409         (do_load_mask_compare): New function.
12410         (do_overlap_load_compare): New function.
12411         (expand_compare_loop): New function.
12412         (expand_block_compare): Call expand_compare_loop() when appropriate.
12413         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12414         option description.
12415         (-mblock-compare-inline-loop-limit): New option.
12417 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12419         PR target/83677
12420         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12421         Reverse order of second and third operands in first alternative.
12422         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12423         of first and second elements in UNSPEC_VPERMR vector.
12424         (altivec_expand_vec_perm_le): Likewise.
12426 2018-01-08  Jeff Law  <law@redhat.com>
12428         PR rtl-optimizatin/81308
12429         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12430         (process_switch): If group_case_labels makes a change, then set
12431         cfg_altered.
12432         (pass_convert_switch::execute): If a switch is converted, then
12433         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12435         PR rtl-optimization/81308
12436         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12437         splitting insns.
12439 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12441         PR target/83663 - Revert r255946
12442         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12443         generation for cases where splatting a value is not useful.
12444         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12445         across a vec_duplicate and a paradoxical subreg forming a vector
12446         mode to a vec_concat.
12448 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12450         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12451         -march=armv8.3-a variants.
12452         * config/arm/t-multilib: Likewise.
12453         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12455 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12457         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12458         to generate rtl.
12459         (cceq_ior_compare_complement): Give it a name so I can use it, and
12460         change boolean_or_operator predicate to boolean_operator so it can
12461         be used to generate a crand.
12462         (eqne): New code iterator.
12463         (bd/bd_neg): New code_attrs.
12464         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12465         a single define_insn.
12466         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12467         decrement (bdnzt/bdnzf/bdzt/bdzf).
12468         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12469         with the new names of the branch decrement patterns, and added the
12470         names of the branch decrement conditional patterns.
12472 2018-01-08  Richard Biener  <rguenther@suse.de>
12474         PR tree-optimization/83563
12475         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12476         cache.
12478 2018-01-08  Richard Biener  <rguenther@suse.de>
12480         PR middle-end/83713
12481         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12483 2018-01-08  Richard Biener  <rguenther@suse.de>
12485         PR tree-optimization/83685
12486         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12487         references to abnormals.
12489 2018-01-08  Richard Biener  <rguenther@suse.de>
12491         PR lto/83719
12492         * dwarf2out.c (output_indirect_strings): Handle empty
12493         skeleton_debug_str_hash.
12494         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12496 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12498         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12499         (emit_store_direct): Likewise.
12500         (arc_trampoline_adjust_address): Likewise.
12501         (arc_asm_trampoline_template): New function.
12502         (arc_initialize_trampoline): Use asm_trampoline_template.
12503         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12504         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12505         * config/arc/arc.md (flush_icache): Delete pattern.
12507 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12509         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12510         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12511         munaligned-access.
12513 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12515         PR target/83681
12516         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12517         by not USED_FOR_TARGET.
12518         (make_pass_resolve_sw_modes): Likewise.
12520 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12522         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12523         USED_FOR_TARGET.
12525 2018-01-08  Richard Biener  <rguenther@suse.de>
12527         PR middle-end/83580
12528         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12530 2018-01-08  Richard Biener  <rguenther@suse.de>
12532         PR middle-end/83517
12533         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12535 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12537         PR middle-end/81897
12538         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12539         basic blocks with a small number of successors.
12540         (convert_control_dep_chain_into_preds): Improve handling of
12541         forwarder blocks.
12542         (dump_predicates): Split apart into...
12543         (dump_pred_chain): ...here...
12544         (dump_pred_info): ...and here.
12545         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12546         (can_chain_union_be_invalidated_p): Improve check for invalidation
12547         of paths.
12548         (uninit_uses_cannot_happen): Avoid unnecessary if
12549         convert_control_dep_chain_into_preds yielded nothing.
12551 2018-01-06  Martin Sebor  <msebor@redhat.com>
12553         PR tree-optimization/83640
12554         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12555         subtracting negative offset from size.
12556         (builtin_access::overlap): Adjust offset bounds of the access to fall
12557         within the size of the object if possible.
12559 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12561         PR rtl-optimization/83699
12562         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12563         extract_bit_field_as_subreg to cases in which the extracted
12564         value is also a vector.
12566         * lra-constraints.c (process_alt_operands): Test for the equivalence
12567         substitutions when detecting a possible reload cycle.
12569 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12571         PR debug/83480
12572         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12573         by default if flag_selective_schedling{,2}.  Formatting fixes.
12575         PR rtl-optimization/83682
12576         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12577         if it has non-VECTOR_MODE element mode.
12578         (vec_duplicate_p): Likewise.
12580         PR middle-end/83694
12581         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12582         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12584 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12586         PR target/83604
12587         * config/i386/i386-builtin.def
12588         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12589         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12590         Require also OPTION_MASK_ISA_AVX512F in addition to
12591         OPTION_MASK_ISA_GFNI.
12592         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12593         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12594         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12595         to OPTION_MASK_ISA_GFNI.
12596         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12597         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12598         OPTION_MASK_ISA_AVX512BW.
12599         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12600         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12601         addition to OPTION_MASK_ISA_GFNI.
12602         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12603         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12604         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12605         to OPTION_MASK_ISA_GFNI.
12606         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12607         a requirement for all ISAs rather than any of them with a few
12608         exceptions.
12609         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12610         processing.
12611         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12612         bitmasks to be enabled with 3 exceptions, instead of requiring any
12613         enabled ISA with lots of exceptions.
12614         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12615         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12616         Change avx512bw in isa attribute to avx512f.
12617         * config/i386/sgxintrin.h: Add license boilerplate.
12618         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12619         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12620         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12621         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12622         defined.
12623         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12624         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12625         temporarily sse2 rather than sse if not enabled already.
12627         PR target/83604
12628         * config/i386/sse.md (VI248_VLBW): Rename to ...
12629         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12630         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12631         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12632         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12633         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12634         mode iterator instead of VI248_VLBW.
12636 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12638         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12639         (record_modified): Skip clobbers; add debug output.
12640         (param_change_prob): Use sreal frequencies.
12642 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12644         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12645         punt for user-aligned variables.
12647 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12649         * tree-chrec.c (chrec_contains_symbols): Return true for
12650         POLY_INT_CST.
12652 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12654         PR target/82439
12655         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12656         of (x|y) == x for BICS pattern.
12658 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12660         PR tree-optimization/83605
12661         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12662         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12663         can throw.
12665 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12667         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12668         * config/epiphany/rtems.h: New file.
12670 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12671             Uros Bizjak  <ubizjak@gmail.com>
12673         PR target/83554
12674         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12675         QIreg_operand instead of register_operand predicate.
12676         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12677         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12678         comments instead of -fmitigate[-_]rop.
12680 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12682         PR bootstrap/81926
12683         * cgraphunit.c (symbol_table::compile): Switch to text_section
12684         before calling assembly_start debug hook.
12685         * run-rtl-passes.c (run_rtl_passes): Likewise.
12686         Include output.h.
12688 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12690         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12691         range_int_cst_p rather than !symbolic_range_p before calling
12692         extract_range_from_multiplicative_op_1.
12694 2018-01-04  Jeff Law  <law@redhat.com>
12696         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12697         redundant test in assertion.
12699 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12701         * doc/rtl.texi: Document machine_mode wrapper classes.
12703 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12705         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12706         using tree_to_uhwi.
12708 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12710         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12711         the VEC_PERM_EXPR fold to fail.
12713 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12715         PR debug/83585
12716         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12717         to switched_sections.
12719 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12721         PR target/83680
12722         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12723         test for d.testing.
12725 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12727         PR target/83387
12728         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12729         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12731 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12733         PR debug/83666
12734         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12735         is BLKmode and bitpos not zero or mode change is needed.
12737 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12739         PR target/83675
12740         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12741         TARGET_VIS2.
12743 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12745         PR target/83628
12746         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12747         instead of MULT rtx.  Update all corresponding splitters.
12748         (*saddl_se): Ditto.
12749         (*ssub<modesuffix>): Ditto.
12750         (*ssubl_se): Ditto.
12751         (*cmp_sadd_di): Update split patterns.
12752         (*cmp_sadd_si): Ditto.
12753         (*cmp_sadd_sidi): Ditto.
12754         (*cmp_ssub_di): Ditto.
12755         (*cmp_ssub_si): Ditto.
12756         (*cmp_ssub_sidi): Ditto.
12757         * config/alpha/predicates.md (const23_operand): New predicate.
12758         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12759         Look for ASHIFT, not MULT inner operand.
12760         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
12762 2018-01-04  Martin Liska  <mliska@suse.cz>
12764         PR gcov-profile/83669
12765         * gcov.c (output_intermediate_file): Add version to intermediate
12766         gcov file.
12767         * doc/gcov.texi: Document new field 'version' in intermediate
12768         file format. Fix location of '-k' option of gcov command.
12770 2018-01-04  Martin Liska  <mliska@suse.cz>
12772         PR ipa/82352
12773         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
12775 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12777         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
12779 2018-01-03  Martin Sebor  <msebor@redhat.com>
12781         PR tree-optimization/83655
12782         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
12783         checking calls with invalid arguments.
12785 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12787         * tree-vect-stmts.c (vect_get_store_rhs): New function.
12788         (vectorizable_mask_load_store): Delete.
12789         (vectorizable_call): Return false for masked loads and stores.
12790         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
12791         instead of gimple_assign_rhs1.
12792         (vectorizable_load): Handle IFN_MASK_LOAD.
12793         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
12795 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12797         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
12798         split out from..,
12799         (vectorizable_mask_load_store): ...here.
12800         (vectorizable_load): ...and here.
12802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12804         * tree-vect-stmts.c (vect_build_all_ones_mask)
12805         (vect_build_zero_merge_argument): New functions, split out from...
12806         (vectorizable_load): ...here.
12808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12810         * tree-vect-stmts.c (vect_check_store_rhs): New function,
12811         split out from...
12812         (vectorizable_mask_load_store): ...here.
12813         (vectorizable_store): ...and here.
12815 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12817         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12818         split out from...
12819         (vectorizable_mask_load_store): ...here.
12821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12823         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12824         (vect_model_store_cost): Take a vec_load_store_type instead of a
12825         vect_def_type.
12826         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12827         (vect_model_store_cost): Take a vec_load_store_type instead of a
12828         vect_def_type.
12829         (vectorizable_mask_load_store): Update accordingly.
12830         (vectorizable_store): Likewise.
12831         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12835         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12836         IFN_MASK_LOAD calls here rather than...
12837         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12840             Alan Hayward  <alan.hayward@arm.com>
12841             David Sherwood  <david.sherwood@arm.com>
12843         * expmed.c (extract_bit_field_1): For vector extracts,
12844         fall back to extract_bit_field_as_subreg if vec_extract
12845         isn't available.
12847 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12848             Alan Hayward  <alan.hayward@arm.com>
12849             David Sherwood  <david.sherwood@arm.com>
12851         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12852         they are variable or constant sized.
12853         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12854         slots for constant-sized data.
12856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12857             Alan Hayward  <alan.hayward@arm.com>
12858             David Sherwood  <david.sherwood@arm.com>
12860         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12861         handling COND_EXPRs with boolean comparisons, try to find a better
12862         basis for the mask type than the boolean itself.
12864 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12866         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12867         is calculated and how it can be overridden.
12868         * genmodes.c (max_bitsize_mode_any_mode): New variable.
12869         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12870         if defined.
12871         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12872         if nonzero.
12874 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12875             Alan Hayward  <alan.hayward@arm.com>
12876             David Sherwood  <david.sherwood@arm.com>
12878         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12879         Remove the mode argument.
12880         (aarch64_simd_valid_immediate): Remove the mode and inverse
12881         arguments.
12882         * config/aarch64/iterators.md (bitsize): New iterator.
12883         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12884         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12885         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12886         aarch64_simd_valid_immediate.
12887         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12888         (aarch64_reg_or_bic_imm): Likewise.
12889         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12890         with an insn_type enum and msl with a modifier_type enum.
12891         Replace element_width with a scalar_mode.  Change the shift
12892         to unsigned int.  Add constructors for scalar_float_mode and
12893         scalar_int_mode elements.
12894         (aarch64_vect_float_const_representable_p): Delete.
12895         (aarch64_can_const_movi_rtx_p)
12896         (aarch64_simd_scalar_immediate_valid_for_move)
12897         (aarch64_simd_make_constant): Update call to
12898         aarch64_simd_valid_immediate.
12899         (aarch64_advsimd_valid_immediate_hs): New function.
12900         (aarch64_advsimd_valid_immediate): Likewise.
12901         (aarch64_simd_valid_immediate): Remove mode and inverse
12902         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
12903         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12904         and aarch64_float_const_representable_p on the result.
12905         (aarch64_output_simd_mov_immediate): Remove mode argument.
12906         Update call to aarch64_simd_valid_immediate and use of
12907         simd_immediate_info.
12908         (aarch64_output_scalar_simd_mov_immediate): Update call
12909         accordingly.
12911 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12912             Alan Hayward  <alan.hayward@arm.com>
12913             David Sherwood  <david.sherwood@arm.com>
12915         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12916         (mode_nunits): Likewise CONST_MODE_NUNITS.
12917         * machmode.def (ADJUST_NUNITS): Document.
12918         * genmodes.c (mode_data::need_nunits_adj): New field.
12919         (blank_mode): Update accordingly.
12920         (adj_nunits): New variable.
12921         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12922         parameter.
12923         (emit_mode_size_inline): Set need_bytesize_adj for all modes
12924         listed in adj_nunits.
12925         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12926         listed in adj_nunits.  Don't emit case statements for such modes.
12927         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12928         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
12929         nothing if adj_nunits is nonnull.
12930         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12931         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12932         (emit_mode_fbit): Update use of print_maybe_const_decl.
12933         (emit_move_size): Likewise.  Treat the array as non-const
12934         if adj_nunits.
12935         (emit_mode_adjustments): Handle adj_nunits.
12937 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12939         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12940         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12941         (VECTOR_MODES): Use it.
12942         (make_vector_modes): Take the prefix as an argument.
12944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12945             Alan Hayward  <alan.hayward@arm.com>
12946             David Sherwood  <david.sherwood@arm.com>
12948         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12949         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12950         for MODE_VECTOR_BOOL.
12951         * machmode.def (VECTOR_BOOL_MODE): Document.
12952         * genmodes.c (VECTOR_BOOL_MODE): New macro.
12953         (make_vector_bool_mode): New function.
12954         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12955         MODE_VECTOR_BOOL.
12956         * lto-streamer-in.c (lto_input_mode_table): Likewise.
12957         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12958         Likewise.
12959         * stor-layout.c (int_mode_for_mode): Likewise.
12960         * tree.c (build_vector_type_for_mode): Likewise.
12961         * varasm.c (output_constant_pool_2): Likewise.
12962         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12963         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
12964         for MODE_VECTOR_BOOL.
12965         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12966         of mode class checks.
12967         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12968         instead of a list of mode class checks.
12969         (expand_vector_scalar_condition): Likewise.
12970         (type_for_widest_vector_mode): Handle BImode as an inner mode.
12972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12973             Alan Hayward  <alan.hayward@arm.com>
12974             David Sherwood  <david.sherwood@arm.com>
12976         * machmode.h (mode_size): Change from unsigned short to
12977         poly_uint16_pod.
12978         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12979         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12980         or if measurement_type is not polynomial.
12981         (fixed_size_mode::includes_p): Check for constant-sized modes.
12982         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12983         return a poly_uint16 rather than an unsigned short.
12984         (emit_mode_size): Change the type of mode_size from unsigned short
12985         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
12986         (emit_mode_adjustments): Cope with polynomial vector sizes.
12987         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12988         for GET_MODE_SIZE.
12989         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12990         for GET_MODE_SIZE.
12991         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12992         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12993         * caller-save.c (setup_save_areas): Likewise.
12994         (replace_reg_with_saved_mem): Likewise.
12995         * calls.c (emit_library_call_value_1): Likewise.
12996         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12997         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12998         (gen_lowpart_for_combine): Likewise.
12999         * convert.c (convert_to_integer_1): Likewise.
13000         * cse.c (equiv_constant, cse_insn): Likewise.
13001         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13002         (cselib_subst_to_values): Likewise.
13003         * dce.c (word_dce_process_block): Likewise.
13004         * df-problems.c (df_word_lr_mark_ref): Likewise.
13005         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13006         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13007         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13008         (rtl_for_decl_location): Likewise.
13009         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13010         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13011         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13012         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13013         (expand_expr_real_1): Likewise.
13014         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13015         (pad_below): Likewise.
13016         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13017         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13018         * ira.c (get_subreg_tracking_sizes): Likewise.
13019         * ira-build.c (ira_create_allocno_objects): Likewise.
13020         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13021         (ira_sort_regnos_for_alter_reg): Likewise.
13022         * ira-costs.c (record_operand_costs): Likewise.
13023         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13024         (resolve_simple_move): Likewise.
13025         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13026         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13027         (lra_constraints): Likewise.
13028         (CONST_POOL_OK_P): Reject variable-sized modes.
13029         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13030         (add_pseudo_to_slot, lra_spill): Likewise.
13031         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13032         * optabs-query.c (get_best_extraction_insn): Likewise.
13033         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13034         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13035         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13036         * recog.c (offsettable_address_addr_space_p): Likewise.
13037         * regcprop.c (maybe_mode_change): Likewise.
13038         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13039         * regrename.c (build_def_use): Likewise.
13040         * regstat.c (dump_reg_info): Likewise.
13041         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13042         (find_reloads, find_reloads_subreg_address): Likewise.
13043         * reload1.c (eliminate_regs_1): Likewise.
13044         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13045         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13046         (simplify_binary_operation_1, simplify_subreg): Likewise.
13047         * targhooks.c (default_function_arg_padding): Likewise.
13048         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13049         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13050         (verify_gimple_assign_ternary): Likewise.
13051         * tree-inline.c (estimate_move_cost): Likewise.
13052         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13053         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13054         (get_address_cost_ainc): Likewise.
13055         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13056         (vect_supportable_dr_alignment): Likewise.
13057         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13058         (vectorizable_reduction): Likewise.
13059         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13060         (vectorizable_operation, vectorizable_load): Likewise.
13061         * tree.c (build_same_sized_truth_vector_type): Likewise.
13062         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13063         * var-tracking.c (emit_note_insn_var_location): Likewise.
13064         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13065         (ADDR_VEC_ALIGN): Likewise.
13067 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13068             Alan Hayward  <alan.hayward@arm.com>
13069             David Sherwood  <david.sherwood@arm.com>
13071         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13072         unsigned short.
13073         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13074         or if measurement_type is polynomial.
13075         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13076         * combine.c (make_extraction): Likewise.
13077         * dse.c (find_shift_sequence): Likewise.
13078         * dwarf2out.c (mem_loc_descriptor): Likewise.
13079         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13080         (extract_bit_field, extract_low_bits): Likewise.
13081         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13082         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13083         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13084         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13085         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13086         * reload.c (find_reloads): Likewise.
13087         * reload1.c (alter_reg): Likewise.
13088         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13089         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13090         * tree-if-conv.c (predicate_mem_writes): Likewise.
13091         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13092         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13093         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13094         * valtrack.c (dead_debug_insert_temp): Likewise.
13095         * varasm.c (mergeable_constant_section): Likewise.
13096         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13098 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13099             Alan Hayward  <alan.hayward@arm.com>
13100             David Sherwood  <david.sherwood@arm.com>
13102         * expr.c (expand_assignment): Cope with polynomial mode sizes
13103         when assigning to a CONCAT.
13105 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13106             Alan Hayward  <alan.hayward@arm.com>
13107             David Sherwood  <david.sherwood@arm.com>
13109         * machmode.h (mode_precision): Change from unsigned short to
13110         poly_uint16_pod.
13111         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13112         short.
13113         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13114         or if measurement_type is not polynomial.
13115         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13116         in which the mode is already known to be a scalar_int_mode.
13117         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13118         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13119         initializer.
13120         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13121         for GET_MODE_PRECISION.
13122         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13123         for GET_MODE_PRECISION.
13124         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13125         as polynomial.
13126         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13127         (expand_field_assignment, make_extraction): Likewise.
13128         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13129         (get_last_value): Likewise.
13130         * convert.c (convert_to_integer_1): Likewise.
13131         * cse.c (cse_insn): Likewise.
13132         * expr.c (expand_expr_real_1): Likewise.
13133         * lra-constraints.c (simplify_operand_subreg): Likewise.
13134         * optabs-query.c (can_atomic_load_p): Likewise.
13135         * optabs.c (expand_atomic_load): Likewise.
13136         (expand_atomic_store): Likewise.
13137         * ree.c (combine_reaching_defs): Likewise.
13138         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13139         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13140         * tree.h (type_has_mode_precision_p): Likewise.
13141         * ubsan.c (instrument_si_overflow): Likewise.
13143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13144             Alan Hayward  <alan.hayward@arm.com>
13145             David Sherwood  <david.sherwood@arm.com>
13147         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13148         polynomial numbers of units.
13149         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13150         (valid_vector_subparts_p): New function.
13151         (build_vector_type): Remove temporary shim and take the number
13152         of units as a poly_uint64 rather than an int.
13153         (build_opaque_vector_type): Take the number of units as a
13154         poly_uint64 rather than an int.
13155         * tree.c (build_vector_from_ctor): Handle polynomial
13156         TYPE_VECTOR_SUBPARTS.
13157         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13158         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13159         (build_vector_from_val): If the number of units is variable,
13160         use build_vec_duplicate_cst for constant operands and
13161         VEC_DUPLICATE_EXPR otherwise.
13162         (make_vector_type): Remove temporary is_constant ().
13163         (build_vector_type, build_opaque_vector_type): Take the number of
13164         units as a poly_uint64 rather than an int.
13165         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13166         VECTOR_CST_NELTS.
13167         * cfgexpand.c (expand_debug_expr): Likewise.
13168         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13169         (store_constructor, expand_expr_real_1): Likewise.
13170         (const_scalar_mask_from_tree): Likewise.
13171         * fold-const-call.c (fold_const_reduction): Likewise.
13172         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13173         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13174         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13175         (fold_relational_const): Likewise.
13176         (native_interpret_vector): Likewise.  Change the size from an
13177         int to an unsigned int.
13178         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13179         TYPE_VECTOR_SUBPARTS.
13180         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13181         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13182         duplicating a non-constant operand into a variable-length vector.
13183         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13184         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13185         * ipa-icf.c (sem_variable::equals): Likewise.
13186         * match.pd: Likewise.
13187         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13188         * print-tree.c (print_node): Likewise.
13189         * stor-layout.c (layout_type): Likewise.
13190         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13191         * tree-cfg.c (verify_gimple_comparison): Likewise.
13192         (verify_gimple_assign_binary): Likewise.
13193         (verify_gimple_assign_ternary): Likewise.
13194         (verify_gimple_assign_single): Likewise.
13195         * tree-pretty-print.c (dump_generic_node): Likewise.
13196         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13197         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13198         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13199         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13200         (vect_shift_permute_load_chain): Likewise.
13201         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13202         (expand_vector_condition, optimize_vector_constructor): Likewise.
13203         (lower_vec_perm, get_compute_type): Likewise.
13204         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13205         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13206         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13207         (vect_recog_mask_conversion_pattern): Likewise.
13208         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13209         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13210         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13211         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13212         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13213         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13214         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13215         (supportable_widening_operation): Likewise.
13216         (supportable_narrowing_operation): Likewise.
13217         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13218         Likewise.
13219         * varasm.c (output_constant): Likewise.
13221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13222             Alan Hayward  <alan.hayward@arm.com>
13223             David Sherwood  <david.sherwood@arm.com>
13225         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13226         so that both the length == 3 and length != 3 cases set up their
13227         own permute vectors.  Add comments explaining why we know the
13228         number of elements is constant.
13229         (vect_permute_load_chain): Likewise.
13231 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13232             Alan Hayward  <alan.hayward@arm.com>
13233             David Sherwood  <david.sherwood@arm.com>
13235         * machmode.h (mode_nunits): Change from unsigned char to
13236         poly_uint16_pod.
13237         (ONLY_FIXED_SIZE_MODES): New macro.
13238         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13239         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13240         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13241         New typedefs.
13242         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13243         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13244         or if measurement_type is not polynomial.
13245         * genmodes.c (ZERO_COEFFS): New macro.
13246         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13247         poly_uint16.
13248         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13249         Use ZERO_COEFFS when emitting initializers.
13250         * data-streamer.h (bp_pack_poly_value): New function.
13251         (bp_unpack_poly_value): Likewise.
13252         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13253         for GET_MODE_NUNITS.
13254         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13255         for GET_MODE_NUNITS.
13256         * tree.c (make_vector_type): Remove temporary shim and make
13257         the real function take the number of units as a poly_uint64
13258         rather than an int.
13259         (build_vector_type_for_mode): Handle polynomial nunits.
13260         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13261         * emit-rtl.c (const_vec_series_p_1): Likewise.
13262         (gen_rtx_CONST_VECTOR): Likewise.
13263         * fold-const.c (test_vec_duplicate_folding): Likewise.
13264         * genrecog.c (validate_pattern): Likewise.
13265         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13266         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13267         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13268         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13269         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13270         * rtlanal.c (subreg_get_info): Likewise.
13271         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13272         (vect_grouped_load_supported): Likewise.
13273         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13274         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13275         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13276         (simplify_const_unary_operation, simplify_binary_operation_1)
13277         (simplify_const_binary_operation, simplify_ternary_operation)
13278         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13279         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13280         instead of CONST_VECTOR_NUNITS.
13281         * varasm.c (output_constant_pool_2): Likewise.
13282         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13283         explicit-encoded elements in the XVEC for variable-length vectors.
13285 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13287         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13290             Alan Hayward  <alan.hayward@arm.com>
13291             David Sherwood  <david.sherwood@arm.com>
13293         * coretypes.h (fixed_size_mode): Declare.
13294         (fixed_size_mode_pod): New typedef.
13295         * builtins.h (target_builtins::x_apply_args_mode)
13296         (target_builtins::x_apply_result_mode): Change type to
13297         fixed_size_mode_pod.
13298         * builtins.c (apply_args_size, apply_result_size, result_vector)
13299         (expand_builtin_apply_args_1, expand_builtin_apply)
13300         (expand_builtin_return): Update accordingly.
13302 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13304         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13305         * cselib.c (cselib_hash_rtx): Likewise.
13306         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13307         CONST_VECTOR encoding.
13309 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13310             Jeff Law  <law@redhat.com>
13312         PR target/83641
13313         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13314         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13315         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13316         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13318         PR target/83641
13319         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13320         explicitly probe *sp in a noreturn function if there were any callee
13321         register saves or frame pointer is needed.
13323 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13325         PR debug/83621
13326         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13327         BLKmode for ternary, binary or unary expressions.
13329         PR debug/83645
13330         * var-tracking.c (delete_vta_debug_insn): New inline function.
13331         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13332         insns from get_insns () to NULL instead of each bb separately.
13333         Use delete_vta_debug_insn.  No longer static.
13334         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13335         delete_vta_debug_insns callers.
13336         * rtl.h (delete_vta_debug_insns): Declare.
13337         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13338         instead of variable_tracking_main.
13340 2018-01-03  Martin Sebor  <msebor@redhat.com>
13342         PR tree-optimization/83603
13343         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13344         arguments past the endof the argument list in functions declared
13345         without a prototype.
13346         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13347         Avoid checking when arguments are null.
13349 2018-01-03  Martin Sebor  <msebor@redhat.com>
13351         PR c/83559
13352         * doc/extend.texi (attribute const): Fix a typo.
13353         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13354         issuing -Wsuggest-attribute for void functions.
13356 2018-01-03  Martin Sebor  <msebor@redhat.com>
13358         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13359         offset_int::from instead of wide_int::to_shwi.
13360         (maybe_diag_overlap): Remove assertion.
13361         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13362         * gimple-ssa-sprintf.c (format_directive): Same.
13363         (parse_directive): Same.
13364         (sprintf_dom_walker::compute_format_length): Same.
13365         (try_substitute_return_value): Same.
13367 2018-01-03  Jeff Law  <law@redhat.com>
13369         PR middle-end/83654
13370         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13371         non-constant residual for zero at runtime and avoid probing in
13372         that case.  Reorganize code for trailing problem to mirror handling
13373         of the residual.
13375 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13377         PR tree-optimization/83501
13378         * tree-ssa-strlen.c (get_string_cst): New.
13379         (handle_char_store): Call get_string_cst.
13381 2018-01-03  Martin Liska  <mliska@suse.cz>
13383         PR tree-optimization/83593
13384         * tree-ssa-strlen.c: Include tree-cfg.h.
13385         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13386         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13387         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13388         to false.
13389         (strlen_dom_walker::before_dom_children): Call
13390         gimple_purge_dead_eh_edges. Dump tranformation with details
13391         dump flags.
13392         (strlen_dom_walker::before_dom_children): Update call by adding
13393         new argument cleanup_eh.
13394         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13396 2018-01-03  Martin Liska  <mliska@suse.cz>
13398         PR ipa/83549
13399         * cif-code.def (VARIADIC_THUNK): New enum value.
13400         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13401         thunks.
13403 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13405         * sse.md (mov<mode>_internal): Tighten condition for when to use
13406         vmovdqu<ssescalarsize> for TI and OI modes.
13408 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13410         Update copyright years.
13412 2018-01-03  Martin Liska  <mliska@suse.cz>
13414         PR ipa/83594
13415         * ipa-visibility.c (function_and_variable_visibility): Skip
13416         functions with noipa attribure.
13418 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13420         * gcc.c (process_command): Update copyright notice dates.
13421         * gcov-dump.c (print_version): Ditto.
13422         * gcov.c (print_version): Ditto.
13423         * gcov-tool.c (print_version): Ditto.
13424         * gengtype.c (create_file): Ditto.
13425         * doc/cpp.texi: Bump @copying's copyright year.
13426         * doc/cppinternals.texi: Ditto.
13427         * doc/gcc.texi: Ditto.
13428         * doc/gccint.texi: Ditto.
13429         * doc/gcov.texi: Ditto.
13430         * doc/install.texi: Ditto.
13431         * doc/invoke.texi: Ditto.
13433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13435         * vector-builder.h (vector_builder::m_full_nelts): Change from
13436         unsigned int to poly_uint64.
13437         (vector_builder::full_nelts): Update prototype accordingly.
13438         (vector_builder::new_vector): Likewise.
13439         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13440         (vector_builder::operator ==): Likewise.
13441         (vector_builder::finalize): Likewise.
13442         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13443         Take the number of elements as a poly_uint64 rather than an
13444         unsigned int.
13445         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13446         from unsigned int to poly_uint64.
13447         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13448         (vec_perm_indices::new_vector): Likewise.
13449         (vec_perm_indices::length): Likewise.
13450         (vec_perm_indices::nelts_per_input): Likewise.
13451         (vec_perm_indices::input_nelts): Likewise.
13452         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13453         number of elements per input as a poly_uint64 rather than an
13454         unsigned int.  Use the original encoding for variable-length
13455         vectors, rather than clamping each individual element.
13456         For the second and subsequent elements in each pattern,
13457         clamp the step and base before clamping their sum.
13458         (vec_perm_indices::series_p): Handle polynomial element counts.
13459         (vec_perm_indices::all_in_range_p): Likewise.
13460         (vec_perm_indices_to_tree): Likewise.
13461         (vec_perm_indices_to_rtx): Likewise.
13462         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13463         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13464         (tree_vector_builder::new_binary_operation): Handle polynomial
13465         element counts.  Return false if we need to know the number
13466         of elements at compile time.
13467         * fold-const.c (fold_vec_perm): Punt if the number of elements
13468         isn't known at compile time.
13470 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13472         * vec-perm-indices.h (vec_perm_builder): Change element type
13473         from HOST_WIDE_INT to poly_int64.
13474         (vec_perm_indices::element_type): Update accordingly.
13475         (vec_perm_indices::clamp): Handle polynomial element_types.
13476         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13477         (vec_perm_indices::all_in_range_p): Likewise.
13478         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13479         than shwi trees.
13480         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13481         polynomial vec_perm_indices element types.
13482         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13483         * fold-const.c (fold_vec_perm): Likewise.
13484         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13485         * tree-vect-generic.c (lower_vec_perm): Likewise.
13486         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13487         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13488         element type to HOST_WIDE_INT.
13490 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13491             Alan Hayward  <alan.hayward@arm.com>
13492             David Sherwood  <david.sherwood@arm.com>
13494         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13495         rather than an int.  Use plus_constant.
13496         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13497         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13500             Alan Hayward  <alan.hayward@arm.com>
13501             David Sherwood  <david.sherwood@arm.com>
13503         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13504         a HOST_WIDE_INT to a poly_int64.
13506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13507             Alan Hayward  <alan.hayward@arm.com>
13508             David Sherwood  <david.sherwood@arm.com>
13510         * calls.c (load_register_parameters): Cope with polynomial
13511         mode sizes.  Require a constant size for BLKmode parameters
13512         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13513         forces a parameter to be padded at the lsb end in order to
13514         fill a complete number of words, require the parameter size
13515         to be ordered wrt UNITS_PER_WORD.
13517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13518             Alan Hayward  <alan.hayward@arm.com>
13519             David Sherwood  <david.sherwood@arm.com>
13521         * reload1.c (spill_stack_slot_width): Change element type
13522         from unsigned int to poly_uint64_pod.
13523         (alter_reg): Treat mode sizes as polynomial.
13525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13526             Alan Hayward  <alan.hayward@arm.com>
13527             David Sherwood  <david.sherwood@arm.com>
13529         * reload.c (complex_word_subreg_p): New function.
13530         (reload_inner_reg_of_subreg, push_reload): Use it.
13532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13533             Alan Hayward  <alan.hayward@arm.com>
13534             David Sherwood  <david.sherwood@arm.com>
13536         * lra-constraints.c (process_alt_operands): Reject matched
13537         operands whose sizes aren't ordered.
13538         (match_reload): Refer to this check here.
13540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13541             Alan Hayward  <alan.hayward@arm.com>
13542             David Sherwood  <david.sherwood@arm.com>
13544         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13545         that the mode size is in the set {1, 2, 4, 8, 16}.
13547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13548             Alan Hayward  <alan.hayward@arm.com>
13549             David Sherwood  <david.sherwood@arm.com>
13551         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13552         Use plus_constant instead of gen_rtx_PLUS.
13554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13555             Alan Hayward  <alan.hayward@arm.com>
13556             David Sherwood  <david.sherwood@arm.com>
13558         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13559         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13560         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13561         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13562         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13563         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13564         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13565         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13566         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13567         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13568         a poly_int64.
13569         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13570         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13571         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13572         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13573         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13574         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13575         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13576         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13577         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13578         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13579         function.
13580         * expr.c (emit_move_resolve_push): Treat the input and result
13581         of PUSH_ROUNDING as a poly_int64.
13582         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13583         (emit_push_insn): Likewise.
13584         * lra-eliminations.c (mark_not_eliminable): Likewise.
13585         * recog.c (push_operand): Likewise.
13586         * reload1.c (elimination_effects): Likewise.
13587         * rtlanal.c (nonzero_bits1): Likewise.
13588         * calls.c (store_one_arg): Likewise.  Require the padding to be
13589         known at compile time.
13591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13592             Alan Hayward  <alan.hayward@arm.com>
13593             David Sherwood  <david.sherwood@arm.com>
13595         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13596         Use plus_constant instead of gen_rtx_PLUS.
13598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13599             Alan Hayward  <alan.hayward@arm.com>
13600             David Sherwood  <david.sherwood@arm.com>
13602         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13603         rather than an int.
13605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13606             Alan Hayward  <alan.hayward@arm.com>
13607             David Sherwood  <david.sherwood@arm.com>
13609         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13610         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13611         via stack temporaries.  Treat the mode size as polynomial too.
13613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13614             Alan Hayward  <alan.hayward@arm.com>
13615             David Sherwood  <david.sherwood@arm.com>
13617         * expr.c (expand_expr_real_2): When handling conversions involving
13618         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13619         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13620         as a poly_uint64 too.
13622 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13623             Alan Hayward  <alan.hayward@arm.com>
13624             David Sherwood  <david.sherwood@arm.com>
13626         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13629             Alan Hayward  <alan.hayward@arm.com>
13630             David Sherwood  <david.sherwood@arm.com>
13632         * combine.c (can_change_dest_mode): Handle polynomial
13633         REGMODE_NATURAL_SIZE.
13634         * expmed.c (store_bit_field_1): Likewise.
13635         * expr.c (store_constructor): Likewise.
13636         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13637         and polynomial REGMODE_NATURAL_SIZE.
13638         (gen_lowpart_common): Likewise.
13639         * reginfo.c (record_subregs_of_mode): Likewise.
13640         * rtlanal.c (read_modify_subreg_p): Likewise.
13642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13643             Alan Hayward  <alan.hayward@arm.com>
13644             David Sherwood  <david.sherwood@arm.com>
13646         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13647         numbers of elements.
13649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13650             Alan Hayward  <alan.hayward@arm.com>
13651             David Sherwood  <david.sherwood@arm.com>
13653         * match.pd: Cope with polynomial numbers of vector elements.
13655 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13656             Alan Hayward  <alan.hayward@arm.com>
13657             David Sherwood  <david.sherwood@arm.com>
13659         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13660         in a POINTER_PLUS_EXPR.
13662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13663             Alan Hayward  <alan.hayward@arm.com>
13664             David Sherwood  <david.sherwood@arm.com>
13666         * omp-simd-clone.c (simd_clone_subparts): New function.
13667         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13668         (ipa_simd_modify_function_body): Likewise.
13670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13671             Alan Hayward  <alan.hayward@arm.com>
13672             David Sherwood  <david.sherwood@arm.com>
13674         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13675         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13676         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13677         (expand_vector_condition, vector_element): Likewise.
13678         (subparts_gt): New function.
13679         (get_compute_type): Use subparts_gt.
13680         (count_type_subparts): Delete.
13681         (expand_vector_operations_1): Use subparts_gt instead of
13682         count_type_subparts.
13684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13685             Alan Hayward  <alan.hayward@arm.com>
13686             David Sherwood  <david.sherwood@arm.com>
13688         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13689         (vect_compile_time_alias): ...this new function.  Do the calculation
13690         on poly_ints rather than trees.
13691         (vect_prune_runtime_alias_test_list): Update call accordingly.
13693 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13694             Alan Hayward  <alan.hayward@arm.com>
13695             David Sherwood  <david.sherwood@arm.com>
13697         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13698         numbers of units.
13699         (vect_schedule_slp_instance): Likewise.
13701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13702             Alan Hayward  <alan.hayward@arm.com>
13703             David Sherwood  <david.sherwood@arm.com>
13705         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13706         constant and extern definitions for variable-length vectors.
13707         (vect_get_constant_vectors): Note that the number of units
13708         is known to be constant.
13710 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13711             Alan Hayward  <alan.hayward@arm.com>
13712             David Sherwood  <david.sherwood@arm.com>
13714         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13715         of units as polynomial.  Choose between WIDE and NARROW based
13716         on multiple_p.
13718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13719             Alan Hayward  <alan.hayward@arm.com>
13720             David Sherwood  <david.sherwood@arm.com>
13722         * tree-vect-stmts.c (simd_clone_subparts): New function.
13723         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13726             Alan Hayward  <alan.hayward@arm.com>
13727             David Sherwood  <david.sherwood@arm.com>
13729         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13730         vectors as polynomial.  Use build_index_vector for
13731         IFN_GOMP_SIMD_LANE.
13733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13734             Alan Hayward  <alan.hayward@arm.com>
13735             David Sherwood  <david.sherwood@arm.com>
13737         * tree-vect-stmts.c (get_load_store_type): Treat the number of
13738         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13739         for variable-length vectors.
13740         (vectorizable_mask_load_store): Treat the number of units as
13741         polynomial, asserting that it is constant if the condition has
13742         already been enforced.
13743         (vectorizable_store, vectorizable_load): Likewise.
13745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13746             Alan Hayward  <alan.hayward@arm.com>
13747             David Sherwood  <david.sherwood@arm.com>
13749         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13750         of units as polynomial.  Punt if we can't tell at compile time
13751         which vector contains the final result.
13753 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13754             Alan Hayward  <alan.hayward@arm.com>
13755             David Sherwood  <david.sherwood@arm.com>
13757         * tree-vect-loop.c (vectorizable_induction): Treat the number
13758         of units as polynomial.  Punt on SLP inductions.  Use an integer
13759         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
13760         cast of such a series for variable-length floating-point
13761         reductions.
13763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13764             Alan Hayward  <alan.hayward@arm.com>
13765             David Sherwood  <david.sherwood@arm.com>
13767         * tree.h (build_index_vector): Declare.
13768         * tree.c (build_index_vector): New function.
13769         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
13770         of units as polynomial, forcibly converting it to a constant if
13771         vectorizable_reduction has already enforced the condition.
13772         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
13773         to create a {1,2,3,...} vector.
13774         (vectorizable_reduction): Treat the number of units as polynomial.
13775         Choose vectype_in based on the largest scalar element size rather
13776         than the smallest number of units.  Enforce the restrictions
13777         relied on above.
13779 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13780             Alan Hayward  <alan.hayward@arm.com>
13781             David Sherwood  <david.sherwood@arm.com>
13783         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
13784         number of units as polynomial.
13786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13787             Alan Hayward  <alan.hayward@arm.com>
13788             David Sherwood  <david.sherwood@arm.com>
13790         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
13791         * target.def (autovectorize_vector_sizes): Return the vector sizes
13792         by pointer, using vector_sizes rather than a bitmask.
13793         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
13794         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
13795         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
13796         Likewise.
13797         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
13798         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
13799         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
13800         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
13801         * omp-general.c (omp_max_vf): Likewise.
13802         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13803         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
13804         * tree-vect-loop.c (vect_analyze_loop): Likewise.
13805         * tree-vect-slp.c (vect_slp_bb): Likewise.
13806         * doc/tm.texi: Regenerate.
13807         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
13808         to a poly_uint64.
13809         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13810         the vector size as a poly_uint64 rather than an unsigned int.
13811         (current_vector_size): Change from an unsigned int to a poly_uint64.
13812         (get_vectype_for_scalar_type): Update accordingly.
13813         * tree.h (build_truth_vector_type): Take the size and number of
13814         units as a poly_uint64 rather than an unsigned int.
13815         (build_vector_type): Add a temporary overload that takes
13816         the number of units as a poly_uint64 rather than an unsigned int.
13817         * tree.c (make_vector_type): Likewise.
13818         (build_truth_vector_type): Take the number of units as a poly_uint64
13819         rather than an unsigned int.
13821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13822             Alan Hayward  <alan.hayward@arm.com>
13823             David Sherwood  <david.sherwood@arm.com>
13825         * target.def (get_mask_mode): Take the number of units and length
13826         as poly_uint64s rather than unsigned ints.
13827         * targhooks.h (default_get_mask_mode): Update accordingly.
13828         * targhooks.c (default_get_mask_mode): Likewise.
13829         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13830         * doc/tm.texi: Regenerate.
13832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13833             Alan Hayward  <alan.hayward@arm.com>
13834             David Sherwood  <david.sherwood@arm.com>
13836         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13837         * omp-general.c (omp_max_vf): Likewise.
13838         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13839         (expand_omp_simd): Handle polynomial safelen.
13840         * omp-low.c (omplow_simd_context): Add a default constructor.
13841         (omplow_simd_context::max_vf): Change from int to poly_uint64.
13842         (lower_rec_simd_input_clauses): Update accordingly.
13843         (lower_rec_input_clauses): Likewise.
13845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13846             Alan Hayward  <alan.hayward@arm.com>
13847             David Sherwood  <david.sherwood@arm.com>
13849         * tree-vectorizer.h (vect_nunits_for_cost): New function.
13850         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13851         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13852         (vect_analyze_slp_cost): Likewise.
13853         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13854         (vect_model_load_cost): Likewise.
13856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13857             Alan Hayward  <alan.hayward@arm.com>
13858             David Sherwood  <david.sherwood@arm.com>
13860         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13861         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13862         from an unsigned int * to a poly_uint64_pod *.
13863         (calculate_unrolling_factor): New function.
13864         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
13866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13867             Alan Hayward  <alan.hayward@arm.com>
13868             David Sherwood  <david.sherwood@arm.com>
13870         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13871         from an unsigned int to a poly_uint64.
13872         (_loop_vec_info::slp_unrolling_factor): Likewise.
13873         (_loop_vec_info::vectorization_factor): Change from an int
13874         to a poly_uint64.
13875         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13876         (vect_get_num_vectors): New function.
13877         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13878         (vect_get_num_copies): Use vect_get_num_vectors.
13879         (vect_analyze_data_ref_dependences): Change max_vf from an int *
13880         to an unsigned int *.
13881         (vect_analyze_data_refs): Change min_vf from an int * to a
13882         poly_uint64 *.
13883         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13884         than an unsigned HOST_WIDE_INT.
13885         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13886         (vect_analyze_data_ref_dependence): Change max_vf from an int *
13887         to an unsigned int *.
13888         (vect_analyze_data_ref_dependences): Likewise.
13889         (vect_compute_data_ref_alignment): Handle polynomial vf.
13890         (vect_enhance_data_refs_alignment): Likewise.
13891         (vect_prune_runtime_alias_test_list): Likewise.
13892         (vect_shift_permute_load_chain): Likewise.
13893         (vect_supportable_dr_alignment): Likewise.
13894         (dependence_distance_ge_vf): Take the vectorization factor as a
13895         poly_uint64 rather than an unsigned HOST_WIDE_INT.
13896         (vect_analyze_data_refs): Change min_vf from an int * to a
13897         poly_uint64 *.
13898         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13899         vfm1 as a poly_uint64 rather than an int.  Make the same change
13900         for the returned bound_scalar.
13901         (vect_gen_vector_loop_niters): Handle polynomial vf.
13902         (vect_do_peeling): Likewise.  Update call to
13903         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13904         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13905         be constant.
13906         * tree-vect-loop.c (vect_determine_vectorization_factor)
13907         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13908         (vect_get_known_peeling_cost): Likewise.
13909         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13910         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13911         (vect_transform_loop): Likewise.  Use the lowest possible VF when
13912         updating the upper bounds of the loop.
13913         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
13914         rather than an int.
13915         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13916         polynomial unroll factors.
13917         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13918         (vect_make_slp_decision): Likewise.
13919         (vect_supported_load_permutation_p): Likewise, and polynomial
13920         vf too.
13921         (vect_analyze_slp_cost): Handle polynomial vf.
13922         (vect_slp_analyze_node_operations): Likewise.
13923         (vect_slp_analyze_bb_1): Likewise.
13924         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13925         than an unsigned HOST_WIDE_INT.
13926         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13927         (vectorizable_load): Handle polynomial vf.
13928         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13929         a poly_uint64.
13930         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13933             Alan Hayward  <alan.hayward@arm.com>
13934             David Sherwood  <david.sherwood@arm.com>
13936         * match.pd: Handle bit operations involving three constants
13937         and try to fold one pair.
13939 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13941         * tree-vect-loop-manip.c: Include gimple-fold.h.
13942         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13943         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
13944         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13945         Add a path that uses a step of VF instead of 1, but disable it
13946         for now.
13947         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13948         and niters_no_overflow parameters.  Update calls to
13949         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13950         Create a new SSA name if the latter choses to use a ste other
13951         than zero, and return it via niters_vector_mult_vf_var.
13952         * tree-vect-loop.c (vect_transform_loop): Update calls to
13953         vect_do_peeling, vect_gen_vector_loop_niters and
13954         slpeel_make_loop_iterate_ntimes.
13955         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13956         (vect_gen_vector_loop_niters): Update declarations after above changes.
13958 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
13960         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13961         128-bit round to integer instructions.
13962         (ceil<mode>2): Likewise.
13963         (btrunc<mode>2): Likewise.
13964         (round<mode>2): Likewise.
13966 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13968         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13969         unaligned VSX load/store on P8/P9.
13970         (expand_block_clear): Allow the use of unaligned VSX
13971         load/store on P8/P9.
13973 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13975         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13976         New function.
13977         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13978         swap associated with both a load and a store.
13980 2018-01-02  Andrew Waterman  <andrew@sifive.com>
13982         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13983         * config/riscv/riscv.md (clear_cache): Use it.
13985 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
13987         * web.c: Remove out-of-date comment.
13989 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13991         * expr.c (fixup_args_size_notes): Check that any existing
13992         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13993         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13994         (emit_single_push_insn): ...here.
13996 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13998         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13999         (const_vector_encoded_nelts): New function.
14000         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14001         (const_vector_int_elt, const_vector_elt): Declare.
14002         * emit-rtl.c (const_vector_int_elt_1): New function.
14003         (const_vector_elt): Likewise.
14004         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14005         of CONST_VECTOR_ELT.
14007 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14009         * expr.c: Include rtx-vector-builder.h.
14010         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14011         directly on the tree encoding.
14012         (const_vector_from_tree): Likewise.
14013         * optabs.c: Include rtx-vector-builder.h.
14014         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14015         sequence of "u" values.
14016         * vec-perm-indices.c: Include rtx-vector-builder.h.
14017         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14018         directly on the vec_perm_indices encoding.
14020 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14022         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14023         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14024         * rtx-vector-builder.h: New file.
14025         * rtx-vector-builder.c: Likewise.
14026         * rtl.h (rtx_def::u2): Add a const_vector field.
14027         (CONST_VECTOR_NPATTERNS): New macro.
14028         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14029         (CONST_VECTOR_DUPLICATE_P): Likewise.
14030         (CONST_VECTOR_STEPPED_P): Likewise.
14031         (CONST_VECTOR_ENCODED_ELT): Likewise.
14032         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14033         (unwrap_const_vec_duplicate): Likewise.
14034         (const_vec_series_p): Check for a non-duplicated vector encoding.
14035         Say that the function only returns true for integer vectors.
14036         * emit-rtl.c: Include rtx-vector-builder.h.
14037         (gen_const_vec_duplicate_1): Delete.
14038         (gen_const_vector): Call gen_const_vec_duplicate instead of
14039         gen_const_vec_duplicate_1.
14040         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14041         (gen_const_vec_duplicate): Use rtx_vector_builder.
14042         (gen_const_vec_series): Likewise.
14043         (gen_rtx_CONST_VECTOR): Likewise.
14044         * config/powerpcspe/powerpcspe.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.
14048         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14049         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14050         Build a new vector rather than modifying a CONST_VECTOR in-place.
14051         (handle_special_swappables): Update call accordingly.
14053 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14055         * simplify-rtx.c (simplify_const_binary_operation): Use
14056         CONST_VECTOR_ELT instead of XVECEXP.
14058 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14060         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14061         the selector elements to be different from the data elements
14062         if the selector is a VECTOR_CST.
14063         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14064         ssizetype for the selector.
14066 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14068         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14069         before testing each element individually.
14070         * tree-vect-generic.c (lower_vec_perm): Likewise.
14072 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14074         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14075         * selftest-run-tests.c (selftest::run_tests): Call it.
14076         * vector-builder.h (vector_builder::operator ==): New function.
14077         (vector_builder::operator !=): Likewise.
14078         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14079         (vec_perm_indices::all_from_input_p): New function.
14080         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14081         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14082         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14083         instead of reading the VECTOR_CST directly.  Detect whether both
14084         vector inputs are the same before constructing the vec_perm_indices,
14085         and update the number of inputs argument accordingly.  Use the
14086         utility functions added above.  Only construct sel2 if we need to.
14088 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14090         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14091         the broadcast of the low byte.
14092         (expand_mult_highpart): Use an explicit encoding for the permutes.
14093         * optabs-query.c (can_mult_highpart_p): Likewise.
14094         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14095         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14096         (vectorizable_bswap): Likewise.
14097         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14098         explicit encoding for the power-of-2 permutes.
14099         (vect_permute_store_chain): Likewise.
14100         (vect_grouped_load_supported): Likewise.
14101         (vect_permute_load_chain): Likewise.
14103 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14105         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14106         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14107         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14108         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14109         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14110         (vect_gen_perm_mask_any): Likewise.
14112 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14114         * int-vector-builder.h: New file.
14115         * vec-perm-indices.h: Include int-vector-builder.h.
14116         (vec_perm_indices): Redefine as an int_vector_builder.
14117         (auto_vec_perm_indices): Delete.
14118         (vec_perm_builder): Redefine as a stand-alone class.
14119         (vec_perm_indices::vec_perm_indices): New function.
14120         (vec_perm_indices::clamp): Likewise.
14121         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14122         (vec_perm_indices::new_vector): New function.
14123         (vec_perm_indices::new_expanded_vector): Update for new
14124         vec_perm_indices class.
14125         (vec_perm_indices::rotate_inputs): New function.
14126         (vec_perm_indices::all_in_range_p): Operate directly on the
14127         encoded form, without computing elided elements.
14128         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14129         encoding.  Update for new vec_perm_indices class.
14130         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14131         the given vec_perm_builder.
14132         (expand_vec_perm_var): Update vec_perm_builder constructor.
14133         (expand_mult_highpart): Use vec_perm_builder instead of
14134         auto_vec_perm_indices.
14135         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14136         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14137         or double series encoding as appropriate.
14138         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14139         vec_perm_indices instead of auto_vec_perm_indices.
14140         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14141         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14142         (vect_permute_store_chain): Likewise.
14143         (vect_grouped_load_supported): Likewise.
14144         (vect_permute_load_chain): Likewise.
14145         (vect_shift_permute_load_chain): Likewise.
14146         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14147         (vect_transform_slp_perm_load): Likewise.
14148         (vect_schedule_slp_instance): Likewise.
14149         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14150         (vectorizable_mask_load_store): Likewise.
14151         (vectorizable_bswap): Likewise.
14152         (vectorizable_store): Likewise.
14153         (vectorizable_load): Likewise.
14154         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14155         vec_perm_indices instead of auto_vec_perm_indices.  Use
14156         tree_to_vec_perm_builder to read the vector from a tree.
14157         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14158         vec_perm_builder instead of a vec_perm_indices.
14159         (have_whole_vector_shift): Use vec_perm_builder and
14160         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14161         truncation to calc_vec_perm_mask_for_shift.
14162         (vect_create_epilog_for_reduction): Likewise.
14163         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14164         from auto_vec_perm_indices to vec_perm_indices.
14165         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14166         instead of changing individual elements.
14167         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14168         the vector in d.perm.
14169         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14170         from auto_vec_perm_indices to vec_perm_indices.
14171         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14172         instead of changing individual elements.
14173         (arm_vectorize_vec_perm_const): Use new_vector to install
14174         the vector in d.perm.
14175         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14176         Update vec_perm_builder constructor.
14177         (rs6000_expand_interleave): Likewise.
14178         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14179         (rs6000_expand_interleave): Likewise.
14181 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14183         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14184         to qimode could truncate the indices.
14185         * optabs.c (expand_vec_perm_var): Likewise.
14187 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14189         * Makefile.in (OBJS): Add vec-perm-indices.o.
14190         * vec-perm-indices.h: New file.
14191         * vec-perm-indices.c: Likewise.
14192         * target.h (vec_perm_indices): Replace with a forward class
14193         declaration.
14194         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14195         * optabs.h: Include vec-perm-indices.h.
14196         (expand_vec_perm): Delete.
14197         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14198         (expand_vec_perm_const): Declare.
14199         * target.def (vec_perm_const_ok): Replace with...
14200         (vec_perm_const): ...this new hook.
14201         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14202         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14203         * doc/tm.texi: Regenerate.
14204         * optabs.def (vec_perm_const): Delete.
14205         * doc/md.texi (vec_perm_const): Likewise.
14206         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14207         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14208         expand_vec_perm for constant permutation vectors.  Assert that
14209         the mode of variable permutation vectors is the integer equivalent
14210         of the mode that is being permuted.
14211         * optabs-query.h (selector_fits_mode_p): Declare.
14212         * optabs-query.c: Include vec-perm-indices.h.
14213         (selector_fits_mode_p): New function.
14214         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14215         is defined, instead of checking whether the vec_perm_const_optab
14216         exists.  Use targetm.vectorize.vec_perm_const instead of
14217         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14218         fit in the vector mode before using a variable permute.
14219         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14220         vec_perm_indices instead of an rtx.
14221         (expand_vec_perm): Replace with...
14222         (expand_vec_perm_const): ...this new function.  Take the selector
14223         as a vec_perm_indices rather than an rtx.  Also take the mode of
14224         the selector.  Update call to shift_amt_for_vec_perm_mask.
14225         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14226         Use vec_perm_indices::new_expanded_vector to expand the original
14227         selector into bytes.  Check whether the indices fit in the vector
14228         mode before using a variable permute.
14229         (expand_vec_perm_var): Make global.
14230         (expand_mult_highpart): Use expand_vec_perm_const.
14231         * fold-const.c: Includes vec-perm-indices.h.
14232         * tree-ssa-forwprop.c: Likewise.
14233         * tree-vect-data-refs.c: Likewise.
14234         * tree-vect-generic.c: Likewise.
14235         * tree-vect-loop.c: Likewise.
14236         * tree-vect-slp.c: Likewise.
14237         * tree-vect-stmts.c: Likewise.
14238         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14239         Delete.
14240         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14241         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14242         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14243         (aarch64_vectorize_vec_perm_const): ...this new function.
14244         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14245         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14246         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14247         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14248         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14249         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14250         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14251         into...
14252         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14253         check for NEON modes.
14254         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14255         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14256         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14257         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14258         into...
14259         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14260         the old VEC_PERM_CONST conditions.
14261         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14262         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14263         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14264         (ia64_vectorize_vec_perm_const_ok): Merge into...
14265         (ia64_vectorize_vec_perm_const): ...this new function.
14266         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14267         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14268         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14269         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14270         * config/mips/mips.c (mips_expand_vec_perm_const)
14271         (mips_vectorize_vec_perm_const_ok): Merge into...
14272         (mips_vectorize_vec_perm_const): ...this new function.
14273         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14274         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14275         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14276         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14277         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14278         (rs6000_expand_vec_perm_const): Delete.
14279         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14280         Delete.
14281         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14282         (altivec_expand_vec_perm_const_le): Take each operand individually.
14283         Operate on constant selectors rather than rtxes.
14284         (altivec_expand_vec_perm_const): Likewise.  Update call to
14285         altivec_expand_vec_perm_const_le.
14286         (rs6000_expand_vec_perm_const): Delete.
14287         (rs6000_vectorize_vec_perm_const_ok): Delete.
14288         (rs6000_vectorize_vec_perm_const): New function.
14289         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14290         an element count and rtx array.
14291         (rs6000_expand_extract_even): Update call accordingly.
14292         (rs6000_expand_interleave): Likewise.
14293         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14294         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14295         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14296         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14297         (rs6000_expand_vec_perm_const): Delete.
14298         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14299         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14300         (altivec_expand_vec_perm_const_le): Take each operand individually.
14301         Operate on constant selectors rather than rtxes.
14302         (altivec_expand_vec_perm_const): Likewise.  Update call to
14303         altivec_expand_vec_perm_const_le.
14304         (rs6000_expand_vec_perm_const): Delete.
14305         (rs6000_vectorize_vec_perm_const_ok): Delete.
14306         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14307         reference to the SPE evmerge intructions.
14308         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14309         an element count and rtx array.
14310         (rs6000_expand_extract_even): Update call accordingly.
14311         (rs6000_expand_interleave): Likewise.
14312         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14313         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14314         new function.
14315         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14317 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14319         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14320         vector mode and that that mode matches the mode of the data
14321         being permuted.
14322         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14323         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14324         directly using expand_vec_perm_1 when forcing selectors into
14325         registers.
14326         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14328 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14330         * optabs-query.h (can_vec_perm_p): Delete.
14331         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14332         * optabs-query.c (can_vec_perm_p): Split into...
14333         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14334         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14335         particular selector is valid.
14336         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14337         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14338         (vect_grouped_load_supported): Likewise.
14339         (vect_shift_permute_load_chain): Likewise.
14340         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14341         (vect_transform_slp_perm_load): Likewise.
14342         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14343         (vectorizable_bswap): Likewise.
14344         (vect_gen_perm_mask_checked): Likewise.
14345         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14346         implementations of variable permutation vectors into account
14347         when deciding which selector to use.
14348         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14349         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14350         with a false third argument.
14351         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14352         to test whether the constant selector is valid and can_vec_perm_var_p
14353         to test whether a variable selector is valid.
14355 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14357         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14358         * optabs-query.c (can_vec_perm_p): Likewise.
14359         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14360         instead of vec_perm_indices.
14361         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14362         (vect_gen_perm_mask_checked): Likewise,
14363         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14364         (vect_gen_perm_mask_checked): Likewise,
14366 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14368         * optabs-query.h (qimode_for_vec_perm): Declare.
14369         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14370         (qimode_for_vec_perm): ...this new function.
14371         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14373 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14375         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14376         does not have a conditional at the top.
14378 2018-01-02  Richard Biener  <rguenther@suse.de>
14380         * ipa-inline.c (big_speedup_p): Fix expression.
14382 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14384         PR target/81616
14385         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14386         for generic 4->6.
14388 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14390         PR target/81616
14391         Generic tuning.
14392         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14393         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14394         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14395         cond_taken_branch_cost 3->4.
14397 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14399         PR tree-optimization/83581
14400         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14401         TODO_cleanup_cfg if any changes have been made.
14403         PR middle-end/83608
14404         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14405         convert_modes if target mode has the right side, but different mode
14406         class.
14408         PR middle-end/83609
14409         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14410         last argument when extracting from CONCAT.  If either from_real or
14411         from_imag is NULL, use expansion through memory.  If result is not
14412         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14413         the parts directly to inner mode, if even that fails, use expansion
14414         through memory.
14416         PR middle-end/83623
14417         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14418         check for bswap in mode rather than HImode and use that in expand_unop
14419         too.
14421 Copyright (C) 2018 Free Software Foundation, Inc.
14423 Copying and distribution of this file, with or without modification,
14424 are permitted in any medium without royalty provided the copyright
14425 notice and this notice are preserved.