Add IFN_COND_{MUL,DIV,MOD,RDIV}
[official-gcc.git] / gcc / ChangeLog
blob45566e6a13a5114155334c6461069a5bbf3d3880
1 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3         * doc/sourcebuild.texi (vect_double_cond_arith): Include
4         multiplication and division.
5         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6         (cond_udiv@var{m}, cond_umod@var{m}): Document.
7         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8         (cond_udiv_optab, cond_umod_optab): New optabs.
9         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10         (IFN_COND_RDIV): New internal functions.
11         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
12         TRUNC_MOD_EXPR and RDIV_EXPR.
13         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15         New unspecs.
16         (SVE_INT_BINARY): Include mult.
17         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18         (optab, sve_int_op): Handle mult.
19         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
20         UNSPEC_COND_DIV.
21         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
22         for SVE_INT_BINARY_SD.
24 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
26         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
27         (optab, sve_int_op): Handle div and udiv.
28         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
29         for SVE_INT_BINARY_SD.
30         (*<optab><mode>3): New insn for the same.
32 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
34         * tree-vect-patterns.c: Include predict.h.
35         (vect_recog_divmod_pattern): Restrict check for division support
36         to when optimizing for size.
38 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
40         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
41         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
42         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
43         (gimple_match_op::set_op): Likewise.
44         (gimple_resimplify4): Declare.
45         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
46         (expr::gen_transform): Likewise.
47         (decision_tree::gen): Generate a simplification routine for 4 operands.
48         * gimple-match-head.c (gimple_simplify): Add an overload for
49         4 operands.  In the top-level function, handle up to 4 call
50         arguments and call gimple_resimplify4.
51         (gimple_resimplify4): New function.
52         (build_call_internal): Pass a fourth operand.
53         (maybe_push_to_seq): Likewise.
54         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
55         Fold VEC_COND_EXPRs of an operation and a default value into
56         an IFN_COND_* function if possible.
57         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
58         New unspecs.
59         (SVE_COND_FP_BINARY): Include them.
60         (optab, sve_fp_op): Handle them.
61         (SVE_INT_BINARY_REV): New code iterator.
62         (SVE_COND_FP_BINARY_REV): New int iterator.
63         (commutative): New int attribute.
64         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
65         Declare.
66         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
67         function.
68         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
69         (*cond_<optab><mode>): New patterns for reversed operands.
71 2018-05-25  Richard Biener  <rguenther@suse.de>
73         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
74         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
75         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
76         (STMT_VINFO_GROUPED_ACCESS): Adjust.
77         * tree-vect-data-refs.c (everywhere): Adjust users.
78         * tree-vect-loop.c (everywhere): Likewise.
79         * tree-vect-slp.c (everywhere): Likewise.
80         * tree-vect-stmts.c (everywhere): Likewise.
81         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
83 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
85         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
86         Rename to...
87         (gcc_cv_as_section_exclude): ... this.
88         Try Solaris as #exclude syntax.
89         * configure: Regenerate.
90         * config.in: Regenerate.
91         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
92         SECTION_EXCLUDE.
93         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
94         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
96         * varasm.c (default_elf_asm_named_section): Don't check if
97         HAVE_GAS_SECTION_EXCLUDE is defined.
99 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
101         * doc/md.texi: Update the documentation of the cond_* optabs
102         to mention the new final operand.  Fix GET_MODE_NUNITS call.
103         Describe the scalar case too.
104         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
105         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
106         instead of 2.
107         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
108         (get_conditional_internal_fn): Update comment.
109         * tree-vect-loop.c (vectorizable_reduction): Pass the original
110         accumulator value as a final argument to conditional functions.
111         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
112         a define_expand and add an "else" operand.  Assert for now that
113         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
114         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
115         (*cond_<optab><mode>): New patterns.
116         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
117         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
118         (UNSPEC_COND_EOR): Delete.
119         (optab): Remove associated mappings.
120         (SVE_INT_BINARY): New code iterator.
121         (sve_int_op): Remove int attribute and add "minus" to the code
122         attribute.
123         (SVE_COND_INT_OP): Delete.
124         (SVE_COND_FP_OP): Rename to...
125         (SVE_COND_FP_BINARY): ...this.
127 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
129         * optabs.c (can_reuse_operands_p): New function.
130         (maybe_legitimize_operands): Try to reuse the results for
131         earlier operands.
133 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
135         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
136         Add {q} suffix to insn mnemonic.
138 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
140         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
141         (msp430_warn_func_return): New.
143 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
145         * fold-const.c (tree_nonzero_bits): New function.
146         * fold-const.h (tree_nonzero_bits): Likewise.
147         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
148         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
150 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
152         PR target/85900
153         PR target/85345
154         * varasm.c (assemble_alias): Check ifunc_resolver only on
155         FUNCTION_DECL.
157 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
159         PR target/85903
160         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
161         when memory input operand is handled.
163 2018-05-24  Luis Machado  <luis.machado@linaro.org>
165         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
166         global.
167         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
169 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
171         * match.pd: Delay FMA folds until after vectorization.
173 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
175         PR target/83009
176         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
177         address check not strict.
179 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
181         * gimple-match.h (gimple_match_op): New class.
182         (mprts_hook): Replace parameters with a gimple_match_op *.
183         (maybe_build_generic_op): Likewise.
184         (gimple_simplified_result_is_gimple_val): Replace parameters with
185         a const gimple_match_op *.
186         (gimple_simplify): Replace code_helper * and tree * parameters with
187         a gimple_match_op * parameter.
188         (gimple_resimplify1): Replace code_helper *, tree and tree *
189         parameters with a gimple_match_op * parameter.
190         (gimple_resimplify2): Likewise.
191         (gimple_resimplify3): Likewise.
192         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
193         parameters with a gimple_match_op * parameter.
194         * gimple-match-head.c (gimple_simplify): Change prototypes of
195         auto-generated functions to take a gimple_match_op * instead of
196         separate code_helper * and tree * parameters.  Make the same
197         change in the top-level overload and update calls to the
198         gimple_resimplify routines.  Update calls to the auto-generated
199         functions and to maybe_push_res_to_seq in the publicly-facing
200         operation-specific gimple_simplify overloads.
201         (gimple_match_op::MAX_NUM_OPS): Define.
202         (gimple_resimplify1): Replace rcode and ops with a single res_op
203         parameter.  Update call to gimple_simplify.
204         (gimple_resimplify2): Likewise.
205         (gimple_resimplify3): Likewise.
206         (mprts_hook): Replace parameters with a gimple_match_op *.
207         (maybe_build_generic_op): Likewise.
208         (build_call_internal): Replace type, nargs and ops with
209         a gimple_match_op *.
210         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
211         with a single gimple_match_op *.  Update calls to mprts_hook,
212         build_call_internal and gimple_simplified_result_is_gimple_val.
213         Factor out code that is common to the tree_code and combined_fn cases.
214         * genmatch.c (expr::gen_transform): Replace tem_code and
215         tem_ops with a gimple_match_op called tem_op.  Update calls
216         to the gimple_resimplify functions and maybe_push_res_to_seq.
217         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
218         res_ops.  Update call to the gimple_resimplify functions.
219         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
220         (decision_tree::gen): Make the functions take a gimple_match_op *
221         called res_op instead of separate res_code and res_ops parameters.
222         Update call accordingly.
223         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
224         and ops with a single res_op parameter.  Update calls to
225         maybe_build_generic_op and maybe_push_res_to_seq.
226         (fold_stmt_1): Update calls to gimple_simplify and
227         replace_stmt_with_simplification.
228         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
229         and gimple_simplified_result_is_gimple_val.
230         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
231         gimple_simplify.
232         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
233         with a gimple_match_op *.
234         (vn_nary_build_or_lookup): Likewise.  Update call to
235         vn_nary_build_or_lookup_1.
236         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
237         gimple_match_op *.  Update calls to the gimple_resimplify routines
238         and to gimple_simplified_result_is_gimple_val.
239         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
240         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
241         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
242         (visit_nary_op): Likewise.
243         (visit_reference_op_load): Likewise.
245 2018-05-23  Luis Machado  <luis.machado@linaro.org>
247         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
248         modifier for printing the step amount.
250 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
252         PR target/78849
253         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
254         types.
256 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
258         * doc/sourcebuild.texi (Endianness): New subsubsection.
260 2018-05-23  Luis Machado  <luis.machado@linaro.org>
262         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
263         <prefetch_dynamic_strides>: New const bool field.
264         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
265         prefetch_dynamic_strides.
266         (exynosm1_prefetch_tune): Likewise.
267         (thunderxt88_prefetch_tune): Likewise.
268         (thunderx_prefetch_tune): Likewise.
269         (thunderx2t99_prefetch_tune): Likewise.
270         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
271         false.
272         (aarch64_override_options_internal): Update to set
273         PARAM_PREFETCH_DYNAMIC_STRIDES.
274         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
275         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
276         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
277         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
278         prefetch-dynamic-strides setting.
280 2018-05-23  Luis Machado  <luis.machado@linaro.org>
282         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
283         <minimum_stride>: New const int field.
284         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
285         minimum_stride field defaulting to -1.
286         (exynosm1_prefetch_tune): Likewise.
287         (thunderxt88_prefetch_tune): Likewise.
288         (thunderx_prefetch_tune): Likewise.
289         (thunderx2t99_prefetch_tune): Likewise.
290         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
291         <default_opt_level>: Set to 3.
292         (aarch64_override_options_internal): Update to set
293         PARAM_PREFETCH_MINIMUM_STRIDE.
294         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
295         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
296         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
297         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
298         stride is constant and is below the minimum stride threshold.
300 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
302         * config/arm/arm-cpus.in (mode26): Delete.
303         (armv4): Delete mode26 reference.
304         * config/arm/arm.c (arm_configure_build_target): Delete use of
305         isa_bit_mode26.
307 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
309         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
310         New insn pattern.
311         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
312         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
313         for non-SSE modes.
314         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
315         (floatunsdidf2): Ditto.
317 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
319         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
320         (fixuns_trunc<mode>si2_avx512f): Ditto.
321         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
322         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
323         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
325 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
327         PR rtl-optimization/79985
328         * df-scan.c (df_insn_refs_collect): Remove special case for
329         global registers and asm statements.
331 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
333         * extend.texi (Global Register Variables): Rewrite the bullet list.
334         Note that the register is available for allocation. Note that access
335         via inline asm must use constraints. Add note about async-signal
336         handlers. Remove paragraph about automagic register selection.
338 2018-05-23  Richard Biener  <rguenther@suse.de>
340         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
341         of fixed offset from memset VN.
343 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
345         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
346         first_interp field.
347         (alloc_cand_and_find_basis): Initialize first_interp field.
348         (slsr_process_mul): Modify first_interp field.
349         (slsr_process_add): Likewise.
350         (slsr_process_cast): Modify first_interp field for each new
351         interpretation.
352         (slsr_process_copy): Likewise.
353         (dump_candidate): Dump first_interp field.
354         (replace_mult_candidate): Process all interpretations, not just
355         subsequent ones.
356         (replace_rhs_if_not_dup): Likewise.
357         (replace_one_candidate): Likewise.
359 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
361         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
362         Add new boolean.
363         (aarch64_needs_frame_chain): New function.
364         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
366 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
368         PR target/84882
369         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
370         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
371         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
372         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
373         as true for strict-align.
374         (aarch64_can_inline_p): Perform checks even when callee has no
375         attributes to check for strict alignment.
376         * doc/extend.texi (AArch64 Function Attributes): Document
377         no-strict-align.
378         * doc/invoke.texi: (AArch64 Options): Likewise.
380 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
382         PR tree-optimization/85853
383         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
384         the handling of the root of the node to...
385         (vect_slp_analyze_node_operations_1): ...this new function,
386         and run the whole thing with the child nodes' def types
387         set according to their SLP node's def type.
389 2018-05-23  Richard Biener  <rguenther@suse.de>
391         PR middle-end/85874
392         * tree-data-ref.c (create_runtime_alias_checks): Defer
393         and ignore overflow warnings.
395 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
397         PR tree-optimization/85822
398         * tree-vrp.c (is_masked_range_test): Fix handling of negative
399         constants.
401 2018-05-23  Richard Biener  <rguenther@suse.de>
403         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
404         memset constants via native_interpret_expr.
406 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
408         PR target/85345
409         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
410         attribute.
411         (cgraph_node::create_alias): Likewise.
412         (cgraph_node::get_availability): Check ifunc_resolver instead
413         of looking up ifunc attribute.
414         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
415         * varasm.c (do_assemble_alias): Likewise.
416         (assemble_alias): Likewise.
417         (default_binds_local_p_3): Likewise.
418         * cgraph.h (cgraph_node): Add ifunc_resolver.
419         (cgraph_node::only_called_directly_or_aliased_p): Return false
420         for IFUNC resolver.
421         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
422         attribute.
423         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
424         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
425         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
426         instead of looking up ifunc attribute.
428 2018-05-22  Luis Machado  <luis.machado@linaro.org>
430         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
432 2018-05-22  Martin Sebor  <msebor@redhat.com>
434         PR middle-end/85359
435         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
436         only when expasion succeeds.
437         (expand_builtin_strcmp): Same.
438         (expand_builtin_strncmp): Same.
440 2018-05-22  Martin Sebor  <msebor@redhat.com>
442         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
444 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
445             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
447         * config/aarch64/aarch64-ldpstp.md: Replace uses of
448         aarch64_mem_pair_operand with memory_operand and delete operand swapping
449         code.
450         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
451         Add check for legitimate_address.
452         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
453         (aarch64_swap_ldrstr_operands): New.
454         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
455         Define prototype.
457 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
458             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
460         * config/aarch64/aarch64.md: New patterns to generate stp
461         and ldp.
462         (store_pair_sw, store_pair_dw): New patterns to generate stp for
463         single words and double words.
464         (load_pair_sw, load_pair_dw): Likewise.
465         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
466         Delete.
467         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
468         Delete.
469         * config/aarch64/aarch64-ldpstp.md: Modify peephole
470         for different mode ldpstp and add peephole for merged zero stores.
471         Likewise for loads.
472         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
473         Add size check.
474         (aarch64_gen_store_pair): Rename calls to match new patterns.
475         (aarch64_gen_load_pair): Rename calls to match new patterns.
476         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
477         (load_pair<DREG:mode><DREG2:mode>): ... This.
478         (store_pair<mode>): Rename to...
479         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
480         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
481         New mode iterators.
482         (V_INT_EQUIV): Handle SImode.
483         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
484         New predicate.
486 2018-05-22  Martin Sebor  <msebor@redhat.com>
488         PR c/85623
489         * calls.c (maybe_warn_nonstring_arg): Use string length to set
490         or ajust the presumed bound on an operation to avoid unnecessary
491         warnings.
493 2018-05-22  Martin Sebor  <msebor@redhat.com>
495         PR tree-optimization/85826
496         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
497         assuming that a DECL necesarily has a constant size.
499 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
501         PR middle-end/85862
502         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
504 2018-05-22  Richard Biener  <rguenther@suse.de>
506         PR tree-optimization/85834
507         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
508         non-constant and non-zero memset arguments.
510 2018-05-22  Martin Liska  <mliska@suse.cz>
512         PR ipa/85607
513         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
515 2018-05-22  Richard Biener  <rguenther@suse.de>
517         PR tree-optimization/85863
518         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
519         comparisons when vectype is specified.
520         (vectorizable_condition): Do not specify vectype for
521         vect_is_simple_cond when SLP vectorizing.
523 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
525         PR target/85657
526         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
527         define __ibm128 as long double.
528         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
529         as a distinct type when IEEE 128-bit support is enabled.
530         (init_float128_ieee): Fix up conversions between IFmode and IEEE
531         128-bit types to use the correct functions.
532         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
533         convert between 128-bit floating point types that have different
534         modes but the same representation, instead of using gen_lowpart to
535         makean alias.
536         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
537         KFmode.
538         (IFKF_reg): New attributes to give the register constraints for
539         IFmode and KFmode.
540         (extend<mode>tf2_internal): New insns to mark an explicit
541         conversion between 128-bit floating point types that have a
542         different mode but share the same representation.
544 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
546         PR tree-optimization/85814
547         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
548         a null return from get_strinfo when unsharing the next
549         strinfo in the chain.
551 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
553         PR gcc/84923
554         * varasm.c (weak_finish): Clean up weak_decls.
556 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
558         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
559         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
560         UNSPEC_UADALP values.
561         * config/aarch64/iterators.md (ABAL): New int iterator.
562         (ABDL2): Likewise.
563         (ADALP): Likewise.
564         (sur): Add mappings for the above.
565         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
566         New define_insn.
567         (aarch64_<sur>abal<mode>_4): Likewise.
568         (aarch64_<sur>adalp<mode>_3): Likewise.
569         (<sur>sadv16qi): New define_expand.
571 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
573         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
574         (*movdf_internal): Ditto.
575         (*rcpsf2_sse): Ditto.
576         (*rsqrtsf2_sse): Ditto.
577         (*sqrt<mode>2_sse): Ditto.
579 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
581         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
582         eor3q<mode>4.
583         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
584         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
585         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
586         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
587         vbcaxq_s64): New.
588         * config/aarch64/arm_neon.h: Likewise.
589         * config/aarch64/iterators.md (VQ_I): New.
591 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
593         * config.gcc: Add arc/t-multilib-linux to tmake_file for
594         arc*-*-linux*.
595         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
596         MULTILIB_DIRNAMES
598 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
600         * config/nds32/constraints.md (S): New constraint.
601         * config/nds32/nds32.md (call_internal): Use constraint S.
602         (call_value_internal): Likewise.
603         (sibcall_internal): Likewise.
604         (sibcall_value_internal): Likewise.
606 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
607             Chung-Ju Wu  <jasonwucj@gmail.com>
609         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
610         into consideration.
612 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
613             Chung-Ju Wu  <jasonwucj@gmail.com>
615         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
616         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
617         (nds32_rtx_costs_impl): Simplify.
618         (nds32_address_cost_impl): Simplify.
619         (nds32_init_rtx_costs): New function.
620         (nds32_rtx_costs_speed_prefer): Likewise.
621         (nds32_rtx_costs_size_prefer): Likewise.
622         (nds32_address_cost_speed_prefer): Likewise.
623         (nds32_address_cost_speed_fwprop): Likewise.
624         (nds32_address_cost_size_prefer): Likewise.
625         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
626         * config/nds32/nds32.c (nds32_option_override): Use
627         nds32_init_rtx_costs function.
629 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
631         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
632         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
633         (TARGET_PIPELINE_N8): Likewise.
634         (TARGET_PIPELINE_N10): Likewise.
635         (TARGET_PIPELINE_N13): Likewise.
636         (TARGET_PIPELINE_GRAYWOLF): Likewise.
638 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
640         * config/nds32/nds32-fpu.md: Update copyright year.
642 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
644         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
646 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
648         * config/nds32/nds32.c
649         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
650         * config/nds32/nds32.opt (minline-asm-r15): New option.
652 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
654         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
655         MASK_HW_ABS.
656         * config/nds32/nds32.md (abssi2): New pattern.
658 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
660         * config/i386/i386.md (rex64namesuffix): New mode attribute.
661         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
662         Merge insn pattern from sse_cvtsi2ss<round_name> and
663         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
664         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
665         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
666         using SWI48 mode iterator.
667         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
668         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
669         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
670         pattern from sse_cvttss2si<round_saeonly_name>
671         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
672         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
673         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
674         using SWI48 mode iterator.
675         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
676         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
677         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
678         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
679         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
680         using SWI48 mode iterator.
681         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
682         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
683         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
684         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
685         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
686         SWI48 mode iterator.
687         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
688         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
689         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
690         pattern from sse_cvttsd2si<round_saeonly_name>
691         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
693 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
695         * config/nds32/nds32-md-auxiliary.c
696         (nds32_valid_smw_lwm_base_p): Refine.
697         (nds32_output_smw_single_word): Refine.
698         (nds32_output_smw_double_word): New.
699         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
701 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
703         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
704         (nds32_output_stack_pop): Refine.
705         (nds32_expand_unaligned_load): Refine.
706         (nds32_expand_unaligned_store): Refine.
708 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
709             Chung-Ju Wu  <jasonwucj@gmail.com>
711         * config/nds32/constants.md: Add TP_REGNUM constant.
712         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
713         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
714         UNSPEC_ADD32.
715         * config/nds32/nds32-doubleword.md: Consider flag_pic.
716         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
717         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
718         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
719         and PIC code generation.
720         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
721         code generation.
722         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
723         optimization.
724         * config/nds32/nds32.md: Support TLS and PIC.
725         * config/nds32/nds32.c: Support TLS and PIC.
726         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
727         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
728         predicate.
730 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
732         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
733         mode with E_ prefix.
735 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
736             Chung-Ju Wu  <jasonwucj@gmail.com>
738         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
739         * config/nds32/nds32-md-auxiliary.c
740         (symbolic_reference_mentioned_p): New.
741         (nds32_legitimize_ict_address): New.
742         (nds32_expand_ict_move): New.
743         (nds32_indirect_call_referenced_p): New.
744         (nds32_symbol_binds_local_p): Delete.
745         (nds32_long_call_p): Modify.
746         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
747         * config/nds32/nds32-protos.h
748         (symbolic_reference_mentioned_p): Declare.
749         (nds32_legitimize_ict_address): Declare.
750         (nds32_expand_ict_move): Declare.
751         (nds32_indirect_call_referenced_p): Declare.
752         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
753         (nds32_relax_group): Use nds32_ict_const_p as condition.
754         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
755         (nds32_asm_file_start): Output ict_model directive in asm code.
756         (nds32_legitimate_address_p): Consider indirect call.
757         (nds32_print_operand): Consider indirect call.
758         (nds32_print_operand_address): Consider indirect call.
759         (nds32_insert_attributes): Handle "indirect_call" attribute.
760         (TARGET_LEGITIMATE_ADDRESS_P): Define.
761         (TARGET_LEGITIMATE_CONSTANT_P): Define.
762         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
763         (TARGET_DELEGITIMIZE_ADDRESS): Define.
764         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
765         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
766         (TARGET_ICT_MODEL_SMALL): Define.
767         (TARGET_ICT_MODEL_LARGE): Define.
768         * config/nds32/nds32.md (movsi): Consider ict model.
769         (call, call_value): Consider ict model.
770         (sibcall, sibcall_value): Consider ict model.
771         * config/nds32/nds32.opt (mict-model): New option.
772         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
773         model.
775 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
776             Monk Chiang  <sh.chiang04@gmail.com>
777             Jim Wilson <jimw@sifive.com>
779         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
780         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
781         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
782         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
783         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
784         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
785         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
786         compute save_libcall_adjustment properly.
787         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
788         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
789         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
790         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
791         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
792         (ABI_SPEC): Handle mabi=ilp32e.
793         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
794         (RVE): Add RVE mask.
795         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
796         <-march>: Add rv32e as an example.
798 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
800         PR c++/82899
801         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
802         (intra_create_variable_infos): Handle C++ constructors.
804 2018-05-18  Martin Liska  <mliska@suse.cz>
806         * passes.def: Remove a redundant pass.
808 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
810         PR bootstrap/85838
811         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
813 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
815         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
816         (ARMv4): Update.
817         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
818         (ARMv6m): Update.
819         (armv2, armv2a, armv3, armv3m): Delete architectures.
820         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
821         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
822         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
823         Delete cpus.
824         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
825         (*mulsidi3adddi): Likewise.
826         (mulsidi3): Likewise.
827         (*mulsidi3_nov6): Likewise.
828         (umulsidi3): Likewise.
829         (umulsidi3_nov6): Likewise.
830         (umaddsidi4): Likewise.
831         (*umulsidi3adddi): Likewise.
832         (smulsi3_highpart): Likewise.
833         (*smulsi3_highpart_nov6): Likewise.
834         (umulsi3_highpart): Likewise.
835         (*umulsi3_highpart_nov6): Likewise.
836         * config/arm/arm.h (arm_arch3m): Delete.
837         * config/arm/arm.c (arm_arch3m): Delete.
838         (arm_option_override_internal): Update armv3-related comment.
839         (arm_configure_build_target): Delete use of isa_bit_mode32.
840         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
841         (arm_rtx_costs_internal): Delete check of arm_arch3m.
842         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
843         (mulsa3): Likewise.
844         (mulusa3): Likewise.
845         * config/arm/arm-protos.h (arm_arch3m): Delete.
846         * config/arm/arm-tables.opt: Regenerate.
847         * config/arm/arm-tune.md: Likewise.
848         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
849         deleted architectures.
851 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
853         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
854         (armv5t, armv5te): New features.
855         (ARMv5, ARMv5e): Delete fgroups.
856         (ARMv5t, ARMv5te): Adjust for above changes.
857         (ARMv6m): Likewise.
858         (armv5, armv5e): Delete arches.
859         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
860         arm_arch5.
861         (*call_reg_arm): Likewise.
862         (*call_value_reg_armv5): Likewise.
863         (*call_value_reg_arm): Likewise.
864         (*call_symbol): Likewise.
865         (*call_value_symbol): Likewise.
866         (*sibcall_insn): Likewise.
867         (*sibcall_value_insn): Likewise.
868         (clzsi2): Likewise.
869         (prefetch): Likewise.
870         (define_split and define_peephole2 dependent on arm_arch5):
871         Likewise.
872         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
873         arm_arch5e.
874         (TARGET_ARM_QBIT): Likewise.
875         (TARGET_DSP_MULTIPLY): Likewise.
876         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
877         (arm_arch5, arm_arch5e): Delete.
878         (arm_arch5t, arm_arch5te): Declare.
879         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
880         (arm_arch5t): Declare.
881         (arm_option_reconfigure_globals): Update for the above.
882         (arm_options_perform_arch_sanity_checks): Update comment, replace
883         use of arm_arch5 with arm_arch5t.
884         (use_return_insn): Likewise.
885         (arm_emit_call_insn): Likewise.
886         (output_return_instruction): Likewise.
887         (arm_final_prescan_insn): Likewise.
888         (arm_coproc_builtin_available): Likewise.
889         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
890         arm_arch5e with arm_arch5t and arm_arch5te.
891         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
892         (arm_arch5t, arm_arch5te): Declare.
893         * config/arm/arm-tables.opt: Regenerate.
894         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
895         * config/arm/t-multilib: Likewise.
896         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
897         instead of arm_arch5.
898         (*call_reg_thumb1): Likewise.
899         (*call_value_reg_thumb1_v5): Likewise.
900         (*call_value_reg_thumb1): Likewise.
901         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
902         unreachable path.
903         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
905 2018-05-18  Martin Liska  <mliska@suse.cz>
907         PR gcov-profile/84846
908         * doc/gcov.texi: Document -t option of gcov tool.
910 2018-05-18  Martin Liska  <mliska@suse.cz>
912         PR gcov-profile/84846
913         * gcov.c (print_usage): Add new -t option.
914         (process_args): Handle the option.
915         (generate_results): Use stdout as output when requested by
916         the option.
918 2018-05-18  Martin Liska  <mliska@suse.cz>
920         PR gcov-profile/84846
921         * coverage.c (coverage_init): Write PWD to .gcno file.
922         * doc/gcov.texi: Document how working directory is printed.
923         * gcov-dump.c (dump_gcov_file): Print PWD.
924         * gcov.c (output_intermediate_file): Likewise.
925         (read_graph_file): Read PWD string.
926         (output_lines): Print PWD.
928 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
930         PR middle-end/85817
931         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
932         for retval and return false if all args to phi are zero.        
934 2018-05-18  Richard Biener  <rguenther@suse.de>
936         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
937         method.
938         (evrp_dom_walker::before_dom_children): Call it.
940 2018-05-18  Richard Biener  <rguenther@suse.de>
942         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
943         results when processing array refs with variable index.
945 2018-05-18  Toon Moene  <toon@moene.org>
947         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
948         directly after that of -floop-interchange. Indicate that both
949         options are enabled by default when specifying -O3. 
951 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
953         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
954         iterator.  Delete separate integer-mode vec_set<mode> expander.
955         (aarch64_simd_vec_setv2di): Delete.
956         (vec_setv2di): Delete.
957         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
958         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
959         the "w, r" alternative.
961 2018-05-18  Martin Liska  <mliska@suse.cz>
963         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
964         * tree-pass.h (make_pass_lower_switch_O0): New function.
965         * tree-switch-conversion.c (node_has_low_bound): Remove.
966         (node_has_high_bound): Likewise.
967         (node_is_bounded): Likewise.
968         (class pass_lower_switch): Make it a template type and create
969         two instances.
970         (pass_lower_switch::execute): Add template argument.
971         (make_pass_lower_switch): New function.
972         (make_pass_lower_switch_O0): New function.
973         (do_jump_if_equal): Remove.
974         (emit_case_nodes): Simplify to just handle all 3 cases and leave
975         all the hard work to tree optimization passes.
977 2018-05-18  Martin Liska  <mliska@suse.cz>
979         * dbgcnt.c (limit_low): Renamed from limit.
980         (limit_high): New variable.
981         (dbg_cnt_is_enabled): Check for upper limit.
982         (dbg_cnt): Adjust dumping.
983         (dbg_cnt_set_limit_by_index): Add new argument for high
984         value.
985         (dbg_cnt_set_limit_by_name): Likewise.
986         (dbg_cnt_process_single_pair): Parse new format.
987         (dbg_cnt_process_opt): Use strtok.
988         (dbg_cnt_list_all_counters): Remove 'value' and add
989         'limit_high'.
990         * doc/invoke.texi: Document changes.
992 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
994         * doc/sourcebuild.texi (scalar_all_fma): Document.
995         * tree.def (FMA_EXPR): Delete.
996         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
997         * internal-fn.c (ternary_direct): New macro.
998         (expand_ternary_optab_fn): Likewise.
999         (direct_ternary_optab_supported_p): Likewise.
1000         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1001         * builtins.c (fold_builtin_fma): Delete.
1002         (fold_builtin_3): Don't call it.
1003         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1004         * expr.c (expand_expr_real_2): Likewise.
1005         * fold-const.c (operand_equal_p): Likewise.
1006         (fold_ternary_loc): Likewise.
1007         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1008         * gimple.c (DEFTREECODE): Likewise.
1009         * gimplify.c (gimplify_expr): Likewise.
1010         * optabs-tree.c (optab_for_tree_code): Likewise.
1011         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1012         * tree-eh.c (operation_could_trap_p): Likewise.
1013         (stmt_could_throw_1_p): Likewise.
1014         * tree-inline.c (estimate_operator_cost): Likewise.
1015         * tree-pretty-print.c (dump_generic_node): Likewise.
1016         (op_code_prio): Likewise.
1017         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1018         * tree-ssa-operands.c (get_expr_operands): Likewise.
1019         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1020         * fold-const-call.h (fold_fma): Delete.
1021         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1022         CFN_FNMA and CFN_FNMS.
1023         (fold_fma): Delete.
1024         * genmatch.c (combined_fn): New enum.
1025         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1026         (commutative_op): New function.
1027         (commutate): Use it.  Handle more than 2 operands.
1028         (dt_operand::gen_gimple_expr): Use commutative_op.
1029         (parser::parse_expr): Allow :c to be used with non-binary
1030         operators if the commutative operand is known.
1031         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1032         CFN_FMS, CFN_FNMA and CFN_FNMS.
1033         (backprop::process_assign_use): Remove FMA_EXPR handling.
1034         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1035         (gen_hsa_fma): New function.
1036         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1037         IFN_FNMA and IFN_FNMS.
1038         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1039         * gimple-fold.h (follow_all_ssa_edges): Declare.
1040         * gimple-fold.c (follow_all_ssa_edges): New function.
1041         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1042         gimple_build interface and use follow_all_ssa_edges to fold the result.
1043         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1044         instead of checking for optabs directly.
1045         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1046         rather than FMA_EXPRs.
1047         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1048         call to IFN_FMA instead of an FMA_EXPR.
1050 2018-05-17  Jim Wilson  <jimw@sifive.com>
1052         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1053         sign extended promoted subreg, and the range does not have the sign bit
1054         set, then do a sign extend.
1056         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1057         test, check for sign extended subreg and/or constant operands, and
1058         do a sign extend in that case.
1060 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1062         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1063         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1064         Add untyped.
1065         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1066         Change logics_shift_reg to logics_shift_imm.
1067         (thunderx2t99_fp_loadpair_basic): Delete.
1068         (thunderx2t99_fp_storepair_basic): Delete.
1069         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1070         (thunderx2t99_asimd_polynomial): Delete.
1071         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1072         and neon_fp_mul_d_scalar_q.
1073         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1074         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1075         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1076         (thunderx2t99_asimd_lut): Add missing tbl types.
1077         (thunderx2t99_asimd_ext): Delete.
1078         (thunderx2t99_asimd_load1_1_mult): Delete.
1079         (thunderx2t99_asimd_load1_2_mult): Delete.
1080         (thunderx2t99_asimd_load1_ldp): New.
1081         (thunderx2t99_asimd_load1): New.
1082         (thunderx2t99_asimd_load2): Add missing *load2* types.
1083         (thunderx2t99_asimd_load3): New.
1084         (thunderx2t99_asimd_load4): New.
1085         (thunderx2t99_asimd_store1_1_mult): Delete.
1086         (thunderx2t99_asimd_store1_2_mult): Delete.
1087         (thunderx2t99_asimd_store2_mult): Delete.
1088         (thunderx2t99_asimd_store2_onelane): Delete.
1089         (thunderx2t99_asimd_store_stp): New.
1090         (thunderx2t99_asimd_store1): New.
1091         (thunderx2t99_asimd_store2): New.
1092         (thunderx2t99_asimd_store3): New.
1093         (thunderx2t99_asimd_store4): New.
1095 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1097         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1098         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1100 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1101             Segher Boessenkool  <segher@kernel.crashing.org>
1103         PR target/85698
1104         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1105         operand.
1107 2018-05-17  Richard Biener  <rguenther@suse.de>
1109         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1110         for pruning loop and prune defs feeding only already visited PHIs.
1112 2018-05-17  Richard Biener  <rguenther@suse.de>
1114         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1116 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1117             Richard Biener  <rguenther@suse.de>
1119         PR tree-optimization/85793
1120         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1121         for VMAT_ELEMENTWISE.
1123 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1125         * internal-fn.h (lookup_internal_fn): Declare
1126         * internal-fn.c (lookup_internal_fn): New function.
1127         * gimple.c (gimple_build_call_from_tree): Handle calls to
1128         internal functions.
1129         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1130         internal function names.
1131         * tree-pretty-print.c (dump_generic_node): Likewise.
1132         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1134 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1136         * gimple-fold.h (gimple_build): Make the function forms take
1137         combined_fn rather than built_in_function.
1138         (gimple_simplify): Likewise.
1139         * gimple-match-head.c (gimple_simplify): Likewise.
1140         * gimple-fold.c (gimple_build): Likewise.
1141         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1142         rather than gimple_build_call_internal.
1143         (get_initial_defs_for_reduction): Likewise.
1144         (vect_create_epilog_for_reduction): Likewise.
1145         (vectorizable_live_operation): Likewise.
1147 2018-05-17  Martin Liska  <mliska@suse.cz>
1149         * gimple-ssa-sprintf.c (format_directive): Do not use
1150         space in between 'G_' and '('.
1152 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1154         PR target/85323
1155         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1156         even if the mask is not all ones.
1158         PR target/85323
1159         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1160         vector.
1161         (ix86_gimple_fold_builtin): Likewise.
1163         PR target/85323
1164         * config/i386/i386.c: Include tree-vector-builder.h.
1165         (ix86_vector_shift_count): New function.
1166         (ix86_fold_builtin): Fold shift builtins by scalar count.
1167         (ix86_gimple_fold_builtin): Likewise.
1169         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1170         _mm512_setzero): New intrinsics.
1172 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1173             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1175         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1176         code generation for cases where splatting a value is not useful.
1177         * simplify-rtx.c (simplify_ternary_operation): Simplify
1178         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1179         mode to a vec_concat.
1181 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1183         * config.gcc: Support "goldmont-plus".
1184         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1185         "goldmont-plus".
1186         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1187         PROCESSOR_GOLDMONT_PLUS.
1188         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1189         (processor_target_table): Add "goldmont-plus".
1190         (PTA_GOLDMONT_PLUS): Define.
1191         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1192         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1193         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1194         (fold_builtin_cpu): Add "goldmont-plus".
1195         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1196         (ix86_option_override_internal): Add "goldmont-plus".
1197         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1198         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1199         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1200         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1202 2018-05-17  Richard Biener  <rguenther@suse.de>
1204         PR tree-optimization/85757
1205         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1206         remove defs that only feed that PHI from further processing.
1208 2018-05-16  Jim Wilson  <jimw@sifive.com>
1210         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1211         asterisk to name.
1212         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1214 2018-05-16  Mark Wielaard  <mark@klomp.org>
1216         * dwarf2out.c (count_index_strings): New function.
1217         (output_indirect_strings): Call count_index_strings and generate
1218         header for dwarf_version >= 5.
1220 2018-05-16  Mark Wielaard  <mark@klomp.org>
1222         * dwarf2out.c (dwarf_FORM): New function.
1223         (set_indirect_string): Use dwarf_FORM.
1224         (reset_indirect_string): Likewise.
1225         (size_of_die): Likewise.
1226         (value_format): Likewise.
1227         (output_die): Likewise.
1228         (add_skeleton_AT_string): Likewise.
1229         (output_macinfo_op): Likewise.
1230         (index_string): Likewise.
1231         (output_index_string_offset): Likewise.
1232         (output_index_string): Likewise.
1233         (count_index_strings): Likewise.
1235 2018-05-16  Carl Love  <cel@us.ibm.com>
1237         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1238         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1240 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1242         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1243         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1245 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1247         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1248         (fnma<mode>4): Likewise.
1249         (fms<mode>4): Likewise.
1250         (fnms<mode>4): Likewise.
1251         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1252         (aarch64_fnma<mode>4): Likewise.
1253         (aarch64_fms<mode>4): Likewise.
1254         (aarch64_fnms<mode>4): Likewise.
1255         (aarch64_fnmadd<mode>4): Likewise.
1257 2018-05-16  Jason Merrill  <jason@redhat.com>
1259         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1261 2018-05-16  Richard Biener  <rguenther@suse.de>
1263         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1264         (dump_stmt_cost): Declare.
1265         (add_stmt_cost): Dump cost we add.
1266         (add_stmt_costs): New function.
1267         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1268         No longer exported.
1269         (vect_analyze_stmt): Adjust prototype.
1270         (vectorizable_condition): Likewise.
1271         (vectorizable_live_operation): Likewise.
1272         (vectorizable_reduction): Likewise.
1273         (vectorizable_induction): Likewise.
1274         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1275         cost vector to pass to vectorizable_ and record afterwards.
1276         (vect_model_reduction_cost): Take cost vector argument and adjust.
1277         (vect_model_induction_cost): Likewise.
1278         (vectorizable_reduction): Likewise.
1279         (vectorizable_induction): Likewise.
1280         (vectorizable_live_operation): Likewise.
1281         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1282         SLP_TREE_NUMBER_OF_VEC_STMTS.
1283         (vect_analyze_slp_cost_1): Remove.
1284         (vect_analyze_slp_cost): Likewise.
1285         (vect_slp_analyze_node_operations): Take visited args and
1286         a target cost vector.  Avoid processing already visited stmt sets.
1287         (vect_slp_analyze_operations): Use a local cost vector to gather
1288         costs and register those of non-discarded instances.
1289         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1290         (vect_schedule_slp_instance): Remove copying of
1291         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1292         zero.
1293         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1294         adding cost.  Record cost entry location.
1295         (vect_prologue_cost_for_slp_op): Function to compute cost of
1296         a constant or invariant generated for SLP vect in the prologue,
1297         split out from vect_analyze_slp_cost_1.
1298         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1299         (vect_model_promotion_demotion_cost): Likewise.
1300         (vect_model_store_cost): Likewise, make static.
1301         (vect_model_load_cost): Likewise.
1302         (vectorizable_bswap): Add cost vector arg and adjust.
1303         (vectorizable_call): Likewise.
1304         (vectorizable_simd_clone_call): Likewise.
1305         (vectorizable_conversion): Likewise.
1306         (vectorizable_assignment): Likewise.
1307         (vectorizable_shift): Likewise.
1308         (vectorizable_operation): Likewise.
1309         (vectorizable_store): Likewise.
1310         (vectorizable_load): Likewise.
1311         (vectorizable_condition): Likewise.
1312         (vectorizable_comparison): Likewise.
1313         (can_vectorize_live_stmts): Likewise.
1314         (vect_analyze_stmt): Likewise.
1315         (vect_transform_stmt): Adjust calls to vectorizable_*.
1316         * tree-vectorizer.c: Include gimple-pretty-print.h.
1317         (dump_stmt_cost): New function.
1319 2018-05-16  Richard Biener  <rguenther@suse.de>
1321         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1322         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1323         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1324         (check_name): New callback.
1325         (dse_classify_store): Track cycles via a visited bitmap of PHI
1326         defs and simplify handling of in-loop and across loop dead stores
1327         and properly fail for loop-variant refs.  Handle byte-tracking with
1328         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1329         limiting the walk.
1331 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1333         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1334         (vect_get_mask_type_for_stmt): Likewise.
1335         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1336         split out from...
1337         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1338         to determine the statement's vector type and the vector type that
1339         should be used for calculating nunits.  Deal with cases in which
1340         the type has to be deferred.
1341         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1342         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1343         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1344         (vect_determine_vf_for_stmt): New functions, split out from...
1345         (vect_determine_vectorization_factor): ...here.
1346         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1347         (vect_get_mask_type_for_stmt): New functions, split out from
1348         vect_determine_vectorization_factor.
1350 2018-05-16  Richard Biener  <rguenther@suse.de>
1352         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1353         verify the [VEC_]COND_EXPR embedded comparison.
1355 2018-05-15  Martin Sebor  <msebor@redhat.com>
1357         PR tree-optimization/85753
1358         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1359         RECORD_TYPE in addition to ARRAY_TYPE.
1361 2018-05-15  Martin Sebor  <msebor@redhat.com>
1363         PR middle-end/85643
1364         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1366 2018-05-15  Richard Biener  <rguenther@suse.de>
1368         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1369         add by_clobber_p one.  Change algorithm to collect all defs
1370         representing uses we need to walk and try reducing them to
1371         a single one before failing.
1372         (dse_dom_walker::dse_optimize_stmt): Adjust.
1374 2018-05-13  Mark Wielaard  <mark@klomp.org>
1376         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1377         (size_of_loc_descr): Likewise.
1378         (output_loc_operands): Likewise.
1379         (output_loc_operands_raw): Likewise.
1380         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1381         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1382         (hash_loc_operands): Likewise.
1383         (compare_loc_operands): Likewise.
1385 2018-05-14  Mark Wielaard  <mark@klomp.org>
1387         * dwarf2out.c (count_index_addrs): New function.
1388         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1390 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1392         PR tree-optimization/83648
1393         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1394         return value as malloc candidate.
1396 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1398         PR ipa/85734
1399         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1400         as true in call to suggest_attribute.
1402 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1404         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1405         -mreadonly-in-sdata.
1407 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1409         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1410         New pattern.
1411         (aarch64_crypto_aesd_fused): Likewise.
1413 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1415         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1416         (movsi_aarch64): Likewise.
1417         (load_pairsi): Likewise.
1418         (load_pairdi): Likewise.
1419         (store_pairsi): Likewise.
1420         (store_pairdi): Likewise.
1421         (load_pairsf): Likewise.
1422         (load_pairdf): Likewise.
1423         (store_pairsf): Likewise.
1424         (store_pairdf): Likewise.
1425         (zero_extend): Likewise.
1426         (trunc): Swap alternatives.
1427         (fcvt_target): Add '?' to prefer w over r.
1429 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1431         PR target/85756
1432         * config/i386/i386.md: Disallow non-commutative arithmetics in
1433         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1434         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1435         in the peephole2 before it.
1437 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1439         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1440         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1441         (ix86_handle_option): Handle -mcldemote.
1442         * config.gcc: New header.
1443         * config/i386/cldemoteintrin.h: New file.
1444         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1445         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1446         -mcldemote.
1447         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1448         OPTION_MASK_ISA_CLDEMOTE.
1449         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1450         (ix86_valid_target_attribute_inner_p): Ditto.
1451         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1452         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1453         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1454         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1455         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1456         (cldemote): New.
1457         * config/i386/i386.opt: Add -mcldemote.
1458         * config/i386/x86intrin.h: New header.
1459         * doc/invoke.texi: Add -mcldemote.
1461 2018-05-14  Richard Biener  <rguenther@suse.de>
1463         * doc/match-and-simplify.texi: Adjust :s documentation.
1465 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1467         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1468         intended memcpy size.
1469         (REORDER_45): Likewise.
1471 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1473         * sort.cc: New file.
1474         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1475         * vec.c (qsort_chk): Use gcc_qsort.
1476         * Makefile.in (OBJS-libcommon): Add sort.o.
1477         (build/sort.o): New target.  Use it...
1478         (BUILD_RTL): ... here, and...
1479         (build/gencfn-macros): ... here, and...
1480         (build/genmatch): ... here.
1482 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1483             Chung-Ju Wu  <jasonwucj@gmail.com>
1485         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1486         * config/nds32/nds32-graywolf.md: New file.
1487         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1488         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1489         pipeline.
1490         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1491         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1492         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1493         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1494         * config/nds32/pipelines.md: Include n15 settings.
1496 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1497             Chung-Ju Wu  <jasonwucj@gmail.com>
1499         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1500         * config/nds32/nds32-n13.md: New file.
1501         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1502         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1503         pipeline.
1504         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1505         * config/nds32/nds32.md (pipeline_model): Add n13.
1506         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1507         * config/nds32/pipelines.md: Include n13 settings.
1509 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1510             Chung-Ju Wu  <jasonwucj@gmail.com>
1512         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1513         * config/nds32/nds32-n10.md: New file.
1514         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1515         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1516         pipeline.
1517         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1518         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1519         * config/nds32/nds32.md (pipeline_model): Add n10.
1520         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1521         * config/nds32/pipelines.md: Include n10 settings.
1523 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1524             Kito Cheng  <kito.cheng@gmail.com>
1525             Chung-Ju Wu  <jasonwucj@gmail.com>
1527         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1528         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1529         Add enum values for DSP extension instructions.
1530         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1531         New constraints.
1532         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1533         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1534         New code iterators.
1535         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1536         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1537         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1538         * config/nds32/nds32-intrinsic.md: Likewise.
1539         * config/nds32/nds32_intrinsic.h: Likewise.
1540         * config/nds32/nds32-md-auxiliary.c: Likewise.
1541         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1542         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1543         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1544         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1545         * config/nds32/nds32-protos.h: New declarations for DSP extension.
1546         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1547         TYPE_DMAC in switch statement.
1548         * config/nds32/nds32.c: New checking and implementation for DSP
1549         extension instructions.
1550         * config/nds32/nds32.h: Likewise.
1551         * config/nds32/nds32.md: Likewise.
1552         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
1553         * config/nds32/predicates.md: Implement new predicates for DSP
1554         extension.
1556 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1558         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
1559         Reformat alternatives and attributes so it is easier to identify
1560         which constraints/attributes go with which instruction.
1561         (mov<mode>_hardfloat32, FMOVE64): Likewise.
1562         (mov<mode>_softfloat32, FMOVE64): Likewise.
1563         (mov<mode>_hardfloat64, FMOVE64): Likewise.
1564         (mov<mode>_softfloat64, FMOVE64): Likewise.
1566 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1568         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1569         subsection.
1570         (Basic PowerPC Built-in Functions): The new name of the
1571         subsection previously known as "PowerPC Built-in Functions".
1572         (Basic PowerPC Built-in Functions Available on all Configurations):
1573         New subsubsection.
1574         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
1575         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
1576         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
1577         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
1579 2018-05-11  Martin Jambor  <mjambor@suse.cz>
1581         PR ipa/85655
1582         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
1583         single const.
1585 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1587         PR target/85733
1588         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
1590 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
1592         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
1593         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
1594         (ix86_handle_option): Handle -mwaitpkg.
1595         * config.gcc: New header.
1596         * config/i386/cpuid.h (bit_WAITPKG): New bit.
1597         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1598         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1599         function type.
1600         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1601         OPTION_MASK_ISA_WAITPKG.
1602         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1603         (ix86_option_override_internal): Add PTA_WAITPKG.
1604         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1605         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1606         IX86_BUILTIN_TPAUSE.
1607         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1608         __builtin_ia32_umwait and __builtin_ia32_tpause.
1609         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1610         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1611         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1612         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1613         UNSPECV_TPAUSE): New.
1614         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1615         * config/i386/i386.opt: Add -mwaitpkg.
1616         * config/i386/waitpkgintrin.h: New file.
1617         * config/i386/x86intrin.h: New header.
1618         * doc/invoke.texi: Add -mwaitpkg.
1620 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1622         PR target/85606
1623         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1624         equivalent.
1625         (cortex-m0): Use armv6s-m isa.
1626         (cortex-m0plus): Likewise.
1627         (cortex-m1): Likewise.
1628         (cortex-m0.small-multiply): Likewise.
1629         (cortex-m0plus.small-multiply): Likewise.
1630         (cortex-m1.small-multiply): Likewise.
1632 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1633             Jakub Jelinek  <jakub@redhat.com>
1635         PR tree-optimization/85692
1636         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1637         source permute as well.
1639 2018-05-11  Martin Liska  <mliska@suse.cz>
1641         PR sanitizer/85556
1642         * doc/extend.texi: Document LLVM style format for no_sanitize
1643         attribute.
1645 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1647         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1648         mode_supports_vsx_dform_quad to mode_supports_dq_form.
1649         (mode_supports_vsx_dform_quad): Likewise.
1650         (mode_supports_vmx_dform): Move these functions to be next to the
1651         other mode_supports functions.
1652         (mode_supports_dq_form): Likewise.
1653         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1654         mode_supports_dq_form.
1655         (reg_offset_addressing_ok_p): Likewise.
1656         (offsettable_ok_by_alignment): Likewise.
1657         (rs6000_legitimate_offset_address_p): Likewise.
1658         (legitimate_lo_sum_address_p): Likewise.
1659         (rs6000_legitimize_address): Likewise.
1660         (rs6000_legitimize_reload_address): Likewise.
1661         (rs6000_secondary_reload_inner): Likewise.
1662         (rs6000_preferred_reload_class): Likewise.
1663         (rs6000_output_move_128bit): Likewise.
1665 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1667         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1668         Generate SImode target register for null target.
1669         <case IX86_BUILTIN_XGETBV>: Ditto.
1670         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1671         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1673 2018-05-10  Carl Love  <cel@us.ibm.com>
1675         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1676         dcbtt and dcbtstt if operands[2] is 0.
1678 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1680         PR target/85693
1681         * config/i386/sse.md (usadv64qi): New expander.
1683 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
1685         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1686         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1687         -maltivec=be support.
1688         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1689         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1690         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1691         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1692         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1693         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1694         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1695         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1696         altivec_vsumsws): Adjust.
1697         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1698         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1699         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1700         support.
1701         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1702         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1703         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1704         (altivec_lve<VI_char>x): Delete expand.
1705         (*altivec_lve<VI_char>x_internal): Rename to...
1706         (altivec_lve<VI_char>x): ... this.
1707         (altivec_lvxl_<mode>): Delete expand.
1708         (*altivec_lvxl_<mode>_internal): Rename to ...
1709         (altivec_lvxl_<mode>): ... this.
1710         (altivec_stvxl_<mode>): Delete expand.
1711         (*altivec_stvxl_<mode>_internal): Rename to ...
1712         (altivec_stvxl_<mode>): ... this.
1713         (altivec_stve<VI_char>x): Delete expand.
1714         (*altivec_stve<VI_char>x_internal): Rename to ...
1715         (altivec_stve<VI_char>x): ... this.
1716         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1717         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1718         reduc_plus_scal_<mode>): Adjust.
1719         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1720         comment.
1721         (rs6000_cpu_cpp_builtins): Adjust.
1722         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1723         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1724         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1725         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1726         -maltivec=be support.
1727         (rs6000_split_vec_extract_var): Adjust.
1728         (rs6000_split_v4si_init): Adjust.
1729         (swap_selector_for_mode): Delete.
1730         (altivec_expand_lvx_be, altivec_expand_stvx_be,
1731         altivec_expand_stvex_be): Delete.
1732         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1733         -maltivec=be support.
1734         (rs6000_gimple_fold_builtin): Ditto.
1735         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1736         Adjust.
1737         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1738         (TARGET_DIRECT_MOVE_64BIT): Adjust.
1739         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1740         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1741         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1742         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1743         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1744         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1745         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1746         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1747         anonymous split): Adjust.
1748         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1749         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1751 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
1753         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1754         when --with-gxx-include-dir is also specified.
1755         * configure: Regenerate.
1757 2018-05-09  Jim Wilson  <jimw@sifive.com>
1759         PR target/84797
1760         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1761         * config/riscv/t-withmultilib: New.
1762         * config/riscv/withmultilib.h: New.
1763         * doc/install.texi: Document RISC-V --with-multilib-list support.
1765 2018-05-09  Richard Biener  <rguenther@suse.de>
1767         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1768         vector.
1769         (vect_bb_vectorization_profitable_p): Adjust.  Compute
1770         actual scalar cost using the cost vector and the add_stmt_cost
1771         machinery.
1773 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1775         PR rtl-optimization/85645
1776         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1777         in the REG_CFA_REGISTER note for LR, don't leave it empty.
1779 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1781         PR rtl-optimization/85645
1782         * shrink-wrap.c (spread_components): Return a boolean saying if
1783         anything was changed.
1784         (try_shrink_wrapping_separate): Iterate spread_components until
1785         nothing changes anymore.
1787 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1789         PR rtl-optimization/85645
1790         * regrename.c (build_def_use): Also kill the chains that include the
1791         destination of a REG_CFA_REGISTER note.
1793 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1795         PR rtl-optimization/85645
1796         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
1797         insn that has a REG_CFA_REGISTER note.
1799 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
1801         * cfgexpand.c (expand_clobber): New function.
1802         (expand_gimple_stmt_1): Use it.
1803         * tree-vect-stmts.c (vect_clobber_variable): New function,
1804         split out from...
1805         (vectorizable_simd_clone_call): ...here.
1806         (vectorizable_store): Emit a clobber either side of an
1807         IFN_STORE_LANES sequence.
1808         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
1810 2018-05-09  Tom de Vries  <tom@codesourcery.com>
1812         PR target/85626
1813         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
1814         (define_insn "trap_if_false"): Add exit after trap.
1816 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
1818         PR rtl-optimization/85638
1819         * bb-reorder.c: Include common/common-target.h.
1820         (create_forwarder_block): New function extracted from...
1821         (fix_up_crossing_landing_pad): ...here.  Rename into...
1822         (dw2_fix_up_crossing_landing_pad): ...this.
1823         (sjlj_fix_up_crossing_landing_pad): New function.
1824         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
1825         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
1826         from both partitions and exit the loop after one iteration.
1828 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1830         Revert:
1831         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1832         subsection.
1833         (Basic PowerPC Built-in Functions): The new name of the
1834         subsection previously known as "PowerPC Built-in Functions".
1835         (Basic PowerPC Built-in Functions Available on all Configurations):
1836         New subsubsection.
1837         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1838         subsubsection.
1839         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1840         subsubsection.
1841         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1842         subsubsection.
1843         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1844         subsubsection.
1846 2018-05-08  Jim Wilson  <jimw@sifive.com>
1848         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
1849         (LD_EMUL_SUFFIX): New.
1850         (LINK_SPEC): Use it.
1852 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1854         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1855         subsection.
1856         (Basic PowerPC Built-in Functions): The new name of the
1857         subsection previously known as "PowerPC Built-in Functions".
1858         (Basic PowerPC Built-in Functions Available on all Configurations):
1859         New subsubsection.
1860         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1861         subsubsection.
1862         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1863         subsubsection.
1864         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1865         subsubsection.
1866         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1867         subsubsection.
1869 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
1871         PR target/85683
1872         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
1873         after cmpelim optimization.
1875 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
1877         * config.gcc: Support "goldmont".
1878         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
1879         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1880         PROCESSOR_GOLDMONT.
1881         * config/i386/i386.c (m_GOLDMONT): Define.
1882         (processor_target_table): Add "goldmont".
1883         (PTA_GOLDMONT): Define.
1884         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
1885         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
1886         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
1887         (fold_builtin_cpu): Add "goldmont".
1888         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
1889         (ix86_option_override_internal): Add "goldmont".
1890         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
1891         (processor_type): Add PROCESSOR_GOLDMONT.
1892         * config/i386/i386.md: Add CPU "glm".
1893         * config/i386/glm.md: New file.
1894         * config/i386/x86-tune.def: Add m_GOLDMONT.
1895         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
1897 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
1899         PR target/85572
1900         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
1901         E_V4DImode.
1902         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
1903         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
1904         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
1906         PR target/85317
1907         * config/i386/i386.c (ix86_fold_builtin): Handle
1908         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
1910         PR target/85480
1911         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
1912         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
1914 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
1916         PR target/85658
1917         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
1918         (check_arch): Likewise.
1919         (check_fpu): Return the result rather than printing it.
1920         (end arch): Fix operator precedence.
1921         (end cpu): Likewise.
1922         (END): Print the result from check_fpu.
1924 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
1925             Alan Hayward  <alan.hayward@arm.com>
1926             David Sherwood  <david.sherwood@arm.com>
1928         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
1929         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
1930         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
1931         (*fcmuo<mode>_and): New patterns.
1933 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
1935         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
1936         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
1937         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
1938         (cmp_op, sve_imm_con): New code attributes.
1939         (SVE_COND_INT_CMP, imm_con): Delete.
1940         (cmp_op): Remove above unspecs from int attribute.
1941         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
1942         to...
1943         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
1944         comparison-specific unspecs.
1945         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
1946         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
1947         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
1948         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
1949         (*vec_fcm<cmp_op><mode>): Rename to...
1950         (*fcm<cmp_op><mode>): ...this and adjust likewise.
1951         (*vec_fcmuo<mode>): Rename to...
1952         (*fcmuo<mode>): ...this and adjust likewise.
1953         (*pred_fcm<cmp_op><mode>): New pattern.
1954         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
1955         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
1956         functions.
1957         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
1958         and UNORDERED.
1959         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
1960         (aarch64_emit_sve_predicated_cond): New function.
1961         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
1962         (aarch64_emit_unspec_cond_or): Replace with...
1963         (aarch64_emit_sve_or_conds): ...this new function.  Use
1964         aarch64_emit_sve_ptrue_op for the individual comparisons and
1965         aarch64_emit_binop to OR them together.
1966         (aarch64_emit_inverted_unspec_cond): Replace with...
1967         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
1968         aarch64_emit_sve_ptrue_op for the comparison and
1969         aarch64_emit_unop to invert the result.
1970         (aarch64_expand_sve_vec_cmp_float): Update after the above
1971         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
1973 2018-05-07  Nathan Sidwell  <nathan@acm.org>
1975         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
1976         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
1977         (Backwards Compatibility): Likewise.
1979 2018-05-07  Luis Machado  <luis.machado@linaro.org>
1981         PR bootstrap/85681
1982         Revert:
1983         2018-05-07  Luis Machado  <luis.machado@linaro.org>
1985         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1986         <prefetch_dynamic_strides>: New const bool field.
1987         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1988         prefetch_dynamic_strides.
1989         (exynosm1_prefetch_tune): Likewise.
1990         (thunderxt88_prefetch_tune): Likewise.
1991         (thunderx_prefetch_tune): Likewise.
1992         (thunderx2t99_prefetch_tune): Likewise.
1993         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1994         (aarch64_override_options_internal): Update to set
1995         PARAM_PREFETCH_DYNAMIC_STRIDES.
1996         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1997         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1998         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1999         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2000         prefetch-dynamic-strides setting.
2002         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2004         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2005         <minimum_stride>: New const int field.
2006         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2007         minimum_stride field.
2008         (exynosm1_prefetch_tune): Likewise.
2009         (thunderxt88_prefetch_tune): Likewise.
2010         (thunderx_prefetch_tune): Likewise.
2011         (thunderx2t99_prefetch_tune): Likewise.
2012         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2013         (aarch64_override_options_internal): Update to set
2014         PARAM_PREFETCH_MINIMUM_STRIDE.
2015         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2016         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2017         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2018         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2019         stride is constant and is below the minimum stride threshold.
2021 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2023         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2024         to 512.
2026 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2028         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2029         <prefetch_dynamic_strides>: New const bool field.
2030         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2031         prefetch_dynamic_strides.
2032         (exynosm1_prefetch_tune): Likewise.
2033         (thunderxt88_prefetch_tune): Likewise.
2034         (thunderx_prefetch_tune): Likewise.
2035         (thunderx2t99_prefetch_tune): Likewise.
2036         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2037         (aarch64_override_options_internal): Update to set
2038         PARAM_PREFETCH_DYNAMIC_STRIDES.
2039         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2040         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2041         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2042         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2043         prefetch-dynamic-strides setting.
2045 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2047         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2048         <minimum_stride>: New const int field.
2049         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2050         minimum_stride field.
2051         (exynosm1_prefetch_tune): Likewise.
2052         (thunderxt88_prefetch_tune): Likewise.
2053         (thunderx_prefetch_tune): Likewise.
2054         (thunderx2t99_prefetch_tune): Likewise.
2055         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2056         (aarch64_override_options_internal): Update to set
2057         PARAM_PREFETCH_MINIMUM_STRIDE.
2058         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2059         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2060         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2061         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2062         stride is constant and is below the minimum stride threshold.
2064 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2066         PR c++/85659
2067         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2068         the type is addressable.  Don't force op into register if it has
2069         BLKmode.
2071 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2073         PR other/77609
2074         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2075         any section for which we don't know a specific type it should have,
2076         regardless of name.  Previously this was done only for the exact
2077         names ".init_array", ".fini_array", and ".preinit_array".
2078         (default_elf_asm_named_section): Add comment about
2079         relationship with default_section_type_flags and SECTION_NOTYPE.
2080         (get_section): Don't consider it a type conflict if one side has
2081         SECTION_NOTYPE and the other doesn't, as long as neither has the
2082         SECTION_BSS et al used in the default_section_type_flags logic.
2084 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2086         PR target/85653
2087         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2088         (workaround_barsyncs): New function.
2089         (nvptx_reorg): Use workaround_barsyncs.
2090         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2091         (define_expand "nvptx_membar_cta"): New define_expand.
2092         (define_insn "*nvptx_membar_cta"): New insn.
2094 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2096         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2097         To improve optimization opportunities.
2098         * builtin-types.def: The new needed builtin types for the above.
2100 2018-05-04  Richard Biener  <rguenther@suse.de>
2102         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2103         * gimple-ssa-store-merging.c
2104         (imm_store_chain_info::output_merged_store): Remove redundant create,
2105         release split_store vector contents on failure.
2106         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2107         scalar stmt vector on cache hit.
2109 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2111         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2112         Xilinx FP support.
2113         * config.gcc (powerpc-xilinx-eabi*): Remove.
2114         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2115         support.
2116         (fusion_addis_mem_combo_load): Ditto.
2117         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2118         FP support.
2119         (rs6000_cpu_cpp_builtins): Ditto.
2120         * config/rs6000/rs6000-linux.c
2121         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2122         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2123         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2124         support.
2125         (rs6000_setup_reg_addr_masks): Ditto.
2126         (rs6000_init_hard_regno_mode_ok): Ditto.
2127         (rs6000_option_override_internal): Ditto.
2128         (legitimate_lo_sum_address_p): Ditto.
2129         (rs6000_legitimize_address): Ditto.
2130         (rs6000_legitimize_reload_address): Ditto.
2131         (rs6000_legitimate_address_p): Ditto.
2132         (abi_v4_pass_in_fpr): Ditto.
2133         (setup_incoming_varargs): Ditto.
2134         (rs6000_gimplify_va_arg): Ditto.
2135         (rs6000_split_multireg_move): Ditto.
2136         (rs6000_savres_strategy): Ditto.
2137         (rs6000_emit_prologue_components): Ditto.
2138         (rs6000_emit_epilogue_components): Ditto.
2139         (rs6000_emit_prologue): Ditto.
2140         (rs6000_emit_epilogue): Ditto.
2141         (rs6000_elf_file_end): Ditto.
2142         (rs6000_function_value): Ditto.
2143         (rs6000_libcall_value): Ditto.
2144         * config/rs6000/rs6000.h: Ditto.
2145         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2146         (TARGET_MINMAX): ... this.  New.
2147         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2148         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2149         (*movsi_internal1_single): Delete.
2150         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2151         mfpu=, mxilinx-fpu): Delete.
2152         * config/rs6000/singlefp.h: Delete.
2153         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2154         * config/rs6000/t-rs6000: Ditto.
2155         * config/rs6000/t-xilinx: Delete.
2156         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2157         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2158         (VStype_simple): Delete.
2159         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2160         * config/rs6000/xfpu.h: Delete.
2161         * config/rs6000/xfpu.md: Delete.
2162         * config/rs6000/xilinx.h: Delete.
2163         * config/rs6000/xilinx.opt: Delete.
2164         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2165         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2167 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2169         PR libgomp/85639
2170         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2171         if ignore == 0.
2173 2018-05-04  Richard Biener  <rguenther@suse.de>
2175         PR middle-end/85627
2176         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2177         (expand_complex_div_wide): Likewise.
2178         (expand_complex_operations_1): Likewise.
2179         (expand_complex_libcall): Preserve EH info of the original stmt.
2180         (tree_lower_complex): Handle removed blocks.
2181         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2182         on complex multiplication and division libcall builtins.
2184 2018-05-04  Richard Biener  <rguenther@suse.de>
2186         PR middle-end/85574
2187         * fold-const.c (negate_expr_p): Restrict negation of operand
2188         zero of a division to when we know that can happen without
2189         overflow.
2190         (fold_negate_expr_1): Likewise.
2192 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2194         PR libstdc++/85466
2195         * real.h (real_nextafter): Declare.
2196         * real.c (real_nextafter): New function.
2197         * fold-const-call.c (fold_const_nextafter): New function.
2198         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2199         CASE_CFN_NEXTTOWARD.
2200         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2201         even when arg1_mode is different from arg0_mode.
2203 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2205         * doc/extend.texi (Deprecated Features): Remove
2206         -ffriend-injection.
2207         (Backwards Compatibility): Likewise.
2208         * doc/invoke.texi (C++ Language Options): Likewise.
2209         (C++ Dialect Options): Likewise.
2211 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2213         PR target/85530
2214         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2215         _mm512_mask_mullox_epi64): New intrinsics.
2217 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2219         PR testsuite/85106
2220         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2221         dump files): Add offload-tree.
2223 2018-05-03  Richard Biener  <rguenther@suse.de>
2225         PR tree-optimization/85615
2226         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2227         to loops not nested in BBs loop father to avoid creating multi-entry
2228         loops.
2230 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2232         PR tree-optimization/70291
2233         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2234         arguments.  Change return type to tree.  Emit libcall as a new
2235         statement rather than replacing existing one when inplace_p is true.
2236         (expand_complex_multiplication_components): New function.
2237         (expand_complex_multiplication): Expand floating-point complex
2238         multiplication using the above.
2239         (expand_complex_division): Rename inner_type parameter to type.
2240         Update expand_complex_libcall call-site.
2241         (expand_complex_operations_1): Update expand_complex_multiplication
2242         and expand_complex_division call-sites.
2244 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2246         PR target/85582
2247         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2248         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2249         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2250         the highest significant bit of the shift count mask is clear.  In
2251         check whether and[sq]i3 is needed verify that all significant bits
2252         of the shift count other than the highest are set.
2254 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2256         PR libgomp/82428
2257         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2258         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2259         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2260         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2261         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2262         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2263         __builtin_goacc_parlevel_size.
2265 2018-05-02  Richard Biener  <rguenther@suse.de>
2267         PR tree-optimization/85597
2268         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2269         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2270         directly.
2272 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2274         PR testsuite/85106
2275         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2276         dump files): Add ltrans-tree.
2278 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2280         PR testsuite/85106
2281         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2282         dump files): Add wpa-ipa.
2284 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2286         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2287         powerpc*-*-linux*paired* target.
2288         * config/rs6000/750cl.h: Delete.
2289         * config/rs6000/paired.h: Delete.
2290         * config/rs6000/paired.md: Delete.
2291         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2292         float support.
2293         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2294         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2295         comment.  Remove paired float support.
2296         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2297         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2298         VECTOR_PAIRED.
2299         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2300         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2301         declarations.
2302         * config/rs6000/rs6000.c: Remove paired float support.
2303         (paired_expand_vector_init, paired_expand_vector_move,
2304         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2305         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2306         paired_expand_builtin, paired_expand_predicate_builtin,
2307         paired_init_builtins): Delete.
2308         * config/rs6000/rs6000.h: Remove paired float support.
2309         * config/rs6000/rs6000.md: Remove paired float support.
2310         (move_from_CR_ov_bit): Delete.
2311         * config/rs6000/rs6000.opt (mpaired): Delete.
2312         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2313         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2315 2018-05-02  Richard Biener  <rguenther@suse.de>
2317         PR middle-end/85567
2318         * gimplify.c (gimplify_save_expr): When in SSA form allow
2319         SAVE_EXPRs to compute to SSA vars.
2321 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2323         PR target/85582
2324         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2325         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2326         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2327         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2329 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2331         PR tree-optimization/85586
2332         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2333         exit early for statements in the same group if the accesses are
2334         not strided.
2336 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2338         PR lto/85451
2339         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2340         error message.
2342 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2344         PR tree-optimization/85143
2345         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2347 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2349         PR lto/85451
2350         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2351         not found" error message.
2353 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2355         PR other/83786
2356         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2357         * vec.c (test_ordered_remove_if): New function.
2358         (vec_c_tests): Call test_ordered_remove_if.
2359         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2360         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2361         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2362         VEC_ORDERED_REMOVE_IF.
2364 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2366         PR tree-optimization/82665
2367         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2368         pointer subtraction where arguments come from a memchr call.
2370 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2372         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2373         --push-state --as-needed and --pop-state instead of --as-needed and
2374         --no-as-needed if ld supports it.
2375         * configure: Regenerated.
2377         PR web/85578
2378         * doc/install.texi2html: Replace _002d with - and _002a with * in
2379         generated html files using sed.
2381 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2383         PR c++/85523
2384         * gcc-rich-location.c (blank_line_before_p): New function.
2385         (use_new_line): New function.
2386         (gcc_rich_location::add_fixit_insert_formatted): New function.
2387         * gcc-rich-location.h
2388         (gcc_rich_location::add_fixit_insert_formatted): New function.
2390 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2392         * selftest.c (assert_streq): Rename "expected" and "actual" to
2393         "val1" and "val2".  Extend NULL-handling to cover both inputs
2394         symmetrically, while still requiring both to be non-NULL for a pass.
2395         * selftest.h (assert_streq): Rename "expected" and "actual" to
2396         "val1" and "val2".
2397         (ASSERT_EQ): Likewise.
2398         (ASSERT_EQ_AT): Likewise.
2399         (ASSERT_KNOWN_EQ): Likewise.
2400         (ASSERT_KNOWN_EQ_AT): Likewise.
2401         (ASSERT_NE): Likewise.
2402         (ASSERT_MAYBE_NE): Likewise.
2403         (ASSERT_MAYBE_NE_AT): Likewise.
2404         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2405         the assertion to pass.
2406         (ASSERT_STREQ_AT): Likewise.
2408 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2410         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2411         interaction with -pie.
2413 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2415         * selftest.h: Fix alphabetization of per-source-file selftest
2416         declarations.
2418 2018-04-30  Jason Merrill  <jason@redhat.com>
2420         PR c++/61982 - dead stores to destroyed objects.
2421         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2422         of clobber.
2424 2018-04-30  Jason Merrill  <jason@redhat.com>
2426         * tree.c (build_clobber): New.
2427         * tree.h: Declare it.
2428         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2430 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2432         * diagnostic-show-locus.c (layout::layout): Update for
2433         location_get_source_line returning a char_span.
2434         (struct char_span): Move to input.h.
2435         (struct correction): Update for fields in char_span becoming
2436         private.
2437         (struct source_line): Update for location_get_source_line
2438         returning a char_span.
2439         (layout::print_line): Likewise.
2440         * edit-context.c (edited_file::print_content): Likewise.
2441         (edited_file::print_diff_hunk): Likewise.
2442         (edited_file::print_run_of_changed_lines): Likewise.
2443         (edited_file::get_num_lines): Likewise.
2444         (edited_line::edited_line): Likewise.
2445         * final.c (asm_show_source): Likewise.
2446         * input.c (location_get_source_line): Convert return type
2447         from const char * to char_span, losing the final "line_len"
2448         param.
2449         (dump_location_info): Update for the above.
2450         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2451         when handling the literal within the line.
2452         (test_reading_source_line): Update for location_get_source_line
2453         returning a char_span.
2454         * input.h (class char_span): Move here from
2455         diagnostic-show-locus.c, converting from a struct to a class.
2456         Make data members private.
2457         (char_span::operator bool): New.
2458         (char_span::length): New.
2459         (char_span::get_buffer): New.
2460         (char_span::operator[]): New.
2461         (char_span::subspan): Make const.
2462         (char_span::xstrdup): New.
2463         (location_get_source_line): Convert return type from const char *
2464         to char_span, losing the final "line_size" param.
2466 2018-04-30  Jan Hubicka  <jh@suse.cz>
2468         * lto-wrapper.c (ltrans_priorities): New static var.
2469         (cmp_priority): New.
2470         (run_gcc): Read priorities and if doing parallel build order
2471         the Makefile by them.
2473 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2475         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2477 2018-04-30  Richard Biener  <rguenther@suse.de>
2479         * tree-cfg.c (verify_address): Remove base argument, add
2480         flag whether to check TREE_ADDRESSABLE and do that.
2481         (verify_expr): Remove.
2482         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2483         (verify_gimple_assign_single): Likewise.
2484         (verify_gimple_switch): Likewise.
2485         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2486         piece from verify_expr.
2487         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2489 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2491         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2493 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2495         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2496         (small_data_pattern): Likewise.
2497         (arc_rewrite_small_data): Likewise.
2498         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2499         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2500         (get_symbol_alignment): New function.
2501         (legitimate_small_data_address_p): Likewise.
2502         (legitimate_scaled_address): Update, call
2503         legitimate_small_data_address_p.
2504         (output_sdata): New static variable.
2505         (arc_print_operand): Update how we handle small data operands.
2506         (arc_print_operand_address): Likewise.
2507         (arc_legitimate_address_p): Update, use
2508         legitimate_small_data_address_p.
2509         (arc_rewrite_small_data_p): Remove.
2510         (arc_rewrite_small_data_1): Likewise.
2511         (arc_rewrite_small_data): Likewise.
2512         (small_data_pattern): Likewise.
2513         (compact_sda_memory_operand): Update to use
2514         legitimate_small_data_address_p and get_symbol_alignment.
2515         (prepare_move_operands): Don't rewite sdata pattern.
2516         (prepare_extend_operands): Remove.
2517         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2518         pattern.
2519         (zero_extendqisi2): Likewise.
2520         (zero_extendhisi2): Likewise.
2521         (extendqihi2): Likewise.
2522         (extendqisi2): Likewise.
2523         (extendhisi2): Likewise.
2524         (addsi3): Likewise.
2525         (subsi3): Likewise.
2526         (andsi3): Likewise.
2527         * config/arc/constraints.md (Usd): Change it to memory constraint.
2529 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2531         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2532         as source of std instructions.
2533         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2534         allow 6-bit constants as source for store instructions.
2535         (movdi_insn): Update instruction pattern to allow 6-bit constants
2536         as source for store instructions.
2538 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2540         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2542 2018-04-30  Nathan Sidwell  <nathan@acm.org>
2543             Sandra Loosemore <sandra@codesourcery.com>
2545         * dumpfile.c (dump_open): Allow '-' for stdout.
2546         * doc/invoke.texi (Developer Options): Document dump filename
2547         determination early.  Document stdin/stdout selection.
2549 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
2551         Microblaze Target: PIC data text relative
2553         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
2554         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
2555         Add declaration.
2556         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
2557         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
2558         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
2559         New addressing mode for data-text relative position indepenedent code.
2560         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
2561         'ADDRESS_SYMBOLIC_TXT_REL'.
2562         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
2563         (microblaze_legitimate_pic_operand): Exclude function calls from
2564         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
2565         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
2566         addresses cases.
2567         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2568         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2569         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
2570         for 'address + offset'.
2571         (microblaze_expand_prologue): Add new function prologue call for
2572         'r20' assignation.
2573         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
2574         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
2575         table in case of TARGET_PIC_DATA_TEXT_REL.
2576         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
2577         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
2578         Add new macros 'UNSPEC_TEXT',
2579         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
2580         + exclude function calls from 'UNSPEC_PLT' in case of data text
2581         relative mode.
2582         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2583         new target hook for generating address diff vector tables in case of
2584         flag_pic.
2585         * doc/tm.texi : Regenerate.
2586         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
2587         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
2588         of addr diff vector generation.
2589         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2590         target hook definition.
2591         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
2592         Add default function for generate_pic_addr_diff_vec -> flag_pic.
2593         * doc/invoke.texi (Add new pic option): Add new microblaze pic
2594         option for data text relative.
2596 2018-04-30  Richard Biener  <rguenther@suse.de>
2598         * tree-chrec.h (evolution_function_is_constant_p): Remove
2599         redundant check.
2600         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2602 2018-04-30  Richard Biener  <rguenther@suse.de>
2604         PR bootstrap/85571
2605         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2607 2018-04-30  Richard Biener  <rguenther@suse.de>
2609         PR tree-optimization/28364
2610         PR tree-optimization/85275
2611         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2612         copying first exit test.
2614 2018-04-28  Mark Wielaard  <mark@klomp.org>
2616         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2617         dwarf_version >= 5.
2618         (dwarf_AT): Handle DW_AT_addr_base.
2619         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2621 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
2623         PR target/84431
2624         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2625         (*ashl<dwi>3_doubleword_mask_1): Ditto.
2626         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2627         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2629 2018-04-28  Richard Biener  <rguenther@suse.de>
2631         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2632         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2633         to reflect use.  Only add interesting stmts.
2635 2018-04-27  Martin Jambor  <mjambor@suse.cz>
2637         PR ipa/85549
2638         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2639         the jump function allows for passing through aggregate values.
2641 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
2643         * input.h (in_system_header_at): Convert from macro to inline
2644         function.
2645         (from_macro_expansion_at): Likewise.
2646         (from_macro_definition_at): Likewise.
2648 2018-04-27  Jeff Law  <law@redhat.com>
2650         * config.gcc: Mark tile* targets as deprecated/obsolete.
2652 2018-04-27  Richard Biener  <rguenther@suse.de>
2654         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2655         fix for ILP32.
2657 2018-04-27  Richard Biener  <rguenther@suse.de>
2659         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2661 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
2663         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2664         with Yd constraint. Set "preferred_for_speed" attribute from
2665         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2666         with Yd constraint.
2667         (*movdi_internal): Ditto.
2668         (movti_interunit splitters): Remove
2669         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2670         (movdi_interunit splitters): Ditto.
2671         * config/i386/constraints.md (Ye): Remove.
2672         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2674 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2676         PR target/85512
2677         * config/aarch64/constraints.md (Usg): Limit to 31.
2678         (Usj): Limit to 63.
2680 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
2682         PR tree-optimization/85529
2683         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2684         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2685         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2686         zero extension or masking of the MSB bit.
2687         (optimize_range_tests): Add FIRST_BB argument, pass it through
2688         to optimize_range_tests_var_bound.
2689         (maybe_optimize_range_tests, reassociate_bb): Adjust
2690         optimize_range_tests callers.
2692 2018-04-26  Richard Biener  <rguenther@suse.de>
2693             Jakub Jelinek  <jakub@redhat.com>
2695         * cgraph.h (symbol_table): Just declare debug method here.
2696         * symtab.c (symbol_table::debug): Define.
2698 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
2700         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2702 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
2704         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2705         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2706         (*movdi_internal): Substitute Yi and Yj constraint with x
2707         and Ym and Yn constraint with y constraint.  Update "isa"
2708         attribute and set "preferred_for_speed" attribute from
2709         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2710         (*movsi_internal): Ditto.
2711         (*movdf_internal): Ditto.
2712         (*movsf_internal): Ditto.
2713         (*zero_extendsidi2): Ditto.
2714         * config/i386/sse.md (vec_set<mode>_0): Ditto.
2715         (sse2_loadld): Ditto.
2716         (*vec_extract<ssevecmodelower>_0): Ditto.
2717         (*vec_extractv4si_0_zext_sse4): Ditto.
2718         (vec_concatv2di): Ditto.
2719         (*vec_dup<mode>): Ditto.
2720         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2721         * config/i386/constraints.md (Yi): Remove.
2722         (Yj): Remove.
2723         (Ym): Remove.
2724         (Yn): Remove.
2726 2018-04-26  Nathan Sidwell  <nathan@acm.org>
2728         * dumpfile.c (dump_open): New.
2729         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2730         (dump_finish): Detect stdio/stderr by value not name.
2732 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
2734         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2736 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2738         PR target/84952
2739         * config/nvptx/nvptx.c (verify_neutering_jumps)
2740         (verify_neutering_labels): New function
2741         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2743 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2745         PR target/84025
2746         * config/nvptx/nvptx.c (needs_neutering_p): New function.
2747         (nvptx_single): Use needs_neutering_p to skip over insns that do not
2748         need neutering.
2750 2018-04-26  Richard Biener <rguenther@suse.de>
2751             Tom de Vries  <tom@codesourcery.com>
2753         PR lto/85422
2754         * lto-streamer-out.c (output_function): Fixup loops if required to match
2755         discovery done in the reader.
2757 2018-04-26  Richard Biener  <rguenther@suse.de>
2759         PR tree-optimization/85116
2760         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2761         have a loop exit from the single latch predecessor.  Remove
2762         case of header with just condition.
2763         (ch_base::copy_headers): Exclude infinite loops from any
2764         processing.
2765         (pass_ch::execute): Record exits.
2767 2018-04-26  Richard Biener  <rguenther@suse.de>
2769         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2770         prologue cost vector and pass it to vect_get_load_cost.
2771         (vect_get_peeling_costs_all_drs): Likewise.
2772         (vect_peeling_hash_get_lowest_cost): Likewise.
2773         (vect_enhance_data_refs_alignment): Likewise.
2775 2018-04-26  Richard Biener  <rguenther@suse.de>
2777         PR middle-end/85450
2778         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2779         checking of integer<->pointer conversions.
2780         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2781         sign-/zero-extending pointer types.
2782         (expand_omp_for_static_chunk): Likewise.
2784 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
2785             Jean Lee  <xiaoyur347@gmail.com>
2787         * config/mips/mips.c (mips_asan_shadow_offset): New function.
2788         (TARGET_ASAN_SHADOW_OFFSET): Define.
2789         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
2790         true for -fsanitize=address.
2792 2018-04-25  Mark Wielaard  <mark@klomp.org>
2794         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
2795         shorter ones.
2797 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2799         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
2800         than "alu", remove explicit "memory" and "imm_disp" attributes.
2801         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
2803         PR middle-end/85414
2804         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
2805         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
2806         gen_lowpart_no_emit.
2808 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
2810         PR target/85473
2811         * config/i386/i386.c (ix86_expand_builtin): Change memory
2812         operand to XI, extend p0 to Pmode.
2813         * config/i386/i386.md: Change unspec volatile and operand
2814         1 mode to XI, change operand 0 mode to P.
2816 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2818         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
2819         GET_MODE_MASK before any checking.
2820         (nds32_can_use_bset_p): Likewise.
2821         (nds32_can_use_btgl_p): Likewise.
2823 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2825         * config/nds32/nds32-doubleword.md: New define_split pattern for
2826         illegal register number.
2828 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2830         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
2832 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2834         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
2836 2018-04-25  Richard Biener  <rguenther@suse.de>
2838         * lto-streamer.h (LTO_major_version): Bump to 8.
2840 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2842         * BASE-VER: Set to 9.0.0.
2844 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
2846         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
2847         in __abskf2 and __powikf2.
2849 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2851         PR target/85512
2852         * config/aarch64/constraints.md (Usg, Usj): New constraints.
2853         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
2854         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
2855         Use the above on operand 2.  Reindent.
2856         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
2858 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
2860         PR target/85485
2861         * common/config/i386/i386-common.c (ix86_handle_option): Don't
2862         handle OPT_mcet.
2863         * config/i386/i386.opt (mcet): Removed.
2864         * doc/install.texi: Remove -mcet documentation.
2865         * doc/invoke.texi: Likewise.
2867 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
2869         PR target/85485
2870         * doc/install.texi: Remove -mcet from bootstrap-cet.
2872 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2874         PR target/85511
2875         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
2876         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
2877         if TARGET_64BIT.
2879         PR target/85503
2880         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
2881         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
2882         containing a CONST_VECTOR.
2884 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
2886         * doc/install.texi: Update newlib dependency for nvptx.
2888 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2890         PR target/85508
2891         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
2892         instead of INTVAL when shifting x left.
2894 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
2896         PR tree-optimization/85478
2897         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
2898         vect_grouped_store_supported for single element vectors.
2900 2018-04-24  Richard Biener  <rguenther@suse.de>
2902         PR target/85491
2903         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
2904         load cost increase to the case of non-constant step.
2906 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2908         PR target/84828
2909         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
2910         destination if any_malformed_asm.
2912 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
2914         PR middle-end/85496
2915         * expr.c (store_field): In the bitfield case, if the value comes from
2916         a function call and is returned in registers by means of a PARALLEL,
2917         do not change the mode of the temporary unless BLKmode and VOIDmode.
2919 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
2921         PR rtl-optimization/85423
2922         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
2923         dependencies to debug insns when the previous insn is non-debug.
2925 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
2927         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
2928         enums into a single definition.
2929         (fls): Fix predicates and printing.
2930         (seti): Likewise.
2932 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
2934         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
2935         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
2936         and short u6 immediate.
2937         (check_if_valid_sleep_operand): Remove.
2938         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
2940 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2942         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
2943         flag_always_save_lp condition.
2944         * config/nds32/nds32.opt (malways-save-lp): New option.
2946 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
2948         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
2949         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
2950         * config/nds32/nds32.h
2951         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
2952         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2954 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
2956         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
2957         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
2959 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
2960             Chung-Ju Wu  <jasonwucj@gmail.com>
2962         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
2963         Declare.
2964         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
2965         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2967 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2969         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2971 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2973         * config/nds32/nds32-protos.h (nds32_data_alignment,
2974         nds32_local_alignment): Declare.
2975         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
2976         nds32_local_alignment): New functions.
2977         (TARGET_CONSTANT_ALIGNMENT): Define.
2978         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2980 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2982         * config/nds32/nds32.c
2983         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
2984         (TARGET_MODES_TIEABLE_P): Likewise.
2986 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2988         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
2989         level Ofast and Og.
2991 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
2992             Chung-Ju Wu  <jasonwucj@gmail.com>
2994         * config/nds32/constants.md (unspec_volatile_element): Add enum values
2995         for unaligned access.
2996         * config/nds32/nds32-intrinsic.c: Implementation of expanding
2997         unaligned access.
2998         * config/nds32/nds32-intrinsic.md: Likewise.
2999         * config/nds32/nds32_intrinsic.h: Likewise.
3000         * config/nds32/nds32.h (nds32_builtins): Likewise.
3001         * config/nds32/nds32.opt (munaligned-access): New option.
3002         * config/nds32/nds32.c (nds32_asm_file_start): Display
3003         flag_unaligned_access status.
3005 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3007         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3008         -mno-relax is present.
3009         * config/riscv/linux.h (LINK_SPEC): Ditto.
3011 2018-04-20  Martin Sebor  <msebor@redhat.com>
3013         PR c/85365
3014         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3015         for null pointers.
3016         (gimple_fold_builtin_stxcpy_chk): Same.
3017         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3019 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3021         PR target/85456
3022         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3023         __powikf2 when long double is IEEE 128-bit.
3025 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3027         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3028         step to make sure stack always aligned.
3030 2018-04-20  Carl Love  <cel@us.ibm.com>
3032         PR target/83402
3033         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3034         size check for arg0.
3036 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3037             Tom de Vries  <tom@codesourcery.com>
3039         PR target/85445
3040         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3041         Emit insns for calls too.
3042         (nvptx_find_par): Always look for worker-level predecessor insn.
3043         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3044         calls.
3045         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3046         (nvptx_process_pars): Propagate frames for calls.
3048 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3050         PR target/85469
3051         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3052         Removed.
3053         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3054         (ix86_handle_option): Don't handle OPT_mibt.
3055         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3056         __SHSTK__.
3057         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3058         has_ibt and ibt.
3059         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3060         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3061         (ix86_target_macros): Define __CET__ with flag_cf_protection
3062         for -fcf-protection.
3063         * config/i386/i386.c (isa2_opts): Remove -mibt.
3064         * config/i386/i386.h (TARGET_IBT): Removed.
3065         (TARGET_IBT_P): Likewise.
3066         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3067         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3068         * config/i386/i386.opt (mcet): Update help message.
3069         (mshstk): Likewise.
3070         (mibt): Removed.
3071         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3072         -mcet as an alias for -mshstk.
3074 2018-04-20  Richard Biener <rguenther@suse.de>
3076         PR middle-end/85475
3077         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3078         complexity by forcing a single use of the multiply operand.
3080 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3082         ipa/85449
3083         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3084         recursion dependency to only apply to non-clones.
3086 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3088         ipa/85447
3089         * ipa-cp.c (create_specialized_node): Check that clones of
3090         self-recursive edges exist during IPA-CP.
3092 2018-04-19  Toon Moene  <toon@moene.org>
3094         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3095         by -O3. 
3097 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3099         PR tree-optimization/85467
3100         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3101         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3102         VECTOR_CST element to type.
3104 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3106         PR target/85397
3107         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3108         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3109         (builtin_longjmp): Likewise.
3110         (save_stack_nonlocal): New pattern.
3111         (restore_stack_nonlocal): Likewise.
3113 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3115         PR target/85404
3116         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3117         Replace ASM_OUTPUT_LABEL with fprintf.
3119 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3121         PR target/85417
3122         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3123         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3124         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3125         define __IBT__ and __SHSTK__ for -fcf-protection.
3126         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3127         TARGET_IBT.
3128         (ix86_trampoline_init): Likewise.
3129         (x86_output_mi_thunk): Likewise.
3130         (ix86_notrack_prefixed_insn_p): Likewise.
3131         (ix86_option_override_internal): Don't disallow -fcf-protection.
3132         * config/i386/i386.md (rdssp<mode>): Also enable for
3133         -fcf-protection.
3134         (incssp<mode>): Likewise.
3135         (nop_endbr): Likewise.
3136         * config/i386/i386.opt (mcet): Change help message to built-in
3137         functions only.
3138         (mibt): Likewise.
3139         (mshstk): Likewise.
3140         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3141         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3142         enable CET built-in functions.
3144 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3146         * common/config/i386/i386-common.c 
3147         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3148         OPTION_MASK_ISA_MOVDIRI_UNSET,
3149         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3150         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3151         * config.gcc (movdirintrin.h): New header.
3152         * config/i386/cpuid.h (bit_MOVDIRI,
3153         bit_MOVDIR64B): New bits.
3154         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3155         and -mmvodir64b.
3156         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3157         (VOID, PVOID, PCVOID)): New function types.
3158         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3159         __builtin_ia32_directstoreu_u64,
3160          __builtin_ia32_movdir64b): New builtins.
3161         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3162         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3163         and -mmovdiri.
3164         (ix86_valid_target_attribute_inner_p): Ditto.
3165         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3166         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3167         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3168         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3169         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3170         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3171         (movdiri<mode>, movdir64b_<mode>): New.
3172         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3173         * config/i386/immintrin.h: Include movdirintrin.h.
3174         * config/i386/movdirintrin.h: New file.
3175         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3177 2018-04-19  Richard Biener  <rguenther@suse.de>
3179         PR middle-end/85455
3180         * cfg.c (clear_bb_flags): When loop state says we have
3181         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3183 2018-04-19  Richard Biener  <rguenther@suse.de>
3185         PR tree-optimization/84737
3186         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3187         copying restrict info.
3188         (vect_setup_realignment): Use it.
3189         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3190         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3191         the first DR to all generated stores.
3192         (vectorizable_load): Likewise for loads.
3194 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3196         PR tree-optimization/85446
3197         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3198         the integral and pointer types to have the same precision.
3200         * doc/install.texi: Document --disable-cet being the default and
3201         --enable-cet=auto.
3203 2018-04-18  Martin Liska  <mliska@suse.cz>
3205         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3206         style.
3208 2018-04-18  Martin Liska  <mliska@suse.cz>
3210         Revert
3211         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3213         PR ipa/83983
3214         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3215         arguments if they are comparable.
3217 2018-04-18  Martin Liska  <mliska@suse.cz>
3219         Revert
3220         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3222         PR lto/84805
3223         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3224         incomplete types.
3226 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3228         PR target/85388
3229         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3230         ENDBR after calling __morestack.
3232 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3234         PR jit/85384
3235         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3236         by using gcc_base_ver to generate a gcc_driver_version, and use
3237         it when generating GCC_DRIVER_NAME.
3238         * configure: Regenerate.
3240 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3242         PR target/81084
3243         * config.gcc: Obsolete powerpc*-*-*spe*.
3245 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3247         PR debug/84637
3248         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3249         (stabstr_D): Change type of unum from unsigned int to
3250         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3251         type.
3253 2018-04-17  Jim Wilson  <jimw@sifive.com>
3255         PR 84856
3256         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3257         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3258         Set arg_pointer_offset after using pretend_args_size.
3260 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3262         PR rtl-optimization/85431
3263         * dse.c (record_store): Ignore zero width stores.
3265         PR sanitizer/85230
3266         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3267         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3268         __builtin_stack_restore rather than after it.
3269         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3270         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3271         argument instead of virtual_dynamic_stack_rtx.
3273 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3275         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3276         New prototype.
3277         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3278         Add note to error message to explain internal mapping of overloaded
3279         built-in function name to non-overloaded built-in function name.
3280         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3281         function.
3283 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3285         PR target/85424
3286         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3287         where the inputs overlap with the output.
3289 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3291         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3292         (=v, v) alternative and explicit "memory" attribute.
3293         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3294         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3295         attributes.
3296         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3297         "sselog1" type instead of "sselog".
3298         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3299         "sselog".  Remove explicit "memory" attribute.
3300         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3301         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3302         attributes.
3303         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3304         "sselog1" type instead of "sselog".  Remove explicit "memory"
3305         attribute.
3306         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3307         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3308         attribute.
3309         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3310         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3311         attributes.
3312         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3313         "sselog1" type instead of "sselog".  Remove explicit "memory"
3314         attribute.
3315         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3316         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3317         attribute.
3319         PR target/85430
3320         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3322         PR middle-end/85414
3323         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3324         on a SUBREG.
3326 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3328         PR ipa/85421
3329         * ipa-cp.c (create_specialized_node): Call
3330         expand_all_artificial_thunks if necessary.
3332 2018-04-17  Martin Liska  <mliska@suse.cz>
3334         PR lto/85405
3335         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3336         in message, remote space in between '_G' and '('.
3338 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3340         PR target/85281
3341         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3342         avx512f_vmcmp<mode>3<round_saeonly_name>,
3343         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3344         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3345         avx512f_rndscale<mode><round_saeonly_name>,
3346         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3347         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3348         Use %<iptr>2 instead of %2 for -masm=intel.
3349         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3350         avx512f_vcvttss2usi<round_saeonly_name>,
3351         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3352         -masm=intel.
3353         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3354         avx512f_vcvttsd2usi<round_saeonly_name>,
3355         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3356         Use %q1 instead of %1 for -masm=intel.
3357         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3358         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3359         of %3 for -masm=intel.
3360         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3361         -masm=intel.
3362         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3363         -masm=intel.
3364         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3365         -masm=intel.
3366         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3367         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3368         %g1.
3369         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3370         -masm=intel.
3371         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3372         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3373         %g1 and one with %0 and %1.
3374         (avx512er_vmrcp28<mode><round_saeonly_name>,
3375         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3376         %1 for -masm=intel.
3377         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3378         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3379         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3380         of %0 and %{%4%} for -masm=intel.
3381         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3382         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3383         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3384         order of %0 and %{%5%}%{z%} for -masm=intel.
3386 2018-04-17  Jan Hubicka  <jh@suse.cz>
3388         PR lto/85405
3389         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3391 2018-04-17  Martin Liska  <mliska@suse.cz>
3393         PR ipa/85329
3394         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3395         for target_clone error message.  Make default implementation
3396         clone to be a local declaration.
3397         (separate_attrs): Add new argument and check for an empty
3398         string.
3399         (expand_target_clones): Handle it.
3400         (ipa_target_clone): Make redirection just for target_clones
3401         functions.
3403 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3404             Tom de Vries  <tom@codesourcery.com>
3406         PR middle-end/84955
3407         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3408         tiled basic blocks without omp continue statements.
3410 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3412         PR target/83660
3413         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3414         vec_extract expression as having side effects to make sure it gets
3415         a cleanup point.
3417 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3419         PR target/85403
3420         * config/i386/i386.c (get_builtin_code_for_version): Check
3421         error_mark_node.
3423 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3425         PR target/84331
3426         * gcc/config.gcc: Support "skylake".
3427         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3428         PROCESSOR_SKYLAKE.
3429         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3430         (processor_target_table): Add "skylake".
3431         (ix86_option_override_internal): Add "skylake".
3432         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3433         PROCESSOR_CANNONLAKE.
3434         (get_builtin_code_for_version): Fix priority for
3435         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3436         PROCESSOR_SKYLAKE-AVX512.
3437         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3438         (processor_type): Add PROCESSOR_SKYLAKE.
3440 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3441             Jason Merrill  <jason@redhat.com>
3443         PR c++/85112
3444         * convert.c (convert_to_integer_1): Use direct recursion for
3445         enumeral types and types with a precision less than the number
3446         of bits in their mode.
3448 2018-04-16  Julia Koval  <julia.koval@intel.com>
3450         PR target/84413
3451         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3452         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3454 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3456         PR target/85293
3457         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3458         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3459         and -mno-direct-move.
3461 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3463         PR target/83402
3464         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3465         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3466         Ensure negative shifts result in {0}.
3468 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3470         PR rtl-optimization/79916
3471         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3472         regs (if any) to define how to gnerate SD moves when LRA is in
3473         progress.
3475 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3477         PR rtl-optimization/85393
3478         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3479         * except.c (expand_dw2_landing_pad_for_region): Make static.
3480         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3481         a label and unconditional jump to old_bb, rather than
3482         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3483         basic block.
3485         PR rtl-optimization/85376
3486         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3487         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3488         instead of a specific value.
3490 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3491             Bin Cheng  <bin.cheng@arm.com>
3493         PR tree-optimization/82965
3494         PR tree-optimization/83991
3495         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3496         by_profile_only parameter.
3497         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3498         information if the loop was predicted to iterate too many times.
3499         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3501 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3503         PR lto/71991
3504         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3505         always inline.
3507 2018-04-13  Martin Liska  <mliska@suse.cz>
3508             Jakub Jelinek  <jakub@redhat.com>
3510         PR middle-end/81657
3511         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3512         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3513         * builtins.c (expand_builtin_memory_copy_args): Use
3514         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3515         handle dest_addr == pc_rtx.
3517 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3519         PR target/85291
3520         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3521         asked to not generate direct moves.
3522         (fix_trunc<mode>si2_stfiwx): Similar.
3523         (fix_trunc<mode>si2_internal): Similar.
3525 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3527         PR debug/83157
3528         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3529         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3530         lookup if dest in some wider mode is known to be const0_rtx and
3531         if so, record permanent equivalence for it to be ZERO_EXTEND of
3532         the narrower mode destination.
3534 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3536         * lto-streamer-out.c (output_function): Revert 259346.
3537         * omp-expand.c (expand_oacc_for): Likewise.
3539 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
3541         PR rtl-optimization/85354
3542         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3543         * sel-sched.c (sel_global_init): ... here.
3545 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
3547         PR target/85238
3548         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3549         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3550         mode for PE-COFF targets.
3551         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
3552         (i386_pe_asm_lto_end): Likewise.
3553         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
3554         (TARGET_ASM_LTO_END): Likewise.
3555         * config/i386/winnt.c (saved_debug_info_level): New static variable.
3556         (i386_pe_asm_lto_start): New function.
3557         (i386_pe_asm_lto_end): Likewise.
3559 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3560             Richard Biener  <rguenther@suse.de>
3562         PR middle-end/84955
3563         * lto-streamer-out.c (output_function): Fix CFG loop state before
3564         streaming out.
3565         * omp-expand.c (expand_oacc_for): Handle calls to internal
3566         functions like regular functions.
3568 2018-04-12  Richard Biener  <rguenther@suse.de>
3570         PR lto/85371
3571         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
3572         for the early LTO debug to properly generate references to it
3573         during DIE emission.  Do not re-use that for the skeleton for
3574         split-dwarf.
3575         (dwarf2out_early_finish): Likewise.
3577 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3579         PR target/85328
3580         * config/i386/sse.md
3581         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
3582         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
3583         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
3584         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
3585         and output is a reg, avoid creating invalid lowpart subreg, but
3586         instead split into a 512-bit move.  Don't split if not AVX512VL,
3587         input is xmm16+ reg and output is a mem.
3588         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
3589         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
3590         xmm16+ reg and output is a mem.
3592 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3594         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
3595         also for flag_dwarf2_cfi_asm.
3597 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3599         PR rtl-optimization/85342
3600         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3601         a bool scalar var inside of the loop instead.  Don't try to update
3602         recog_data.operand after failed apply_change_group.
3604 2018-04-12  Tom de Vries  <tom@codesourcery.com>
3606         PR target/85296
3607         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3608         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
3609         array with flexible array member as array without given dimension.
3610         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3611         argument for undefined param to true.
3613 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
3615         PR target/85321
3616         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3617         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3618         from PowerPC section.
3619         * config/rs6000/sysv4.opt (mcall-): Improve help text.
3620         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3621         help text that is too long.
3622         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3623         help text that is too long.
3624         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3625         help text that is too long.
3627 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
3629         * config/alpha/alpha.md (stack_probe_internal): Rename
3630         from "probe_stack".  Update all callers.
3632 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3634         PR rtl-optimization/84566
3635         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3636         sched_macro_fuse_insns.
3638 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3640         PR target/84301
3641         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3642         (compute_block_dependences): ... from here.
3644 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3646         PR tree-optimization/85331
3647         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3648         from int to HOST_WIDE_INT.
3650 2018-04-11  Martin Jambor  <mjambor@suse.cz>
3652         PR ipa/84149
3653         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3654         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3655         not the same as the source val.
3656         (cgraph_edge_brings_value_p): New parameter.
3657         (gather_edges_for_value): Pass destination value to
3658         cgraph_edge_brings_value_p.
3659         (perhaps_add_new_callers): Likewise.
3660         (get_info_about_necessary_edges): Likewise and exclude values brought
3661         only by self-recursive edges.
3662         (create_specialized_node): Redirect only clones of self-calling edges.
3663         (+self_recursive_pass_through_p): New function.
3664         (find_more_scalar_values_for_callers_subset): Use it.
3665         (find_aggregate_values_for_callers_subset): Likewise.
3666         (known_aggs_to_agg_replacement_list): Removed.
3667         (decide_whether_version_node): Re-calculate known constants for all
3668         remaining context clones.
3670 2018-04-11  Richard Biener  <rguenther@suse.de>
3672         PR lto/85339
3673         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3674         from early DWARF output.
3675         (dwarf2out_early_finish): Output line info unconditionally into
3676         early DWARF and add reference to it.
3678 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3680         PR target/85281
3681         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3682         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3683         other than V2DFmode using iptr mode attribute.
3684         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3686 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3688         PR rtl-optimization/84659
3689         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3691 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3693         PR debug/85302
3694         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3695         SIZEP is NULL.
3696         (output_loc_list): Pass address of a dummy size variable even in the
3697         locview handling loop.
3698         (index_location_lists): Add comment on why skip_loc_list_entry can't
3699         call size_of_locs.
3701 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3703         PR target/85261
3704         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3705         into register.
3707 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
3709         PR target/85321
3710         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3711         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3712         and -mstring-compare-inline-limit.
3714 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3716         PR target/85287
3717         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3718         for stack clash protection in a register whenever we need it to be in
3719         a register.
3721 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3723         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3724         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3726 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3728         PR target/85321
3729         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3730         the help text.
3731         (mlong-double-): Ditto.
3732         * config/rs6000/sysv4.opt (msdata=): Ditto.
3733         (mtls-size=): Ditto.
3735 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3737         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3738         erroneous entries for
3739         "vector int vec_ldl (int, long int *)", and
3740         "vector unsigned int vec_ldl (int, unsigned long int *)".
3741         Add comments and entries for
3742         "vector bool char vec_ldl (int, bool char *)",
3743         "vector bool short vec_ldl (int, bool short *)",
3744         "vector bool int vec_ldl (int, bool int *)",
3745         "vector bool long long vec_ldl (int, bool long long *)",
3746         "vector pixel vec_ldl (int, pixel *)",
3747         "vector long long vec_ldl (int, long long *)",
3748         "vector unsigned long long vec_ldl (int, unsigned long long *)".
3749         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3750         type tree bool_long_long_type_node and correct definition of
3751         bool_V2DI_type_node to make reference to this new type tree.
3752         (rs6000_mangle_type): Replace erroneous reference to
3753         bool_long_type_node with bool_long_long_type_node.
3754         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3755         comments to emphasize sign distinctions for char and int types and
3756         replace RS6000_BTI_bool_long constant with
3757         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
3758         use of RS6000_BTI_pixel.
3759         (bool_long_type_node): Remove this macro definition.
3760         (bool_long_long_type_node): New macro definition
3762 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3764         PR rtl-optimization/85300
3765         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3766         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3767         simplify_unary_operation fails.
3769 2018-04-10  Martin Liska  <mliska@suse.cz>
3771         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3772         cgraph_edge and ipa_ref.
3774 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3776         PR target/85177
3777         PR target/85255
3778         * config/i386/sse.md
3779         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3780         computation of the VEC_MERGE selector from mask.
3781         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3782         Fix decoding of the VEC_MERGE selector into mask.
3784 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3786         PR tree-optimization/85286
3787         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
3789 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3791         * final.c (final_1): Set insn_last_address as well as
3792         insn_current_address.
3794 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3796         PR target/85173
3797         * explow.c (emit_stack_probe): Call validize_mem on memory location
3798         before passing it to gen_probe_stack.  Create address operand and
3799         legitimize it for the probe_stack_address case.
3801 2018-04-09  Jan Hubicka  <jh@suse.cz>
3803         PR lto/85078
3804         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
3805         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
3806         * tree.c (free_lang_data_in_type): Fix handling of binfos;
3807         walk basetypes.
3808         (free_lang_data): Rebuild type inheritance graph.
3810 2018-04-09  Martin Sebor  <msebor@redhat.com>
3812         * invoke.texi (-finline-small-functions): Mention other optimization
3813         options.
3814         (-findirect-inlining, -fpartial-inlining): Same.
3815         (-finline-functions-called-once): Same.
3816         (-freorder-blocks-and-partition): Same.
3818 2018-04-09  Jan Hubicka  <jh@suse.cz>
3820         PR rtl/84058
3821         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
3822         jumps; choose last target that matches the criteria (i.e.
3823         no partition changes for non-crossing jumps).
3824         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
3825         support for redirecting crossing jumps to non-crossing.
3827 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
3829         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
3830         also for naked functions.
3832 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
3834         * config/arc/arc.md (add_shift): New pattern.
3835         (add_shift2): Likewise.
3836         (sub_shift): Likewise.
3837         (sub_shift_cmp0_noout): Likewise.
3838         (compare_si_ashiftsi): Likewise.
3839         (xbfu_cmp0_noout): New combine pattern.
3840         (xbfu_cmp0"): Likewise.
3841         (movsi_set_cc_insn): Place the predicable variant first.
3842         (commutative_binary_cmp0_noout): Remove clobber.
3843         (commutative_binary_cmp0): New pattern.
3844         (noncommutative_binary_cmp0): Likewise.
3845         (noncommutative_binary_cmp0_noout): Likewise.
3846         (noncommutative_binary_comparison_result_used): Removed.
3847         (rsub_cmp0): New pattern.
3848         (rsub_cmp0_noout): Likewise.
3849         (extzvsi): Changed, keep only meaningful variants.
3850         (SQH, SEZ): New iterators.
3851         (SQH_postfix): New mode attribute.
3852         (SEZ_prefix): New code attribute.
3853         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
3854         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
3855         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
3856         of numerical value.
3857         (noncommutative_operator): Check the availability of barrel
3858         shifter option.
3860 2018-04-09  Richard Biener  <rguenther@suse.de>
3862         PR tree-optimization/85284
3863         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
3864         Only use the niter constraining form of simple_iv when the exit
3865         is always executed.
3867 2018-04-09  Tom de Vries  <tom@codesourcery.com>
3869         PR target/84041
3870         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3871         (define_expand "*memory_barrier"): New define_expand.
3872         (define_insn "memory_barrier"): New insn.
3874 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3876         PR rtl-optimization/80463
3877         PR rtl-optimization/83972
3878         PR rtl-optimization/83480
3880         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
3881         correct producer for the insn.
3882         (tidy_control_flow): Fixup seqnos in case of debug insns.
3884 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3886         PR rtl-optimization/83913
3888         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
3889         different sched-times when merging exprs.
3891 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3893         PR rtl-optimization/83962
3895         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
3896         tidy_fallthru_edge and tidy_control_flow.
3898 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3900         PR rtl-optimization/83530
3902         * sel-sched.c (force_next_insn): New global variable.
3903         (remove_insn_for_debug): When force_next_insn is true, also leave only
3904         next insn in the ready list.
3905         (sel_sched_region): When the region wasn't scheduled, make another pass
3906         over it with force_next_insn set to 1.
3908 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
3910         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
3911         into tm_file.
3912         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3913         for interrupt control.
3914         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3915         functions for interrupt control.
3916         * config/nds32/nds32-intrinsic.md: Likewise.
3917         * config/nds32/nds32_intrinsic.h: Likewise.
3918         * config/nds32/nds32.h (nds32_builtins): Likewise.
3920 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
3922         * config/nds32/nds32.c (nds32_init_machine_status,
3923         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
3924         strict_aligned_p field.
3925         (nds32_expand_to_rtl_hook): New function.
3926         (TARGET_EXPAND_TO_RTL_HOOK): Define.
3927         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
3929 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3930             Chung-Ju Wu  <jasonwucj@gmail.com>
3932         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
3933         * config/nds32/nds32-n7.md: New file.
3934         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
3935         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
3936         pipeline.
3937         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
3938         * config/nds32/nds32.md (pipeline_model): Add n7.
3939         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
3940         * config/nds32/pipelines.md: Include n7 settings.
3942 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3943             Chung-Ju Wu  <jasonwucj@gmail.com>
3945         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
3946         * config/nds32/nds32-e8.md: New file.
3947         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
3948         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
3949         pipeline.
3950         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
3951         * config/nds32/nds32.md (pipeline_model): Add e8.
3952         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
3953         * config/nds32/pipelines.md: Include e8 settings.
3955 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3956             Chung-Ju Wu  <jasonwucj@gmail.com>
3958         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
3959         * config/nds32/nds32-n8.md: New file.
3960         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
3961         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
3962         pipeline.
3963         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
3964         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
3965         * config/nds32/nds32.md (pipeline_model): Add n8.
3966         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
3967         * config/nds32/pipelines.md: Include n8 settings.
3969 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3970             Chung-Ju Wu  <jasonwucj@gmail.com>
3972         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
3973         * config/nds32/nds32-n9-2r1w.md: New file.
3974         * config/nds32/nds32-n9-3r2w.md: New file.
3975         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
3976         nds32_register_ports): New or modify for cpu n9.
3977         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
3978         pipeline.
3979         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
3980         * config/nds32/nds32-utils.c: New file.
3981         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
3982         TARGET_MUL_SLOW): Define.
3983         * config/nds32/nds32.md (pipeline_model): New attribute.
3984         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
3985         New options that support cpu n9.
3986         * config/nds32/pipelines.md: Include n9 settings.
3987         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
3989 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
3991         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
3992         information if necessary.
3993         (output_cond_branch_compare_zero): Likewise.
3994         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
3995         (nds32_target_alignment): Refine for alignment.
3996         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
3997         (FUNCTION_BOUNDARY): Modify.
3998         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
3999         align case.
4000         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4002 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4004         * config/nds32/constants.md (unspec_volatile_element): Add values for
4005         TLB operation and data prefetch.
4006         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4007         functions for TLB operation and data prefetch.
4008         * config/nds32/nds32-intrinsic.md: Likewise.
4009         * config/nds32/nds32_intrinsic.h: Likewise.
4010         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4011         (nds32_print_operand): Likewise.
4012         * config/nds32/nds32.h (nds32_builtins): Likewise.
4014 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4015         Andrew Pinski <pinsika@gcc.gnu.org>
4017         PR middle-end/82976
4018         * match.pd: Use constant_boolean_node of correct type instead of
4019         boolean_true_node or boolean_false_node for simplifying
4020         pointer comparisons to zero.
4022 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4024         PR tree-optimization/80021
4025         * tree.c (verify_type_variant): Make error call in verify_variant_match
4026         translatable and remove final full stop.
4028 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4030         * config/nds32/constants.md (unspec_volatile_element): Add
4031         UNSPEC_VOLATILE_EH_RETURN.
4032         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4033         nds32_output_stack_pop): Support dwarf exception handling process.
4034         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4035         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4036         exception handling process.
4037         (nds32_compute_stack_frame): Likewise.
4038         (nds32_return_addr_rtx): Likewise.
4039         (nds32_initial_elimination_offset): Likewise.
4040         (nds32_expand_prologue): Likewise.
4041         (nds32_expand_epilogue): Likewise.
4042         (nds32_dynamic_chain_address): New function.
4043         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4044         exception handling.
4045         (DYNAMIC_CHAIN_ADDRESS): Define.
4046         (EH_RETURN_DATA_REGNO): Define.
4047         (EH_RETURN_STACKADJ_RTX): Define.
4048         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4049         patterns for dwarf exception handling.
4051 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4053         * config/nds32/nds32.h: Clean up obsolete macros.
4055 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4057         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4058         Add enum values for particular instructions.
4059         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4060         particular intrinsic functions.
4061         * config/nds32/nds32-intrinsic.md: Likewise.
4062         * config/nds32/nds32_intrinsic.h: Likewise.
4063         * config/nds32/nds32.h (nds32_builtins): Likewise.
4064         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4065         (btst, ave): New patterns for particular instructions.
4067 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4069         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4070         Add enum values for atomic load/store and memory sync.
4071         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4072         and memory sync.
4073         * config/nds32/nds32-intrinsic.md: Likewise.
4074         * config/nds32/nds32_intrinsic.h: Likewise.
4075         * config/nds32/nds32.h (nds32_builtins): Likewise.
4077 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4079         PR tree-optimization/85257
4080         * fold-const.c (native_encode_vector): If not all elts could fit
4081         and off is -1, return 0 rather than offset.
4082         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4083         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4084         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4085         adjust buffer in native_interpret_expr call.
4087 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4089         * config/nds32/constants.md (unspec_volatile_element): Add cache
4090         control enum values.
4091         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4092         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4093         * config/nds32/nds32.c (nds32_cctl_names): New.
4094         (nds32_print_operand): Handle cache control register names.
4095         * config/nds32/nds32.h (nds32_builtins): New enum values.
4096         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4097         macros.
4098         * config/nds32/nds32.md (type): Add mmu.
4099         * config/nds32/pipelines.md (simple_insn): Add mmu.
4101 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4103         * config/nds32/nds32.md (type): Remove call.
4104         * config/nds32/pipelines.md (simple_insn): Likewise.
4106 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4108         * config/nds32/constants.md (unspec_volatile_element): Add
4109         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4110         UNSPEC_VOLATILE_FMFCFG.
4111         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4112         description for fmfcfg and fmfcsr.
4113         (bdesc_1arg): Add fmtcsr.
4114         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4115         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4116         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4117         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4118         unspec_fmfcfg): New patterns.
4119         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4120         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4121         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4122         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4123         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4124         __nds32__fmfcfg): Define.
4126 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4128         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4129         intrinsic register names.
4130         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4131         intrinsic register enum values and macros.
4133 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4135         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4136         for load/store addressing form.
4137         (nds32_print_operand_address): Likewise.
4139 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4141         PR target/85196
4142         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4143         based on LABEL_REF.  Remove useless assertion.
4144         (pic_address_needs_scratch): Fix formatting.
4145         (sparc_legitimize_pic_address): Minor tweaks.
4146         (sparc_delegitimize_address): Adjust assertion accordingly.
4147         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4148         into symbolic_operand.
4149         (movsi_high_pic_label_ref): Likewise.
4150         (movsi_lo_sum_pic_label_ref): Likewise.
4151         (movdi_pic_label_ref): Likewise.
4152         (movdi_high_pic_label_ref): Likewise.
4153         (movdi_lo_sum_pic_label_ref): Likewise.
4155 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4157         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4158         custom LIB_SPEC setup.
4160 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4161             Kito Cheng  <kito.cheng@gmail.com>
4163         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4164         * config/riscv/freebsd.h: New.
4166 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4168         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4169         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4170         file.
4172 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4173             Kito Cheng  <kito.cheng@gmail.com>
4175         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4176         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4177         * config/nds32/nds32-protos.h (nds32_output_call,
4178         nds32_output_return): Declare.
4179         * config/nds32/nds32.md: Refine all the call and return patterns.
4181 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4183         PR debug/85252
4184         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4185         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4187         PR rtl-optimization/84872
4188         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4189         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4190         EDGE_CROSSING edge.
4192 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4194         * expr.c (copy_blkmode_to_reg): Revert 254862.
4195         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4197 2018-04-06  Richard Biener  <rguenther@suse.de>
4199         PR middle-end/85244
4200         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4201         after seeing a component reference with an adjacent field.  Treat
4202         refs to arrays at struct end of external decls similar to
4203         refs to unconstrained commons.
4205 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4207         PR sanitizer/85213
4208         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4209         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4210         recursive calls.
4211         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4212         save_p here.
4214 2018-04-06  Richard Biener  <rguenther@suse.de>
4216         PR middle-end/85180
4217         * alias.c (find_base_term): New wrapper around find_base_term
4218         unwinding CSELIB_VAL_PTR changes.
4219         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4220         recursion.
4222 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4224         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4225         instructions.
4226         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4227         constant definitions.
4228         ("nop"): lr 0,0 -> nopr r0
4229         ("nop_lr0", "nop_lr1"): New insn definitions.
4231 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4233         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4234         NDS32_V3PUSH_AVAILABLE_P macro.
4236 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4237             Chung-Ju Wu  <jasonwucj@gmail.com>
4239         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4240         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4241         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4242         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4243         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4244         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4245         * config/nds32/constraints.md: New constraints and checking for hard
4246         float configuration.
4247         * config/nds32/iterators.md: New mode iterator and attribute for hard
4248         float configuration.
4249         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4250         patterns.
4251         * config/nds32/nds32-fpu.md: New file.
4252         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4253         deal with hard float code generation.
4254         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4255         ARCH_V3S.
4256         (abi_type, float_reg_number): New enum type.
4257         * config/nds32/nds32-predicates.c: New predicates for hard float.
4258         * config/nds32/nds32-protos.h: Declare functions for hard float.
4259         * config/nds32/nds32.c: Implementation for hard float configuration.
4260         * config/nds32/nds32.h: Definitions for hard float configuration.
4261         * config/nds32/nds32.md: Include hard float machine description and
4262         modify patterns for hard float configuration.
4263         * config/nds32/nds32.opt: New options for hard float configuration.
4264         * config/nds32/predicates.md: New predicates for hard float
4265         configuration.
4267 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4269         * common/config/nds32/nds32-common.c
4270         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4272 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4274         PR middle-end/85195
4275         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4276         CONSTRUCTOR_ELT (ctor, ...)->value.
4278 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4280         PR target/85193
4281         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4283 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4285         PR target/85204
4286         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4287         cond jump.
4289 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4290             Kito Cheng  <kito.cheng@gmail.com>
4292         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4293         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4294         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4295         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4297 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4298             Kito Cheng  <kito.cheng@gmail.com>
4300         * config/nds32/constraints.md (Ufe): New memory constraint.
4301         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4302         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4303         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4304         operands.
4305         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4306         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4308 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4310         * config/nds32/nds32.md: Use optimize_size in the condition for
4311         alu-shift instructions.
4313 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4315         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4317 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4319         * config/nds32/nds32.md (negsi2): Refine pattern.
4321 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4322             Chung-Ju Wu  <jasonwucj@gmail.com>
4324         * config/nds32/iterators.md (shift_rotate): New code iterator.
4325         (shift): New code attribute.
4326         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4327         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4328         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4329         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4330         bit-wise operations.
4331         (andsi3, *andsi3): Ditto.
4332         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4333         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4334         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4335         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4336         nds32_ior_operand, nds32_xor_operand): New predicates.
4338 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4340         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4341         (addsi3, subsi3): ... this.
4343 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4345         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4347 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4349         * config/nds32/nds32.md: Adjust indention.
4351 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4353         * config/nds32/nds32.md (feature): New attribute.
4355 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4357         * config/nds32/nds32.md (subtype): New attribute.
4359 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4361         PR target/85203
4362         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4363         expansion to perform a bitwise AND of the argument followed by a
4364         boolean negation of the result.
4366 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4368         PR rtl-optimization/84878
4369         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4370         the basic block.  Assert the use reference is not artificial and that
4371         it has an associated insn.
4373 2018-04-04  Michael Matz  <matz@suse.de>
4375         * builtins.c (compute_objsize): Pass correct operand
4376         to array_at_struct_end_p.
4378 2018-04-04  Richard Biener  <rguenther@suse.de>
4380         PR lto/85176
4381         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4382         from contexts for DINFO_LEVEL_TERSE and below.
4384 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4386         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4387         resiter_operand condition.
4388         * config/nds32/nds32.md (*move<mode>): Ditto.
4390 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4391             Monk Chiang  <sh.chiang04@gmail.com>
4393         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4395 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4397         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4399 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4400             Kito Cheng  <kito.cheng@gmail.com>
4402         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4403         nds32_cond_code_str, output_cond_branch,
4404         output_cond_branch_compare_zero, nds32_expand_cbranch,
4405         nds32_expand_cstore, nds32_expand_movcc,
4406         nds32_output_cbranchsi4_equality_zero,
4407         nds32_output_cbranchsi4_equality_reg,
4408         nds32_output_cbranchsi4_equality_reg_or_const_int,
4409         nds32_output_cbranchsi4_greater_less_zero: New functions.
4410         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4411         nds32_expand_cstore, nds32_expand_movcc,
4412         nds32_output_cbranchsi4_equality_zero,
4413         nds32_output_cbranchsi4_equality_reg,
4414         nds32_output_cbranchsi4_equality_reg_or_const_int,
4415         nds32_output_cbranchsi4_greater_less_zero): Declare.
4416         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4417         nds32_rimm11s_operand): New predicates.
4418         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4419         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4420         patterns.
4422 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4424         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4425         * config/nds32/nds32.md: Ditto.
4426         * config/nds32/pipelines.md: Ditto.
4428 2018-04-04  Richard Biener  <rguenther@suse.de>
4430         PR tree-optimization/85168
4431         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4432         propagating abnormals.
4434 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4436         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4438 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4439             Kito Cheng  <kito.cheng@gmail.com>
4441         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4442         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4443         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4444         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4445         * config/nds32/nds32.md (sibcall_internal): New.
4446         (sibcall_register): Remove.
4447         (sibcall_immediate): Remove.
4448         (sibcall_value_internal): New.
4449         (sibcall_value_register): Remove.
4450         (sibcall_value_immediate): Remove.
4451         * config/nds32/predicates.md (nds32_general_register_operand): New.
4452         (nds32_call_address_operand): New.
4454 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4456         PR rtl-optimization/85167
4457         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4458         bb_defs if *split_p, instead preinitialize it to NULL.
4460         PR tree-optimization/85156
4461         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4462         evaluating the argument multiple times.
4464 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4466         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4467         than vector.
4468         (_mm_cvtpd_ps): Likewise.
4469         (_mm_cvttpd_epi32): Likewise.
4470         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4471         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4472         vector, pixel, and bool following altivec.h include.
4474 2018-04-03  Martin Sebor  <msebor@redhat.com>
4476         * doc/extend.texi (Common Function Attributes): Clarify.
4477         (const attribute): Likewise.
4478         (pure attribute): Likewise.
4480 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4482         PR target/85169
4483         * config/i386/i386.c (ix86_expand_vector_set): Use
4484         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4486 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4488         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4489         instructions when changing rounding bits to preserve precision bits
4490         in the x87 control word.
4492 2018-04-03  Martin Liska  <mliska@suse.cz>
4494         PR tree-optimization/82491
4495         * rtl.h (strip_offset_and_add): Replace += suboffset with
4496         poly_uint64 () + suboffset.
4498 2018-03-29  Martin Liska  <mliska@suse.cz>
4499             Martin Jambor  <mjambor@suse.cz>
4501         PR ipa/84947
4502         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4503         param_type is not an integral or pointer type.
4505 2018-04-03  Richard Biener  <rguenther@suse.de>
4507         * sese.h (recompute_all_dominators): Remove.
4509 2018-04-02  Martin Sebor  <msebor@redhat.com>
4511         * doc/invoke.texi (-Wrestrict): Fix typos.
4513 2018-04-02  Jim Wilson  <jimw@sifive.com>
4515         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4516         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4517         (<optab>di3, <optab>si3_extend): Likewise.
4518         (<optab>si3_mask, <optab>si3_mask_1): New.
4519         (<optab>di3_mask, <optab>di3_mask_1): New.
4520         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4521         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4522         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4524 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4526         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4527         example.
4529 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4531         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4532         (nds32_canonicalize_comparison): New function.
4534 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4535             Kito Cheng  <kito.cheng@gmail.com>
4536             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4538         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4539         * config/nds32/constants.md (unspec_volatile_element): Add
4540         UNSPEC_VOLATILE_RELAX_GROUP.
4541         * config/nds32/nds32-relax-opt.c: New file.
4542         * config/nds32/nds32-predicates.c
4543         (nds32_symbol_load_store_p): New function.
4544         * config/nds32/nds32-protos.h
4545         (nds32_symbol_load_store_p): Declare function.
4546         (make_pass_nds32_relax_opt): Declare new rtl pass function.
4547         * config/nds32/nds32.c
4548         (nds32_register_pass): New function to register pass.
4549         (nds32_register_passes): New function to register passes.
4550         * config/nds32/nds32.md (relax_group): New pattern.
4551         * config/nds32/nds32.opt (mrelax-hint): New option.
4552         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
4554 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
4556         * config/nds32/t-nds32: Modify files dependency.
4558 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4560         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
4561         (PROFILE_HOOK): Define its implementation.
4563 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4565         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
4566         type and 32-bit size.
4568 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
4570         PR middle-end/85090
4571         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
4572         (V_128_256): New mode iterator.
4573         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
4574         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
4575         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
4576         of V.
4577         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
4578         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
4580 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
4582         PR target/83315
4583         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
4584         NaN inputs correctly.
4586 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
4588         PR target/80546
4589         * config/rs6000/vsx.md (??r): New mode attribute.
4590         (*vsx_mov<mode>_64bit): Use it.
4591         (*vsx_mov<mode>_32bit): Likewise.
4593 2018-03-30  Martin Sebor  <msebor@redhat.com>
4595         PR tree-optimization/84818
4596         * builtins.c (check_access): Use warning_n.
4598 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
4600         PR target/83822
4601         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4602         condition.
4603         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4604         condition.
4606 2018-03-30  Julia Koval  <julia.koval@intel.com>
4608         PR target/84413
4609         * x86-tune.def (movx, partial_reg_dependency): Enable for
4610         m_SKYLAKE_AVX512.
4612 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
4614         PR inline-asm/84985
4615         * lra-constraints.c (process_alt_operands): Move setting
4616         this_alternative_matches below.
4618 2018-03-29  Martin Liska  <mliska@suse.cz>
4620         PR lto/84995.
4621         * doc/invoke.texi: Document how LTO works with debug info.
4622         Describe auto-load support of binutils.  Mention 'x86-64'
4623         as valid option value of -march option.
4625 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
4627         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4629         PR c/85094
4630         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4631         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4632         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4633         checking.
4635 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4637         PR target/84912
4638         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4639         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4640         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4641         for RS6000_BTM_POWERPC64.
4642         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4643         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4644         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4645         definition.
4646         (DIVDE): Use it.
4647         (DIVDEU): Likewise.
4649 2018-03-28 Carl Love  <cel@us.ibm.com>
4651         Revert
4652         2017-09-27  Carl Love  <cel@us.ibm.com>
4654         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4655         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4656         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4657         fctiw instruction.
4659 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4661         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4662         instead of __vector bool.
4663         (_mm_max_pu8): Likewise.
4664         (_mm_min_pi16): Likewise.
4666 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4668         PR target/84912
4669         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4670         (DIVWEUO): Likewise.
4671         (DIVDEO): Likewise.
4672         (DIVDEUO): Likewise.
4673         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4674         DIVWEUO and DIVDEUO.
4675         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4676         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4677         (div_extend): Likewise.
4678         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4679         builtin function.
4680         (__builtin_divweuo): Likewise.
4681         (__builtin_divdeo): Likewise.
4682         (__builtin_divdeuo): Likewise.
4684 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4686         PR target/85095
4687         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4688         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4690         PR tree-optimization/82004
4691         * gimple-match-head.c (optimize_pow_to_exp): New function.
4692         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4693         Don't fold to exp if optimize_pow_to_exp is false.
4695 2018-03-28  Martin Liska  <mliska@suse.cz>
4697         PR other/84819
4698         * calls.c (initialize_argument_information): Fix trailing space.
4699         * common.opt: Fix typo and provide better explanation for
4700         -fsanitize-coverage option.
4701         * config/i386/i386.opt: Fix typo.
4703 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4704             Martin Liska  <mliska@suse.cz>
4706         PR sanitizer/85081
4707         * gimplify.c (asan_poison_variable): Don't do the check for
4708         gimplify_omp_ctxp here.
4709         (gimplify_decl_expr): Do it here.
4710         (gimplify_target_expr): Likewise.
4712 2018-03-28  Martin Liska  <mliska@suse.cz>
4714         PR target/84988
4715         * config/i386/i386.c (ix86_function_arg_advance): Do not call
4716         chkp_type_bounds_count if MPX is not enabled.
4718 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4720         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4722 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4724         PR target/84914
4725         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4726         function to create the function decl for complex long double
4727         multiply and divide for -mabi=ieeelongdouble.
4728         (init_float128_ieee): Call it.
4730 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
4732         PR target/85044
4733         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4734         -fcf-protection=branch -mibt.
4735         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4737 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4739         PR target/81863
4740         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4742 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
4744         PR target/85056
4745         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4746         extern array declarations.
4748 2018-03-27  Richard Biener  <rguenther@suse.de>
4750         PR middle-end/84067
4751         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4752         explicit single_use checks.
4754 2018-03-27  Richard Biener  <rguenther@suse.de>
4756         PR tree-optimization/85082
4757         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4758         Valueize the VUSE.
4760 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4762         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4763         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4764         Turn on fasynchronous-unwind-tables and funwind-tables.
4766 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
4768         PR target/85073
4769         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4770         (*bmi_blsr_<mode>_ccz): Ditto.
4772 2018-03-26  Tom de Vries  <tom@codesourcery.com>
4774         PR tree-optimization/85063
4775         * omp-general.c (offloading_function_p): New function.  Factor out
4776         of ...
4777         * omp-offload.c (pass_omp_target_link::gate): ... here.
4778         * omp-general.h (offloading_function_p): Declare.
4779         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4780         with attribute omp declare target for offloading functions.
4782 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
4784         PR tree-optimization/84005
4785         * tree-data-ref.h (get_base_for_alignment): Declare.
4786         * tree-data-ref.c (get_base_for_alignment_1): New function.
4787         (get_base_for_alignment): Likewise.
4788         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
4789         get_base_for_alignment to find a suitable base object, instead
4790         of always using drb->base_address.
4792 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
4794         PR inline-asm/85022
4795         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
4796         known size by default.
4798 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
4800         PR inline-asm/85030
4801         * lra-constraints.c (process_alt_operands): Don't match BLKmode
4802         and non BLKmode operands.
4804 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4806         PR target/85026
4807         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
4808         Clean up attributes.
4810 2018-03-23  Richard Biener  <rguenther@suse.de>
4812         PR debug/85020
4813         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
4814         we are going to emit early debug for LTO.
4816 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
4818         PR inline-asm/85034
4819         * function.c (match_asm_constraints_1): Don't optimize if input
4820         doesn't satisfy general_operand predicate for output's mode.
4822         PR inline-asm/85022
4823         * alias.c (write_dependence_p): Don't require for x_canonicalized
4824         non-VOIDmode if x has VOIDmode.
4826         PR sanitizer/85029
4827         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
4828         just don't try to optimize it rather than assert it never happens.
4830 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4832         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
4833         macro expansions for definition of ST_INTERNAL_<mode> and
4834         LD_INTERNAL_<mode> builtins.
4835         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
4836         Remove prototype.
4837         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
4838         function.
4839         (altivec_expand_st_builtin): Likewise.
4840         (altivec_expand_builtin): Remove calls to deleted functions.
4841         (rs6000_address_for_altivec): Delete this function.
4842         * config/rs6000/vector.md: Remove expands for
4843         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
4845 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
4847         PR target/84826
4848         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
4849         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
4850         re-computing once computed.
4851         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
4852         (arm_init_machine_status): Initialize
4853         machine->static_chain_stack_bytes.
4855 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4857         PR target/84760
4858         * doc/extend.texi: Add four new prototypes for vec_ld.
4859         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
4860         definitions for more logical presentation.
4861         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
4862         entries for V1TI variants of __builtin_altivec_ld builtin.
4863         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
4864         handling of V1TI variant of LVX icode pattern.
4865         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
4866         (rs6000_gimple_fold_builtin): Likewise.
4867         (altivec_init_builtins): Add code to define
4868         __builtin_altivec_lvx_v1ti function.
4870 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
4872         PR inline-asm/84941
4873         * function.c (match_asm_constraints_1): Don't do the optimization
4874         if input isn't a REG, SUBREG, MEM or constant.
4876 2018-03-22  Tom de Vries  <tom@codesourcery.com>
4878         PR tree-optimization/84956
4879         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
4880         bb_has_abnormal_pred.
4882 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
4884         PR sanitizer/85018
4885         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
4886         DECL_INITIAL (decl) to decl at the end.
4887         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
4888         adjust the comment.
4890 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
4892         * doc/extend.texi (__builtin_tgmath): Document when complex
4893         integer types are treated as _Complex _Float64.
4895 2018-03-21  Tom de Vries  <tom@codesourcery.com>
4897         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
4899 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4901         PR tree-optimization/84960
4902         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
4903         if it is ENTRY block, move them into single succ of ENTRY in that case.
4905 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
4907         PR tree-optimization/84811
4908         * poly-int.h (poly_span_traits): Remove the T3 parameter and
4909         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
4910         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
4911         (known_subrange_p): Update accordingly.  Cast each value involved
4912         in the size comparison, rather than casting the result of the
4913         subtraction.
4915 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4917         PR tree-optimization/84982
4918         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
4919         by flipping the least significant bit rather than all bits from
4920         bitpos to bitpos + bitsize - 1.
4922 2018-03-21  Nathan Sidwell  <nathan@acm.org>
4924         * doc/extend.texi (Deprecated Features): Remove mention of
4925         long-deleted deprecations.
4927 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4929         PR jit/84288
4930         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
4931         * configure: Regenerate.
4933 2018-03-21  Tom de Vries  <tom@codesourcery.com>
4935         PR tree-optimization/83126
4936         * tree-parloops.c (num_phis): New function.
4937         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
4939 2018-03-21  Nathan Sidwell  <nathan@acm.org>
4941         * doc/extend.texi (Deprecated Features): Update deprecated flags,
4942         mention anon-struct/union members and trailing attributes.
4944 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
4946         PR tree-optimization/84969
4947         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
4948         builtin memset partitions if they set different rhs values.
4950 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4952         PR rtl-optimization/84989
4953         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
4954         VEC_DUPLICATE with scalar result mode.
4956 2018-03-21  Martin Liska  <mliska@suse.cz>
4958         PR ipa/84963
4959         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
4960         not intended return statement.
4962 2018-03-21  Martin Liska  <mliska@suse.cz>
4964         PR target/84988
4965         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
4966         (chkp_find_bound_slots_1): Limit number of iterations.
4968 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
4970         PR target/84838
4971         * Minor grammar fixes for x86 options.
4973 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
4975         PR debug/84875
4976         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
4977         holding REG_CFA_RESTORE notes, instead turn them into a USE.
4979 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
4981         PR target/83789
4982         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
4983         (altivec_lvx_<mode>_1op): Likewise.
4984         (altivec_stvx_<mode>_2op): Likewise.
4985         (altivec_stvx_<mode>_1op): Likewise.
4986         (altivec_lvx_<VM2:mode>): New define_expand.
4987         (altivec_stvx_<VM2:mode>): Likewise.
4988         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
4989         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4990         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
4991         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4992         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
4993         (rs6000_gen_lvx): Likewise.
4994         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
4995         (altivec_expand_stv_builtin): Likewise.
4996         (altivec_expand_builtin): Likewise.
4997         * config/rs6000/vector.md: Likewise.
4999 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5001         PR target/82518
5002         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5003         BYTES_BIG_ENDIAN.
5005 2018-03-20  Richard Biener  <rguenther@suse.de>
5007         PR target/84986
5008         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5009         sign-conversions as zero, fall back to standard scalar_stmt
5010         cost for the rest.
5012 2018-03-20  Martin Liska  <mliska@suse.cz>
5014         PR ipa/84825
5015         * predict.c (rebuild_frequencies): Handle case when we have
5016         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5018 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5020         PR target/84990
5021         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5022         flag_section_anchors.
5023         * varasm.c (use_blocks_for_decl_p): Remove hack for
5024         dw2_force_const_mem.
5026         PR target/84845
5027         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5028         to ...
5029         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5030         be created, use lowpart_subreg of operands[0] rather than operands[0]
5031         itself.
5032         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5033         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5034         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5035         and n constraint instead of aarch64_shift_imm_di and Usd.
5036         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5037         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5039 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5041         PR target/82989
5042         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5043         to favor GPR over NEON registers.
5044         (<shift>di3_neon): Likewise.
5046 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5048         PR target/84952
5049         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5050         (nvptx_process_pars): Emit bar.sync asap and alap.
5052 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5054         PR target/84954
5055         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5056         seen_label if seen_label is already set.
5058 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5060         PR target/84945
5061         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5062         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5063         Use 1U instead of 1.  Formatting fixes.
5065         PR c/84953
5066         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5067         instead of TREE_TYPE (s1) for the return value.
5069 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5071         PR tree-optimization/84946
5072         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5073         bitsize + bitsize in poly_uint64 rather than poly_int64.
5075         PR sanitizer/78651
5076         * dwarf2asm.c: Include fold-const.c.
5077         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5078         of decl rather than decl itself.
5080         PR rtl-optimization/84643
5081         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5083 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5085         PR sanitizer/78651
5086         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5087         calling assemble_variable.
5089 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5091         PR target/81647
5092         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5093         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5095 2018-03-19  Jim Wilson  <jimw@sifive.com>
5097         PR bootstrap/84856
5098         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5099         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5100         (riscv_first_stack_step): Likewise.
5101         (riscv_option_override): Use STACK_BOUNDARY instead of
5102         MIN_STACK_BOUNDARY.
5103         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5104         MIN_STACK_BOUNDARY.
5105         (BIGGEST_ALIGNMENT): Set to 128.
5106         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5107         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5108         STACK_BOUNDARY.
5110 2018-03-19  Richard Biener  <rguenther@suse.de>
5112         PR tree-optimization/84933
5113         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5114         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5116 2018-03-19  Richard Biener  <rguenther@suse.de>
5118         PR tree-optimization/84859
5119         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5120         (cond_if_else_store_replacement): Perform sinking operation on
5121         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5122         Generalize what a BB with a single eligible store is.
5124 2018-03-19  Richard Biener  <rguenther@suse.de>
5126         PR tree-optimization/84929
5127         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5128         chrec_is_positive against non-chrec arg.
5130 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5132         PR target/84711
5133         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5135 2018-03-18  Martin Liska  <mliska@suse.cz>
5137         PR rtl-optimization/84635
5138         * regrename.c (build_def_use): Use matches_mode only when
5139         matches >= 0.
5141 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5143         PR tree-optimization/84913
5144         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5145         vectorize chains of COND_EXPRs.
5147 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5149         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5151 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5153         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5155 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5157         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5159 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5160             Kito Cheng  <kito.cheng@gmail.com>
5162         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5163         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5164         (nds32_adjust_reg_alloc_order): New function.
5165         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5167 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5169         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5170         nds32_print_operand, nds32_print_operand_address): Use
5171         HOST_WIDE_INT_PRINT_DEC instead.
5173 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5175         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5177 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5179         PR target/84902
5180         * config/i386/i386.c (initial_ix86_tune_features,
5181         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5182         unsigned long long.
5183         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5184         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5185         rather than 1u << ix86_tune.  Formatting fix.
5186         (ix86_option_override_internal): Change ix86_arch_mask from
5187         unsigned int to unsigned HOST_WIDE_INT, initialize to
5188         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5189         (ix86_function_specific_restore): Likewise.
5191 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5193         PR target/84899
5194         * postreload.c (reload_combine_recognize_pattern): Perform
5195         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5196         truncate_int_for_mode the result for the destination's mode.
5198         PR c/84909
5199         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5200         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5201         Likewise.
5202         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5203         Likewise.
5205 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5207         PR target/84876
5208         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5209         regno_allocno_class_array and sorted_pseudos.
5210         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5211         insns where regno is used.
5213 2018-03-16  Martin Liska  <mliska@suse.cz>
5215         PR ipa/84833
5216         * multiple_target.c (create_dispatcher_calls): Redirect
5217         reference in the symbol table.
5219 2018-03-16  Martin Liska  <mliska@suse.cz>
5221         PR ipa/84722
5222         * multiple_target.c (create_dispatcher_calls): Redirect also
5223         an alias.
5225 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5227         PR c++/79937
5228         PR c++/82410
5229         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5230         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5231         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5233 2018-03-16  Julia Koval  <julia.koval@intel.com>
5235         * doc/invoke.texi (Skylake Server): Add CLWB.
5236         Cannonlake): Remove CLWB.
5238 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5240         PR tree-optimization/84841
5241         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5242         1 << 3.
5243         (FLOAT_ONE_CONST_TYPE): Define.
5244         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5245         (sort_by_operand_rank): Put entries with higher constant_type last
5246         rather than first to match comments.
5248 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5250         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5251         split predicate.
5253 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5255         PR c++/79085
5256         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5257         check and use address of target always.
5259 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5261         PR target/84574
5262         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5263         (indirect_thunk_bnd_needed): Likewise.
5264         (indirect_thunks_used): Likewise.
5265         (indirect_thunks_bnd_used): Likewise.
5266         (indirect_return_needed): New.
5267         (indirect_return_bnd_needed): Likewise.
5268         (output_indirect_thunk_function): Add a bool argument for
5269         function return.
5270         (output_indirect_thunk_function): Don't generate alias for
5271         function return thunk.
5272         (ix86_code_end): Call output_indirect_thunk_function to generate
5273         function return thunks.
5274         (ix86_output_function_return): Set indirect_return_bnd_needed
5275         and indirect_return_needed instead of indirect_thunk_bnd_needed
5276         and indirect_thunk_needed.
5278 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5280         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5281         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5282         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5284 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5285             Paul Hua <paul.hua.gm@gmail.com>
5287         PR c/84852
5288         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5290 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5292         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5293         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5294         resp. SFmode cases.
5296 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5298         PR target/84711
5299         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5300         instead of GET_MODE_SIZE when comparing Units.
5302 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5304         PR target/68256
5305         * varasm.c (hash_section): Return an unchangeble hash value
5306         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5307         Return !aarch64_can_use_per_function_literal_pools_p ().
5309 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5311         PR target/84860
5312         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5313         rather than address of cmode as last argument to prepare_cmp_insn.
5315 2018-03-15  Julia Koval  <julia.koval@intel.com>
5317         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5318         F_AVX512VNNI, F_AVX512BITALG): New.
5320 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5322         PR target/83451
5323         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5324         insn for floating-point loads and stores.
5326 2018-03-14  Carl Love  <cel@us.ibm.com>
5328         * config/rs6000/rs6000-c.c: Add macro definitions for
5329         ALTIVEC_BUILTIN_VEC_PERMXOR.
5330         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5331         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5332         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5333         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5334         UNSPEC_VPERMXOR.
5335         * config/doc/extend.texi: Add prototypes for vec_permxor.
5337 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5339         PR c/84852
5340         * diagnostic-show-locus.c (class layout_point): Convert m_line
5341         from int to linenum_type.
5342         (line_span::comparator): Use linenum "compare" function when
5343         comparing line numbers.
5344         (test_line_span): New function.
5345         (layout_range::contains_point): Convert param "row" from int to
5346         linenum_type.
5347         (layout_range::intersects_line_p): Likewise.
5348         (layout::will_show_line_p): Likewise.
5349         (layout::print_source_line): Likewise.
5350         (layout::should_print_annotation_line_p): Likewise.
5351         (layout::print_annotation_line): Likewise.
5352         (layout::print_leading_fixits): Likewise.
5353         (layout::annotation_line_showed_range_p): Likewise.
5354         (struct line_corrections): Likewise for field m_row.
5355         (line_corrections::line_corrections): Likewise for param "row".
5356         (layout::print_trailing_fixits): Likewise.
5357         (layout::get_state_at_point): Likewise.
5358         (layout::get_x_bound_for_row): Likewise.
5359         (layout::print_line): Likewise.
5360         (diagnostic_show_locus): Likewise for locals "last_line" and
5361         "row".
5362         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5363         * input.c (selftest::test_linenum_comparisons): New function.
5364         (selftest::input_c_tests): Call it.
5365         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5366         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5367         * selftest.h (ASSERT_GT): New macro.
5368         (ASSERT_GT_AT): New macro.
5369         (ASSERT_LT): New macro.
5370         (ASSERT_LT_AT): New macro.
5372 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5374         PR rtl-optimization/84780
5375         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5377 2018-03-14  Martin Liska  <mliska@suse.cz>
5379         * tree.c (record_node_allocation_statistics): Use
5380         get_stats_node_kind.
5381         (get_stats_node_kind): New function extracted from
5382         record_node_allocation_statistics.
5383         (free_node): Use get_stats_node_kind.
5385 2018-03-14  Richard Biener  <rguenther@suse.de>
5387         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5388         that the value-set of ANTIC_IN doesn't grow.
5390         Revert
5391         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5392         member.
5393         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5394         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5396 2018-03-14  Julia Koval  <julia.koval@intel.com>
5398         * config.gcc (icelake-client, icelake-server): New.
5399         (icelake): Remove.
5400         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5401         (initial_ix86_arch_features): Ditto.
5402         (PTA_SKYLAKE): Add SGX.
5403         (PTA_ICELAKE): Remove.
5404         (PTA_ICELAKE_CLIENT): New.
5405         (PTA_ICELAKE_SERVER): New.
5406         (ix86_option_override_internal): Split up icelake on icelake client and
5407         icelake server.
5408         (get_builtin_code_for_version): Ditto.
5409         (fold_builtin_cpu): Ditto.
5410         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5411         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5412         * config/i386/i386.h (processor_type): Ditto.
5413         * doc/invoke.texi: Ditto.
5415 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5417         PR sanitizer/83392
5418         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5419         INTEGER_CST offset, add it together with bitpos / 8 and
5420         sign extend based on POINTER_SIZE.
5422         PR target/84844
5423         Revert
5424         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5426         PR target/78090
5427         * config/i386/constraints.md (Yc): New register constraint.
5428         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5429         Use Yc constraint for alternative 2 of operand 0.  Remove
5430         preferred_for_speed attribute.
5432 2018-03-14  Richard Biener  <rguenther@suse.de>
5434         PR tree-optimization/84830
5435         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5436         with the old one to avoid oscillations.
5438 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5440         PR target/83712
5441         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5442         pseudos.
5443         (assign_by_spills): Return a flag of reload assignment failure.
5444         Do not process the reload assignment failures.  Do not spill other
5445         reload pseudos if they has the same reg class.  Update n if
5446         necessary.
5447         (lra_assign): Add a return arg.  Set up from the result of
5448         assign_by_spills call.
5449         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5450         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5451         usage_insns if it is not NULL.
5452         (spill_hard_reg_in_range): New function.
5453         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5454         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5455         function prototypes.
5456         (lra_assign): Change prototype.
5457         * lra.c (lra): Add code to deal with fails by splitting hard reg
5458         live ranges.
5460 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5462         * config/riscv/riscv.opt (mrelax): New option.
5463         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5464         "norelax" when riscv_mrelax is disabled.
5465         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5467 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5469         PR target/84743
5470         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5471         reassociation for int modes.
5473 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5475         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5476         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5477         for big-endian.
5478         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5479         * config/aarch64/aarch64-sve.md
5480         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5481         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5482         (*extend<mode><Vwide>2): Rename to...
5483         (aarch64_sve_extend<mode><Vwide>2): ...this.
5484         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5485         renaming the old pattern to...
5486         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5487         unsigned packs.
5488         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5489         define_expand, renaming the old pattern to...
5490         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5491         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5492         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5493         account when deciding which SVE instruction the optab should use.
5494         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5496 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5498         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5499         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5500         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5501         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5502         (tlsdesc_small_<mode>): Turn a define_expand and use
5503         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5504         (tlsdesc_small_advsimd_<mode>): ...this.
5505         (tlsdesc_small_sve_<mode>): New pattern.
5507 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5509         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5510         (UNSPEC_UMUL_HIGHPART): New constants.
5511         (MUL_HIGHPART): New int iteraor.
5512         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5513         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5514         define_expand.
5515         (*<su>mul<mode>3_highpart): New define_insn.
5517 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5519         PR lto/84805
5520         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5521         incomplete types.
5523 2018-03-13  Martin Liska  <mliska@suse.cz>
5525         PR ipa/84658.
5526         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5527         vector.
5528         (sem_item_optimizer::~sem_item_optimizer): Release it.
5529         (sem_item_optimizer::merge_classes): Register variable aliases.
5530         (sem_item_optimizer::fixup_pt_set): New function.
5531         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5532         * ipa-icf.h: Declare new variables and functions.
5534 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5536         PR middle-end/84834
5537         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5538         integer_pow2p@2 and test integer_pow2p in condition.
5539         (A < 0 ? C : 0): Similarly for @1.
5541         PR middle-end/84831
5542         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5543         characters starting at p contain '\0' character, don't look beyond
5544         that.
5546         PR target/84827
5547         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5548         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
5550         PR target/84828
5551         * reg-stack.c (change_stack): Change update_end var from int to
5552         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
5553         also call set_block_for_insn on the newly added insns and rescan.
5555         PR target/84786
5556         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
5557         on the last operand.
5559         PR c++/84704
5560         * tree.c (stabilize_reference_1): Return save_expr (e) for
5561         STATEMENT_LIST even if it doesn't have side-effects.
5563 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
5565         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
5567 2018-03-12  Renlin Li  <renlin.li@arm.com>
5569         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
5570         aarch64_output_scalar_simd_mov_immediate.
5572 2018-03-12  Martin Sebor  <msebor@redhat.com>
5574         PR tree-optimization/83456
5575         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
5576         for perfectly overlapping calls to memcpy.
5577         (gimple_fold_builtin_memory_chk): Same.
5578         (gimple_fold_builtin_strcpy): Handle no-warning.
5579         (gimple_fold_builtin_stxcpy_chk): Same.
5580         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
5582 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5584         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
5585         parameter.  Use it for SFmode.
5586         (rs6000_function_arg_advance_1): Adjust.
5587         (rs6000_function_arg): Adjust.
5588         (rs6000_gimplify_va_arg): Pass false for that new parameter.
5590 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5592         PR rtl-optimization/84169
5593         PR rtl-optimization/84780
5594         * combine.c (can_combine_p): Check for a 2-insn combination whether
5595         the destination register is used between the two insns, too.
5597 2018-03-12  Richard Biener  <rguenther@suse.de>
5599         PR tree-optimization/84803
5600         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5601         for refs DR analysis didn't process.
5603 2018-03-12  Richard Biener  <rguenther@suse.de>
5605         PR tree-optimization/84777
5606         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5607         force-vectorize loops ignore whether we are optimizing for size.
5609 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5611         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5612         (TARGET_MD_ASM_ADJUST): Define.
5614 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
5615             Kito Cheng  <kito.cheng@gmail.com>
5616             Chung-Ju Wu  <jasonwucj@gmail.com>
5618         * config/nds32/nds32.c (nds32_compute_stack_frame,
5619         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5620         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5621         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5622         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5623         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5624         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5625         * config/nds32/nds32.md (prologue, epilogue): Use macro
5626         NDS32_V3PUSH_AVAILABLE_P to do checking.
5628 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
5630         PR debug/58150
5631         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5632         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5633         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
5634         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
5635         addition of most attributes on !orig_type_die or the attribute not
5636         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5638 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5639             Chung-Ju Wu  <jasonwucj@gmail.com>
5641         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5642         __NDS32_VH__ macro.
5643         * config/nds32/nds32.opt (mvh): New option.
5645 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5646             Chung-Ju Wu  <jasonwucj@gmail.com>
5648         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5649         function.
5650         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5651         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5652         definition.
5654 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5655             Chung-Ju Wu  <jasonwucj@gmail.com>
5657         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5658         function.
5659         * config/nds32/nds32-multiple.md (strlensi): New pattern.
5660         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5662 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
5663             Kito Cheng  <kito.cheng@gmail.com>
5664             Chung-Ju Wu  <jasonwucj@gmail.com>
5666         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5667         UNSPEC_FFMISM and UNSPEC_FLMISM.
5668         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5669         for ffb, ffmism and flmism.
5670         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5671         (unspec_ffmism): Ditto.
5672         (unspec_flmism): Ditto.
5673         (nds32_expand_builtin_impl): Check if string extension is available.
5674         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5675         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5677 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
5679         Reverting patch:
5680         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5682         PR target/83712
5683         * lra-assigns.c (assign_by_spills): Return a flag of reload
5684         assignment failure.  Do not process the reload assignment
5685         failures.  Do not spill other reload pseudos if they has the same
5686         reg class.
5687         (lra_assign): Add a return arg.  Set up from the result of
5688         assign_by_spills call.
5689         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5690         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5691         usage_insns if it is not NULL.
5692         (spill_hard_reg_in_range): New function.
5693         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5694         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5695         function prototypes.
5696         (lra_assign): Change prototype.
5697         * lra.c (lra): Add code to deal with fails by splitting hard reg
5698         live ranges.
5700 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
5702         PR target/84807
5703         * config/i386/i386.opt: Replace Enforcment with Enforcement.
5705 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
5707         PR debug/84620
5708         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5709         (dw_val_node): Add val_symbolic_view.
5710         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5711         (symview_upper_bound): New.
5712         (new_line_info_table): Initialize symviews_since_reset.
5713         (dwarf2out_source_line): Count symviews_since_reset and set
5714         symview_upper_bound.
5715         (dw_val_equal_p): Handle symview.
5716         (add_AT_symview): New.
5717         (print_dw_val): Handle symview.
5718         (attr_checksum, attr_checksum_ordered): Likewise.
5719         (same_dw_val_p, size_of_die): Likewise.
5720         (value_format, output_die): Likewise.
5721         (add_high_low_attributes): Use add_AT_symview for entry_view.
5722         (dwarf2out_finish): Reset symview_upper_bound, clear
5723         zero_view_p.
5725 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
5727         PR target/83969
5728         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5729         Add strict argument and use it.
5730         (rs6000_split_multireg_move): Update for new strict argument.
5731         (mem_operand_gpr): Disallow all non-offsettable addresses.
5732         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5734 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
5736         PR target/84772
5737         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5738         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5739         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5741         PR c++/84767
5742         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5743         decl, use remap_type if we want to use the type.
5745 2018-03-09  Martin Sebor  <msebor@redhat.com>
5747         PR tree-optimization/84526
5748         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5749         Remove dead code.
5750         (builtin_access::generic_overlap): Be prepared to handle non-array
5751         base objects.
5753 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
5755         PR rtl-optimization/84682
5756         * lra-constraints.c (process_address_1): Check is_address flag
5757         for address constraints.
5758         (process_alt_operands): Likewise.
5759         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5760         preprocess_constraints.
5761         * recog.h (preprocess_constraints): Add oploc parameter.
5762         Adjust callers.
5763         * recog.c (preprocess_constraints): Test address_operand for
5764         CT_ADDRESS constraints.
5766 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5768         PR target/83712
5769         * lra-assigns.c (assign_by_spills): Return a flag of reload
5770         assignment failure.  Do not process the reload assignment
5771         failures.  Do not spill other reload pseudos if they has the same
5772         reg class.
5773         (lra_assign): Add a return arg.  Set up from the result of
5774         assign_by_spills call.
5775         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5776         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5777         usage_insns if it is not NULL.
5778         (spill_hard_reg_in_range): New function.
5779         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5780         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5781         function prototypes.
5782         (lra_assign): Change prototype.
5783         * lra.c (lra): Add code to deal with fails by splitting hard reg
5784         live ranges.
5786 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5788         PR target/83193
5789         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
5790         Accept complain bool parameter.  Only emit errors if it is true.
5791         (arm_parse_cpu_option_name): Likewise.
5792         (arm_target_thumb_only): Adjust callers of the above.
5793         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
5794         prototype to take a default true bool parameter.
5795         (arm_parse_arch_option_name): Likewise.
5797 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
5798             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
5800         PR jit/64089
5801         PR jit/84288
5802         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
5803         * configure: Regenerate.
5804         * configure.ac ("linker --version-script option"): New.
5805         ("linker soname option"): New.
5807 2018-03-09  Richard Biener  <rguenther@suse.de>
5809         PR tree-optimization/84775
5810         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
5811         immediate uses of predicate stmts and mark them modified.
5813         Revert
5814         PR tree-optimization/84178
5815         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5816         to caller.
5817         (version_loop_for_if_conversion): Delay update_ssa call.
5818         (tree_if_conversion): Delay update_ssa until after predicate
5819         insertion.
5821 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
5823         PR target/84763
5824         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
5825         when the function accesses prior frames.
5827 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
5829         PR debug/84456
5830         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
5831         gen_llsym, otherwise call maybe_gen_llsym.
5833         PR inline-asm/84742
5834         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
5835         has ',' character inside of it.
5837 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5839         PR target/84748
5840         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
5841         as clobbering CC_REGNUM.
5843 2018-03-08  Richard Biener  <rguenther@suse.de>
5845         PR middle-end/84552
5846         * tree-scalar-evolution.c: Include tree-into-ssa.h.
5847         (follow_copies_to_constant): Do not follow SSA names registered
5848         for update.
5850 2018-03-08  Richard Biener  <rguenther@suse.de>
5852         PR tree-optimization/84178
5853         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5854         to caller.
5855         (version_loop_for_if_conversion): Delay update_ssa call.
5856         (tree_if_conversion): Delay update_ssa until after predicate
5857         insertion.
5859 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
5861         PR tree-optimization/84178
5862         * tree-if-conv.c (release_bb_predicate): Remove the
5863         the assertion that the stmts have NULL use_ops.
5864         Discard the statements, asserting that they haven't
5865         yet been added to a BB.
5867 2018-03-08  Richard Biener  <rguenther@suse.de>
5869         PR tree-optimization/84746
5870         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
5871         (phi_translate): Pass in destination ANTIC_OUT set.
5872         (phi_translate_1): Likewise.  For a simplified result lookup
5873         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
5874         (phi_translate_set): Adjust.
5875         (do_pre_regular_insertion): Likewise.
5876         (do_pre_partial_partial_insertion): Likewise.
5878 2018-03-08  Martin Liska  <mliska@suse.cz>
5880         PR gcov-profile/84735
5881         * doc/gcov.texi: Document usage of profile files.
5882         * gcov-io.h: Document changes in the format.
5884 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
5886         PR debug/84404
5887         PR debug/84408
5888         * dwarf2out.c (struct dw_line_info_table): Update comments for
5889         view == -1.
5890         (FORCE_RESET_NEXT_VIEW): New.
5891         (FORCE_RESETTING_VIEW_P): New.
5892         (RESETTING_VIEW_P): Check for -1 too.
5893         (ZERO_VIEW_P): Likewise.
5894         (new_line_info_table): Force-reset next view.
5895         (dwarf2out_begin_function): Likewise.
5896         (dwarf2out_source_line): Simplify zero_view_p initialization.
5897         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
5898         view directly.  Omit view when omitting .loc at line 0.
5900 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
5902         PR tree-optimization/84740
5903         * tree-switch-conversion.c (process_switch): Call build_constructors
5904         only if info.phi_count is non-zero.
5906         PR tree-optimization/84739
5907         * tree-tailcall.c (find_tail_calls): Check call arguments against
5908         DECL_ARGUMENTS (current_function_decl) rather than
5909         DECL_ARGUMENTS (func) when checking for tail recursion.
5911 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
5913         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
5914         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
5915         Volker Reichelt's entry and add entries for people that perform
5916         GCC fuzzy testing and report numerous bugs.
5918 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
5920         PR target/82411
5921         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
5922         readonly data in sdata, if that is disabled.
5923         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
5924         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
5925         -mreadonly-in-sdata option.
5927 2018-03-07  Martin Sebor  <msebor@redhat.com>
5929         PR tree-optimization/84468
5930         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
5931         basic block when looking for nul assignment.
5933 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
5935         PR target/84277
5936         * except.h (output_function_exception_table): Adjust prototype.
5937         * except.c (output_function_exception_table): Remove FNNAME parameter
5938         and add SECTION parameter.  Ouput one part of the table at a time.
5939         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
5940         the first part of the exception table and emit unwind directives.
5941         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
5942         (i386_pe_seh_cold_init): Likewise.
5943         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
5944         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
5945         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
5946         (ix86_output_call_insn): Emit a nop in one more case for SEH.
5947         * config/i386/winnt.c: Include except.h.
5948         (struct seh_frame_state): Add reg_offset, after_prologue and
5949         in_cold_section fields.
5950         (i386_pe_seh_end_prologue): Set seh->after_prologue.
5951         (i386_pe_seh_cold_init): New function.
5952         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
5953         to seh->in_cold_section.
5954         (seh_emit_push): Record the offset of the push.
5955         (seh_emit_save): Record the offet of the save.
5956         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
5957         Test seh->after_prologue to disregard the epilogue.
5958         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
5959         (i386_pe_end_cold_function): New function.
5961 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
5963         PR fortran/84565
5964         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
5965         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
5967         PR c++/84704
5968         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
5969         on tmp_var.
5970         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
5971         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
5973         PR middle-end/84723
5974         * multiple_target.c: Include tree-inline.h and intl.h.
5975         (expand_target_clones): Diagnose and fail if node->definition and
5976         !tree_versionable_function_p (node->decl).
5978 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
5980         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
5981         sprint_ul.
5982         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
5983         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
5984         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
5986 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
5988         PR target/84710
5989         * combine.c (try_combine): Use reg_or_subregno instead of handling
5990         just paradoxical SUBREGs and REGs.
5992 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
5994          * config/arc/arc.c (arc_finalize_pic): Remove function.
5995          (arc_must_save_register): We use single base PIC register, remove
5996          checks to save/restore the PIC register.
5997          (arc_expand_prologue): Likewise.
5998          * config/arc/arc-protos.h (arc_set_default_type_attributes):
5999          Remove.
6000          (arc_verify_short): Likewise.
6001          (arc_attr_type): Likewise.
6002          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6003          (walk_stores): Likewise.
6004          (arc_address_cost): Make it static.
6005          (arc_verify_short): Likewise.
6006          (branch_dest): Likewise.
6007          (arc_attr_type): Likewise.
6008          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6009          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6010          (arc_final_prescan_insn): Remove inserting the nops due to
6011          hardware hazards.  It is done in reorg step.
6012          (insn_length_variant_t): Remove.
6013          (insn_length_parameters_t): Likewise.
6014          (arc_insn_length_parameters): Likewise.
6015          (arc_get_insn_variants): Likewise.
6016          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6018 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6020         PR inline-asm/84683
6021         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6022         assertion failure.
6024         PR tree-optimization/84687
6025         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6026         on new_node->decl.
6027         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6029 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6031         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6032         Rename to ppc_speculation_barrier.
6033         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6034         __builtin_ppc_speculation_barrier.
6036 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6038         PR target/84700
6039         * combine.c (combine_simplify_rtx): Don't try to simplify if
6040         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6041         are equal to x.
6043 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6045         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6046         to 32 bytes when compiling for POWER9.
6048 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6050         PR target/84564
6051         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6052         regparm >= 3 with no arg reg available also for calls with
6053         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6055         PR target/84524
6056         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6057         orig,vex.
6058         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6060 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6062         PR target/84264
6063         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6065 2018-03-05  Richard Biener  <rguenther@suse.de>
6067         PR tree-optimization/84486
6068         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6069         When inserting a __builtin_assume_aligned call set the LHS
6070         SSA name alignment info accordingly.
6072 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6074         PR tree-optimization/84114
6075         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6076         Avoid reassociation of FLOAT_MODE addition.
6078 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6080         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6081         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6082         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6083         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6084         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6085         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6086         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6087         and -mwbnoinvd.
6088         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6089         __builtin_ia32_wbinvd): New builtins.
6090         (SPECIAL_ARGS2): New.
6091         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6092         (SPECIAL_ARGS2): New.
6093         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6094         (ix86_valid_target_attribute_inner_p): Ditto.
6095         (ix86_init_mmx_sse_builtins): Add special_args2.
6096         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6097         TARGET_WBNOINVD_P): New.
6098         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6099         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6100         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6101         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6102         * config/i386/pconfigintrin.h: New file.
6103         * config/i386/wbnoinvdintrin.h: Ditto.
6104         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6105         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6107 2018-03-05  Richard Biener  <rguenther@suse.de>
6109         PR tree-optimization/84670
6110         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6111         member.
6112         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6113         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6114         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6115         doesn't grow if all successors (recursively) were visited at least
6116         once.
6118 2018-03-05  Richard Biener  <rguenther@suse.de>
6120         PR tree-optimization/84650
6121         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6122         if executed in the loop pipeline.
6124 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6126         * doc/configfiles.texi (Configuration Files): Move info about
6127         conditionalizing $target-protos.h to...
6128         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6129         differs from $target-protos.h.
6131 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6132             Chung-Ju Wu  <jasonwucj@gmail.com>
6134         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6135         * config/nds32/nds32-multiple.md (setmemsi): Define.
6136         * config/nds32/nds32-memory-manipulation.c
6137         (nds32_gen_dup_4_byte_to_word_value): New.
6138         (emit_setmem_word_loop): New.
6139         (emit_setmem_byte_loop): New.
6140         (nds32_expand_setmem_loop): New.
6141         (nds32_expand_setmem_loop_v3m): New.
6142         (nds32_expand_setmem_unroll): New.
6143         (nds32_expand_setmem): New.
6145 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6146             Chung-Ju Wu  <jasonwucj@gmail.com>
6148         * config/nds32/nds32-memory-manipulation.c
6149         (nds32_emit_load_store): New.
6150         (nds32_emit_post_inc_load_store): New.
6151         (nds32_emit_mem_move): New.
6152         (nds32_emit_mem_move_block): New.
6153         (nds32_expand_movmemsi_loop_unknown_size): New.
6154         (nds32_expand_movmemsi_loop_known_size): New.
6155         (nds32_expand_movmemsi_loop): New.
6156         (nds32_expand_movmemsi_unroll): New.
6157         (nds32_expand_movmemqi): Rename ...
6158         (nds32_expand_movmemsi): ... to this.
6159         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6160         (movmemsi): ... to this.
6161         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6162         (nds32_expand_movmemsi): ... to this.
6164 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6165             Monk Chiang  <sh.chiang04@gmail.com>
6166             Chung-Ju Wu  <jasonwucj@gmail.com>
6168         * config/nds32/nds32-protos.h
6169         (nds32_expand_load_multiple): New arguments.
6170         (nds32_expand_store_multiple): Ditto.
6171         (nds32_valid_multiple_load_store): Rename ...
6172         (nds32_valid_multiple_load_store_p): ... to this.
6173         * config/nds32/nds32-memory-manipulation.c
6174         (nds32_expand_load_multiple): Refine implementation.
6175         (nds32_expand_store_multiple): Ditto.
6176         * config/nds32/nds32-multiple.md
6177         (load_multiple): Update nds32_expand_load_multiple interface.
6178         (store_multiple): Update nds32_expand_store_multiple interface.
6179         * config/nds32/nds32-predicates.c
6180         (nds32_valid_multiple_load_store): Rename ...
6181         (nds32_valid_multiple_load_store_p): ... to this and refine
6182         implementation.
6183         * config/nds32/predicates.md
6184         (nds32_load_multiple_and_update_address_operation): New predicate.
6185         (nds32_store_multiple_and_update_address_operation): New predicate.
6187 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6188             Chung-Ju Wu  <jasonwucj@gmail.com>
6190         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6191         (combo): New attribute.
6192         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6194 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6196         * config/nds32/nds32.opt: Change -mcmodel= default value.
6198 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6199             Monk Chiang  <sh.chiang04@gmail.com>
6200             Chung-Ju Wu  <jasonwucj@gmail.com>
6202         * config/nds32/constants.md (unspec_element): New enum.
6203         * config/nds32/constraints.md (Umw): New constraint.
6204         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6205         * config/nds32/nds32-intrinsic.md: Likewise.
6206         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6207         (nds32_valid_smw_lwm_base_p): New.
6208         (nds32_output_smw_single_word): New.
6209         (nds32_output_lmw_single_word): New.
6210         (nds32_expand_unaligned_load): New.
6211         (nds32_expand_unaligned_store): New.
6212         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6213         (nds32_output_smw_single_word): Declare.
6214         (nds32_output_lmw_single_word): Declare.
6215         (nds32_expand_unaligned_load): Declare.
6216         (nds32_expand_unaligned_store): Declare.
6217         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6218         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6219         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6220         NDS32_BUILTIN_UASTORE_DW.
6221         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6222         predicate.
6224 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6225             Kito Cheng  <kito.cheng@gmail.com>
6226             Chung-Ju Wu  <jasonwucj@gmail.com>
6228         * config/nds32/nds32-intrinsic.c
6229         (nds32_expand_builtin_null_ftype_reg): Delete.
6230         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6231         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6232         (nds32_read_argument): New.
6233         (nds32_legitimize_target): Ditto.
6234         (nds32_legitimize_argument): Ditto.
6235         (nds32_check_constant_argument): Ditto.
6236         (nds32_expand_unop_builtin): Ditto.
6237         (nds32_expand_unopimm_builtin): Ditto.
6238         (nds32_expand_binop_builtin): Ditto.
6239         (nds32_builtin_decl_impl): Ditto.
6240         (builtin_description): Ditto.
6241         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6242         (nds32_init_builtins_impl): Ditto.
6243         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6244         (nds32_builtin_decl): New.
6245         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6246         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6248 2018-03-02  Jeff Law  <law@redhat.com>
6250         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6251         (redundant_insn, fill_simple_delay_slots): Likewise.
6252         (fill_slots_from_thread): Likewise.
6253         * resource.c (mark_referenced_resources): Likewise.
6254         (mark_set_resources, find_dead_or_set_registers): Likewise.
6256 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6258         * substring-locations.h (format_warning_va): Formatting fix for
6259         ATTRIBUTE_GCC_DIAG.
6260         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6261         argument.
6262         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6263         * substring-locations.c: Include intl.h.
6264         (format_warning_va): Turned into small wrapper around
6265         format_warning_n_va, renamed to ...
6266         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6267         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6268         use ngettext.
6269         (format_warning_at_substring_n): New function.
6270         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6271         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6272         format_warning_at_substring with just a shorter name instead of
6273         const function pointer.
6274         (fmtwarn_n): New function.
6275         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6276         appropriate, get rid of all the fmtstr temporaries, move conditionals
6277         with G_() wrapped string literals directly into fmtwarn arguments,
6278         cast dir.len to (int), formatting fixes.
6280 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6282         * doc/invoke.texi: Remove "Cilk Plus" references.
6284 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6285             Richard Biener  <rguenther@suse.de>
6287         PR ipa/84628
6288         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6289         for error or warning attributes if CALL_FROM_THUNK_P is set.
6290         Formatting fixes.
6292 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6294         PR target/56540
6295         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6296         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6298         PR target/56540
6299         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6300         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6302         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6303         instead of -1U in last predictors element's probability member.
6305 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6307         PR ipa/83983
6308         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6309         arguments if they are comparable.
6311 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6313         PR tree-optimization/84634
6314         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6315         masks and masked_loop_p with a single loop_masks, making sure it's
6316         null for bb vectorization.
6318 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6320         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6321         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6322         loop->force_vectorize to check whether there is no alias.
6324 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6326         PR target/84614
6327         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6328         prototypes.
6329         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6330         comments.
6331         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6332         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6333         instead of a loop around prev_real_insn.
6334         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6335         prev_real_insn.
6337         PR inline-asm/84625
6338         * config/i386/i386.c (ix86_print_operand): Use conditional
6339         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6340         zero vector.
6342 2018-03-02  Richard Biener  <rguenther@suse.de>
6344         PR tree-optimization/84427
6345         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6346         (bitmap_set_subtract_values): Rewrite to handle multiple
6347         exprs per value.
6348         (clean): Likewise.
6349         (prune_clobbered_mems): Likewise.
6350         (phi_translate): Take edge instead of pred/phiblock.
6351         (phi_translate_1): Likewise.
6352         (phi_translate_set): Likewise.  Insert all translated
6353         exprs for a value into the set, keeping possibly multiple
6354         expressions per value.
6355         (compute_antic_aux): Adjust for phi_translate changes.
6356         When intersecting union the expressions and prune those
6357         not in the final value set, keeping possibly multiple
6358         expressions per value.  Do not use value-insertion
6359         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6360         all expressions.  Add verification that the value-sets
6361         only shrink during iteration.
6362         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6363         (do_pre_regular_insertion): Likewise.
6364         (do_pre_partial_partial_insertion): Likewise.
6366 2018-03-02  Richard Biener  <rguenther@suse.de>
6368         PR target/82005
6369         * config/darwin.c (saved_debug_info_level): New static global.
6370         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6371         (darwin_asm_lto_end): Restore debug info generation settings.
6373 2018-03-01  Martin Liska  <mliska@suse.cz>
6375         PR sanitizer/82484
6376         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6377         volatile arguments.
6379 2018-03-01  Richard Biener  <rguenther@suse.de>
6381         PR debug/84645
6382         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6383         type annotation with LTO when debug was disabled at compile-time.
6385 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6387         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6388         XINT with INTVAL.
6389         (mips_final_postscan_insn): Likewise.
6391 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6393         PR rtl-optimization/84528
6394         * alias.c (init_alias_target): Add commentary.
6395         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6396         a unique base value if the frame pointer is not eliminated
6397         to the stack pointer.
6399 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6401         PR rtl-optimization/83327
6402         * lra-int.h (hard_regs_spilled_into): Declare.
6403         * lra.c (hard_regs_spilled_into): Define.
6404         (init_reg_info): Init hard_regs_spilled_into.
6405         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6406         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6407         (process_bb_lives): Handle hard_regs_spilled_into.
6408         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6409         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6411 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6413         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6414         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6415         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6416         * config/rs6000/aix72.h: New file.
6418 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6420         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6421         instead of warning_at with conditional singular and plural messages
6422         where possible.
6424         PR target/52991
6425         * stor-layout.c (update_alignment_for_field): For
6426         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6427         && !DECL_PACKED (field), do the alignment update, just use
6428         only desired_align instead of MAX (type_align, desired_align)
6429         as the alignment.
6430         (place_field): Don't do known_align < desired_align handling
6431         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6432         is non-NULL, instead do it after rli->prev_field handling and
6433         only if not within a bitfield word.  For DECL_PACKED (field)
6434         use type_align of BITS_PER_UNIT.
6436 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6438         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6439         superfluous parentheses and trailing spaces.
6441 2018-02-28  Richard Biener  <rguenther@suse.de>
6443         PR tree-optimization/84584
6444         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6445         SCoPs with fake exit edge.
6447 2018-02-28  Martin Liska  <mliska@suse.cz>
6449         PR testsuite/84597
6450         * timevar.c (timer::print): Fix format to properly print 100%
6451         values.
6453 2018-02-28  Richard Biener  <rguenther@suse.de>
6455         PR middle-end/84607
6456         * genmatch.c (capture_info::walk_match): Do not mark
6457         captured expressions without operands as expr_p given
6458         they act more like predicates and should be subject to
6459         "lost tail" side-effect preserving.
6461 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6463         PR rtl-optimization/81611
6464         * auto-inc-dec.c (attempt_change): Move dead note from
6465         mem_insn if it's the next use of regno
6466         (find_address): Take address use of reg holding
6467         non-incremented value.  Add parm to limit search to the named
6468         reg only.
6469         (merge_in_block): Attempt to use a mem insn that is the next
6470         use of the original regno.
6472 2018-02-27  Martin Sebor  <msebor@redhat.com>
6474         PR c++/83871
6475         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6476         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6478 2018-02-27  Martin Sebor  <msebor@redhat.com>
6480         PR translation/84207
6481         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6482         n argument to unsigned HOST_WIDE_INT.
6483         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6484         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6485         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6486         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6488 2018-02-27  Richard Biener  <rguenther@suse.de>
6490         PR tree-optimization/84512
6491         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6492         Do not use the estimate returned from record_stmt_cost for
6493         the scalar iteration cost but sum properly using add_stmt_cost.
6495 2018-02-27  Richard Biener  <rguenther@suse.de>
6497         PR tree-optimization/84466
6498         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6499         Adjust last change to less strictly validate use operands.
6501 2018-02-27  Martin Liska  <mliska@suse.cz>
6503         PR gcov-profile/84548
6504         * gcov.c (process_file): Allow partial overlap and consider it
6505         also as group functions.
6506         (output_lines): Properly calculate range of lines for a group.
6508 2018-02-27  Martin Liska  <mliska@suse.cz>
6510         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6511         'ggc' suffixes.  Change first column width.
6512         (timer::print): Fix formatting of the column.
6514 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6516         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6517         preserve inline entry blocks for the sake of debug inline
6518         entry point markers alone.
6519         (remove_unused_locals): Suggest in comments a better place to
6520         force the preservation of inline entry blocks that are
6521         otherwise unused, but do not preserve them.
6523 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6525         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6527 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6529         PR target/84039
6530         * config/i386/constraints.md (Bs): Replace
6531         ix86_indirect_branch_register with
6532         TARGET_INDIRECT_BRANCH_REGISTER.
6533         (Bw): Likewise.
6534         * config/i386/i386.md (indirect_jump): Likewise.
6535         (tablejump): Likewise.
6536         (*sibcall_memory): Likewise.
6537         (*sibcall_value_memory): Likewise.
6538         Peepholes of indirect call and jump via memory: Likewise.
6539         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6540         (*sibcall_value_GOT_32): Likewise.
6541         * config/i386/predicates.md (indirect_branch_operand): Likewise.
6542         (GOT_memory_operand): Likewise.
6543         (call_insn_operand): Likewise.
6544         (sibcall_insn_operand): Likewise.
6545         (GOT32_symbol_operand): Likewise.
6546         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6548 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6550         PR rtl-optimization/83496
6551         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
6552         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
6553         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
6554         redundant insn, if any.
6555         (relax_delay_slots): Likewise.
6556         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
6558 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
6560         PR tree-optimization/83965
6561         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
6562         that grouped statements are part of a reduction chain.  Return
6563         true if the statement is not marked as a reduction itself but
6564         is part of a group.
6565         (vect_recog_dot_prod_pattern): Don't check whether the statement
6566         is part of a group here.
6567         (vect_recog_sad_pattern): Likewise.
6568         (vect_recog_widen_sum_pattern): Likewise.
6570 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6572         PR debug/84545
6573         * final.c (rest_of_clean_state): Also look for calls inside sequences.
6575 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6577         PR target/84530
6578         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
6579         the bool argument.
6580         (ix86_output_indirect_function_return): New prototype.
6581         (ix86_split_simple_return_pop_internal): Likewise.
6582         * config/i386/i386.c (indirect_return_via_cx): New.
6583         (indirect_return_via_cx_bnd): Likewise.
6584         (indirect_thunk_name): Handle return va CX_REG.
6585         (output_indirect_thunk_function): Create alias for
6586         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
6587         (ix86_output_indirect_jmp): Remove the bool argument.
6588         (ix86_output_indirect_function_return): New function.
6589         (ix86_split_simple_return_pop_internal): Likewise.
6590         * config/i386/i386.md (*indirect_jump): Don't pass false
6591         to ix86_output_indirect_jmp.
6592         (*tablejump_1): Likewise.
6593         (simple_return_pop_internal): Change it to define_insn_and_split.
6594         Call ix86_split_simple_return_pop_internal to split it for
6595         -mfunction-return=.
6596         (simple_return_indirect_internal): Call
6597         ix86_output_indirect_function_return instead of
6598         ix86_output_indirect_jmp.
6600 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
6602         PR bootstrap/84405
6603         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6604         memset and value initialization afterwards.
6606 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
6608         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6610 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6612         PR target/84521
6613         * common/config/aarch64/aarch64-common.c
6614         (aarch_option_optimization_table[]): Switch
6615         off fomit-frame-pointer
6617 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6618             Chung-Ju Wu  <jasonwucj@gmail.com>
6620         * config/nds32/nds32-multiple.md (load_multiple): Disallow
6621         volatile memory.
6622         (store_multiple): Ditto.
6624 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6626         * config.gcc: Add --with-cpu support for nds32 target.
6627         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6628         * config/nds32/nds32.opt: Add -mcpu= option.
6630 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
6632         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6633         isel=yes): Warn for these deprecated options.
6635 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
6637         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6638         ISA_2_5_MASKS_EMBEDDED.
6640 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
6642         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6643         p->max as pointers rather than using iterative_hash_expr.
6645 2018-02-23  Carl Love  <cel@us.ibm.com>
6647         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6648         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6649         BU_P8V_OVERLOAD_2.
6650         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6651         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6652         P8V_BUILTIN_VEC_VUNSIGNED2.
6654 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
6656         PR target/81572
6657         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6658         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6659         LRA_UNKNOWN_ALT.
6660         * lra-constraints.c (curr_insn_transform): Set up
6661         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
6662         LRA_UNKNOWN_ALT.
6663         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6664         * lra-eliminations.c (spill_pseudos): Ditto.
6665         (process_insn_for_elimination): Ditto.
6666         * lra-lives.c (reg_early_clobber_p): Use the new macros.
6667         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6668         LRA_NON_CLOBBERED_ALT.
6670 2018-02-22  Martin Sebor  <msebor@redhat.com>
6672         PR tree-optimization/84480
6673         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6674         to maybe_diag_stxncpy_trunc.  Call it.
6675         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6676         from gimple_fold_builtin_strcpy.  Print inlining stack.
6677         (handle_builtin_stxncpy): Print inlining stack.
6678         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6680 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
6682         PR target/84176
6683         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6684         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6685         and -fcheck-pointer-bounds are used together.
6686         (indirect_thunk_prefix): New enum.
6687         (indirect_thunk_need_prefix): New function.
6688         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
6689         "_nt" instead of "_bnd" for NOTRACK prefix.
6690         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6691         (output_indirect_thunk_function): Likewise.
6692         (): Likewise.
6693         (ix86_code_end): Update output_indirect_thunk_function calls.
6694         (ix86_output_indirect_branch_via_reg): Replace
6695         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6696         (ix86_output_indirect_branch_via_push): Likewise.
6697         (ix86_output_function_return): Likewise.
6698         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6699         incompatible with -fcf-protection=branch and
6700         -fcheck-pointer-bounds.
6702 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6704         PR target/83335
6705         * config/aarch64/aarch64.c (aarch64_print_address_internal):
6706         Change gcc_assert call to output_operand_lossage.
6708 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6710         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6712 2018-02-22  DJ Delorie  <dj@redhat.com>
6713             Sebastian Perta  <sebastian.perta@renesas.com>
6714             Oleg Endo  <olegendo@gcc.gnu.org>
6716         * config/rx/rx.c (rx_rtx_costs): New function.
6717         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6719 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6721         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6723 2018-02-22  Martin Liska  <mliska@suse.cz>
6725         PR driver/83193
6726         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6727         Add "native" as a possible value.
6729 2018-02-22  Martin Liska  <mliska@suse.cz>
6731         PR driver/83193
6732         * config/i386/i386.c (ix86_option_override_internal):
6733         Add "native" as a possible value for -march and -mtune.
6735 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
6737         PR target/84502
6738         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6739         to all type variants.
6741         PR tree-optimization/84503
6742         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6743         width as info->bitpos + info->bitsize - start.
6744         (merged_store_group::merge_overlapping): Simplify width computation.
6745         (check_no_overlap): New function.
6746         (imm_store_chain_info::try_coalesce_bswap): Compute expected
6747         start + width and last_order of the group, fail if check_no_overlap
6748         fails.
6749         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6750         to group if check_no_overlap fails.
6752 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6754         * config/rs6000/altivec.md: Delete contraint arguments to
6755         define_expand, define_split, and define_peephole2, and in
6756         define_insn_and_split if always unused.
6757         * config/rs6000/darwin.md: Ditto.
6758         * config/rs6000/dfp.md: Ditto.
6759         * config/rs6000/rs6000.md: Ditto.
6760         * config/rs6000/sync.md: Ditto.
6761         * config/rs6000/vector.md: Ditto.
6762         * config/rs6000/vsx.md: Ditto.
6764 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6766         * config/rs6000/altivec.md: Write output control strings as braced
6767         blocks instead of double-quoted strings.
6768         * config/rs6000/darwin.md: Ditto.
6769         * config/rs6000/rs6000.md: Ditto.
6770         * config/rs6000/vector.md: Ditto.
6771         * config/rs6000/vsx.md: Ditto.
6773 2018-02-21  Jason Merrill  <jason@redhat.com>
6775         PR c++/84314 - ICE with templates and fastcall attribute.
6776         * attribs.c (build_type_attribute_qual_variant): Remove assert.
6778 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6780         * ipa-cp.c (determine_versionability): Fix comment typos.
6782 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6784         PR c/84229
6785         * ipa-cp.c (determine_versionability): Do not version functions caling
6786         va_arg_pack.
6788 2018-02-21  Martin Liska  <mliska@suse.cz>
6790         PR driver/83193
6791         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
6792         Add "native" as a possible value.
6793         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
6794         the macro when native cpu detection is available.
6796 2018-02-21  Martin Liska  <mliska@suse.cz>
6798         PR driver/83193
6799         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
6800         Add "native" as a possible value.
6801         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
6802         when native cpu detection is available.
6804 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
6805             Martin Sebor  <msebor@redhat.com>
6807         PR tree-optimization/84478
6808         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
6809         false.
6810         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
6811         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
6812         support which is conservatively correct, for 2 only stay conservative
6813         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
6814         argument to the 2 argument get_range_strlen, adjust 6 arg
6815         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
6816         false.
6817         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
6818         (gimple_fold_builtin_strlen): Pass true as last argument to
6819         get_range_strlen.
6821 2018-02-20  Martin Sebor  <msebor@redhat.com>
6823         PR middle-end/84095
6824         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
6825         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
6826         (builtin_memref::builtin_memref): Factor out parts into
6827         set_base_and_offset and call it.
6829 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
6831         PR middle-end/84406
6832         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
6833         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
6834         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
6835         search at the associated MODE_INT.
6837 2018-02-20  Jeff Law  <law@redhat.com>
6839         PR middle-end/82123
6840         PR tree-optimization/81592
6841         PR middle-end/79257
6842         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
6843         for range data rather than using global data.
6844         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
6845         range data rather than using global data.
6846         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
6847         pass it to children as needed.
6848         (struct directive::fmtresult): Similarly.
6849         (struct directive::set_width): Similarly.
6850         (struct directive::set_precision): Similarly.
6851         (format_integer, format_directive, parse_directive): Similarly.
6852         (format_none): Accept unnamed vr_values parameter.
6853         (format_percent, format_floating, format_character): Similarly.
6854         (format_string, format_plain): Similarly.
6855         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
6856         the EVRP range analyzer for range data rather than using global data.
6857         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
6858         gimple-ssa-evrp-analyze.h
6859         (class sprintf_dom_walker): Add after_dom_children member function.
6860         Add evrp_range_analyzer member.
6861         (sprintf_dom_walker::before_dom_children): Call into the EVRP
6862         range analyzer as needed.
6863         (sprintf_dom_walker::after_dom_children): New member function.
6864         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
6865         if not optimizing.
6866         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
6867         (evrp_range_analyzer::pop_to_marker): Likewise.
6869 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
6871         PR tree-optimization/84419
6872         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
6873         with the required type if its current type is compatible but
6874         different.
6876 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
6878         PR middle-end/82004
6879         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
6880         after vectorization.
6882 2018-02-20  Martin Liska  <mliska@suse.cz>
6884         PR driver/83193
6885         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
6886         possible values if we don't have a hint.
6888 2018-02-20  Martin Liska  <mliska@suse.cz>
6890         PR c/84310
6891         PR target/79747
6892         * final.c (shorten_branches): Build align_tab array with one
6893         more element.
6894         * opts.c (finish_options): Add alignment option limit check.
6895         (MAX_CODE_ALIGN): Likewise.
6896         (MAX_CODE_ALIGN_VALUE): Likewise.
6897         * doc/invoke.texi: Document maximum allowed option value for
6898         all -falign-* options.
6900 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
6902         PR target/84146
6903         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
6904         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
6905         * var-tracking.c (emit_note_insn_var_location): Remove all references
6906         to NOTE_INSN_CALL_ARG_LOCATION.
6907         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
6908         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
6909         Use copy_rtx_if_shared.
6910         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
6911         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
6912         (dwarf2out_var_location): Remove handling of
6913         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
6914         on call_insn.
6915         * final.c (final_scan_insn): Remove all references to
6916         NOTE_INSN_CALL_ARG_LOCATION.
6917         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
6918         before dumping final insns.
6919         * except.c (emit_note_eh_region_end): Remove all references to
6920         NOTE_INSN_CALL_ARG_LOCATION.
6921         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
6922         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
6923         * config/arc/arc.c (hwloop_optimize): Likewise.
6924         * config/arm/arm.c (create_fix_barrier): Likewise.
6925         * config/s390/s390.c (s390_chunkify_start): Likewise.
6926         * config/sh/sh.c (find_barrier): Likewise.
6927         * config/i386/i386.c (rest_of_insert_endbranch,
6928         ix86_seh_fixup_eh_fallthru): Likewise.
6929         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
6930         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
6931         * config/frv/frv.c (frv_function_prologue): Likewise.
6932         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
6933         reg note.
6934         (note_outside_basic_block_p): Remove all references to
6935         NOTE_INSN_CALL_ARG_LOCATION.
6936         * gengtype.c (adjust_field_rtx_def): Likewise.
6937         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
6938         Likewise.
6939         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
6940         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
6942         PR c++/84444
6943         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
6944         is ADDR_EXPR.
6946         PR tree-optimization/84452
6947         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
6948         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
6949         is NULL.
6951 2018-02-19  Martin Liska  <mliska@suse.cz>
6953         PR sanitizer/82183
6954         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
6956 2018-02-19  Martin Liska  <mliska@suse.cz>
6957             Richard Sandiford  <richard.sandiford@linaro.org>
6959         PR tree-optimization/82491
6960         * gimple-fold.c (get_base_constructor): Make earlier bail out
6961         to prevent ubsan.
6963 2018-02-19  Carl Love  <cel@us.ibm.com>
6965         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
6966         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
6967         BU_P8V_OVERLOAD_1.
6968         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
6969         P8V_BUILTIN_VEC_NEG.
6971 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
6973         * config/rl78/rl78.md (movdf): New define expand.
6975 2018-02-19  Martin Liska  <mliska@suse.cz>
6977         PR other/80589
6978         * doc/invoke.texi: Fix typo.
6979         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
6981 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
6983         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6984         handle rs6000_single_float and rs6000_double_float specially for
6985         e500 family CPUs.
6987 2018-02-16  Jeff Law  <law@redhat.com>
6989         * config/rx/rx.c (add_pop_cfi_notes): New function.;
6990         (pop_regs): Use it.
6992 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
6994         PR ipa/84425
6995         * ipa-inline.c (inline_small_functions): Fix a typo.
6997 2018-02-16  Nathan Sidwell  <nathan@acm.org>
6999         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7001 2018-02-16  Carl Love  <cel@us.ibm.com>
7003         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7004         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7005         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7006         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7007         expansion to P8V_BUILTIN_VEC_FLOAT2.
7009 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7011         PR rtl-optimization/70023
7012         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7013         src_regno into account.
7015 2018-02-16  Carl Love  <cel@us.ibm.com>
7017         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7018         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7019         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7020         * config/rs6000/rs6000.c: Remove case statements for
7021         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7022         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7023         and P9V_BUILTIN_VEC_VINSERT4B.
7024         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7025         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7026         * config/rs6000/vsx.md:
7027         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7028         vec_insert4b.
7030 2018-02-16  Carl Love  <cel@us.ibm.com>
7032         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7033         vec_insert4b.
7034         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7035         definitions.
7036         * config/rs6000/rs6000-c.c: Add the definitions for
7037         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7038         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7039         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7040         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7041         definition for insert4b and define insn *insert3b_internal.
7042         * doc/extend.texi: Add documentation for vec_extract4b.
7044 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7046         * doc/extend.texi (Backwards Compatibility): Mention friend
7047         injection.  Note for-scope is deprecated.
7048         * doc/invoke.texi (-ffriend-injection): Deprecate.
7050 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7052         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7053         that moved to I2, also allow destinations that are a paradoxical
7054         subreg (instead of a normal reg).
7056 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7058         PR target/83831
7059         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7060         to QImode.
7062 2018-02-16  Richard Biener  <rguenther@suse.de>
7064         PR tree-optimization/84037
7065         PR tree-optimization/84016
7066         PR target/82862
7067         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7068         Adjust vec_construct for the fact we need additional higher latency
7069         128bit inserts for AVX256 and AVX512 vector builds.
7070         (ix86_add_stmt_cost): Scale vector construction cost for
7071         elementwise loads.
7073 2018-02-16  Richard Biener  <rguenther@suse.de>
7075         PR tree-optimization/84417
7076         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7077         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7078         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7080 2018-02-16  Martin Liska  <mliska@suse.cz>
7082         PR sanitizer/84307
7083         * internal-fn.def (ASAN_CHECK): Set proper flags.
7084         (ASAN_MARK): Likewise.
7086 2018-02-16  Julia Koval  <julia.koval@intel.com>
7088         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7089         from PTA_CANNONLAKE.
7091 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7093         PR target/84272
7094         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7095         Use ++iter rather than iter++ for std::list iterators.
7096         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7097         defer deleting them until all nodes in the forest are processed.  Do
7098         free even leaf nodes.  Change to_process into auto_vec.
7100         PR bootstrap/84405
7101         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7102         * vec.h (vec_default_construct): Use memset instead of placement new
7103         if BROKEN_VALUE_INITIALIZATION is defined.
7104         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7105         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7106         is defined.
7108         PR rtl-optimization/83723
7109         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7110         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7111         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7112         recursive calls.
7113         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7114         callers.
7115         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7117 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7119         PR rtl-optimization/81443
7120         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7121         from inner REGs to paradoxical SUBREGs.
7123 2018-02-16  Richard Biener  <rguenther@suse.de>
7125         PR tree-optimization/84399
7126         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7127         For operands we can analyze at their definition make sure we can
7128         analyze them at each use as well.
7130 2018-02-16  Richard Biener  <rguenther@suse.de>
7132         PR tree-optimization/84190
7133         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7134         volatile accesses if the decl isn't volatile.
7136 2018-02-15  Jason Merrill  <jason@redhat.com>
7138         PR c++/84314 - ICE with templates and fastcall attribute.
7139         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7140         TYPE_CANONICAL on an existing type.
7142 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7144         PR tree-optimization/84383
7145         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7146         dstoff nor call operand_equal_p if dstbase is NULL.
7148         PR tree-optimization/84334
7149         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7150         also a CONSTANT_CLASS_P, punt.
7152 2018-02-14  Jim Wilson  <jimw@sifive.com>
7154         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7155         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7156         to where locals are set.  Add TARGET_RVC support.
7157         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7159 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7161         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7163 2018-02-14  Martin Sebor  <msebor@redhat.com>
7165         PR tree-optimization/83698
7166         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7167         arrays constrain the offset range to their bounds.
7168         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7169         (builtin_access::overlap): Avoid setting the size of overlap if it's
7170         already been set.
7171         (maybe_diag_overlap): Also consider arrays when deciding what values
7172         of offsets to include in diagnostics.
7174 2018-02-14  Martin Sebor  <msebor@redhat.com>
7176         PR c/84108
7177         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7178         that correspond to the kind of a declaration.
7180 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7182         PR target/83984
7183         * config/pa/pa.md: Load address of PIC label using the linkage table
7184         if the label is nonlocal.
7186 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7188         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7189         warning message if user requests -maltivec=be.
7190         * doc/invoke.texi: Document deprecation of -maltivec=be.
7192 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7194         PR target/84220
7195         * config/rs6000/rs6000-c.c: Update definitions for
7196         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7197         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7199 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7201         PR target/84239
7202         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7203         add _get_ssp intrinsics. Remove argument from
7204         __builtin_ia32_rdssp[d|q].
7205         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7206         * config/i386/i386-builtin.def: Remove argument from
7207         __builtin_ia32_rdssp[d|q].
7208         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7209         ix86_expand_special_args_builtin for _rdssp[d|q].
7210         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7211         Clear register before usage.
7212         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7213         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7215 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7217         PR tree-optimization/84357
7218         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7219         operand 1 of an ARRAY_REF too.
7221 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7223         PR target/83831
7224         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7225         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7226         declarations.
7227         (set_of_reg): New struct.
7228         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7229         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7230         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7231         functions.
7232         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7233         Split into bitclr, bitset, bitinvert patterns if appropriate.
7234         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7235         use rx_fuse_in_memory_bitop.
7236         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7237         to named insn, correct maximum insn length.
7239 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7241         PR target/79242
7242         * machmode.def: Define a complex mode for PARTIAL_INT.
7243         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7244         MODE_PARTIAL_INT.
7245         * doc/rtl.texi: Document CSPImode.
7246         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7247         handling.
7248         (msp430_hard_regno_nregs_with_padding): Likewise.
7250 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7252         PR target/84279
7253         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7255 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7257         PR rtl-optimization/84169
7258         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7259         we generated a parallel as new i3 and we split that to new i2 and i3
7260         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7261         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7262         those to i2, not i1.  Partially rewrite this scan code.
7264 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7266         PR c/82210
7267         * stor-layout.c (place_field): For variable length fields, adjust
7268         offset_align afterwards not just based on the field's alignment,
7269         but also on the size.
7271         PR middle-end/84309
7272         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7273         of exps and logs in the use_exp2 case.
7275 2018-02-13  Jeff Law  <law@redhat.com>
7277         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7278         entry for "vector".
7280         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7281         ARGS as unused.
7283 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7285         PR debug/84342
7286         PR debug/84319
7287         * common.opt (gas-loc-support, gas-locview-support): New.
7288         (ginline-points, ginternal-reset-location-views): New.
7289         * doc/invoke.texi: Document them.  Use @itemx where intended.
7290         (gvariable-location-views): Adjust.
7291         * target.def (reset_location_view): New.
7292         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7293         (TARGET_RESET_LOCATION_VIEW): New.
7294         * doc/tm.texi: Rebuilt.
7295         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7296         (dwarf2out_default_as_locview_support): New.
7297         (output_asm_line_debug_info): Use option variables.
7298         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7299         (output_loc_list): Likewise.
7300         (add_high_low_attributes): Check option variables.
7301         Don't output entry view attribute in strict mode.
7302         (gen_inlined_subroutine_die): Check option variables.
7303         (dwarf2out_inline_entry): Likewise.
7304         (init_sections_and_labels): Likewise.
7305         (dwarf2out_early_finish): Likewise.
7306         (maybe_reset_location_view): New, from...
7307         (dwarf2out_var_location): ... here.  Call it.
7308         * debug.h (dwarf2out_default_as_loc_support): Declare.
7309         (dwarf2out_default_as_locview_support): Declare.
7310         * hooks.c (hook_int_rtx_insn_0): New.
7311         * hooks.h (hook_int_rtx_insn_0): Declare.
7312         * toplev.c (process_options): Take -gas-loc-support and
7313         -gas-locview-support from dwarf2out.  Enable
7314         -gvariable-location-views by default only with locview
7315         assembler support.  Enable -ginternal-reset-location-views by
7316         default only if the target defines the corresponding hook.
7317         Enable -ginline-points by default if location views are
7318         enabled; force it disabled if statement frontiers are
7319         disabled.
7320         * tree-inline.c (expand_call_inline): Check option variables.
7321         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7323 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7325         PR tree-optimization/84321
7326         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7327         handling.  Also check whether the anti-range contains any values
7328         that satisfy the mask; switch to a VR_RANGE if not.
7330 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7332         PR sanitizer/84340
7333         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7335 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7337         PR c++/83990
7338         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7339         of call statements, also set location of a load to a temporary.
7341 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7343         * config/rl78/rl78.c (add_vector_labels): New function.
7344         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7345         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7346         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7347         which checks that no arguments are passed.
7348         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7349         * doc/extend.texi: Documentation for the new attribute.
7351 2018-02-13  Andreas Schwab  <schwab@suse.de>
7353         * config/riscv/linux.h (CPP_SPEC): Define.
7355 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7357         PR target/84335
7358         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7359         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7360         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7361         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7362         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7363         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7364         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7365         temporarily for AES and PCLMUL builtins.
7367         PR tree-optimization/84339
7368         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7369         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7370         Formatting fixes.
7372         PR middle-end/84309
7373         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7374         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7375         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7376         inline function.
7377         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7378         inline function.
7379         * omp-simd-clone.h: New file.
7380         * omp-simd-clone.c: Include omp-simd-clone.h.
7381         (expand_simd_clones): No longer static.
7382         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7383         cgraph.h and omp-simd-clone.h.
7384         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7385         (vect_recog_widen_shift_pattern): Formatting fix.
7386         (vect_pattern_recog_1): Don't check optab for calls.
7388         PR target/84336
7389         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7390         operands[2] into a REG before using gen_lowpart on it.
7392 2018-02-12  Jeff Law  <law@redhat.com>
7394         PR target/83760
7395         * config/sh/sh.c (find_barrier): Consider a sibling call
7396         a barrier as well.
7398         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7399         successfully back substituting a reg.
7401 2018-02-12  Richard Biener  <rguenther@suse.de>
7403         PR tree-optimization/84037
7404         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7405         parameter, move visited init to caller.
7406         (vect_slp_analyze_operations): Separate cost from validity
7407         check, initialize visited once for all instances.
7408         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7409         for all instances.
7410         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7411         out an assert.
7412         (vect_model_promotion_demotion_cost): Likewise.
7413         (vectorizable_bswap): Guard cost modeling with !slp_node
7414         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7415         SLP stmts.
7416         (vectorizable_call): Likewise.
7417         (vectorizable_conversion): Likewise.
7418         (vectorizable_assignment): Likewise.
7419         (vectorizable_shift): Likewise.
7420         (vectorizable_operation): Likewise.
7421         (vectorizable_store): Likewise.
7422         (vectorizable_load): Likewise.
7423         (vectorizable_condition): Likewise.
7424         (vectorizable_comparison): Likewise.
7426 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7428         PR sanitizer/84307
7429         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7430         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7431         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7433 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7435         PR middle-end/83665
7436         * params.def (inline-min-speedup): Increase from 8 to 15.
7437         (max-inline-insns-auto): Decrease from 40 to 30.
7438         * ipa-split.c (consider_split): Add some buffer for function to
7439         be considered inlining candidate.
7440         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7441         default values.
7443 2018-02-12  Richard Biener  <rguenther@suse.de>
7445         PR tree-optimization/84037
7446         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7447         matched stmts if we cannot swap the non-matched ones.
7449 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7451         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7452         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7453         _mm_maskz_scalef_round_ss): New intrinsics.
7454         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7455         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7456         __builtin_ia32_scalefss_round): Remove.
7457         (__builtin_ia32_scalefsd_mask_round,
7458         __builtin_ia32_scalefss_mask_round): New intrinsics.
7459         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7460         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7461         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7462         "<round_constraint>")): Changed to ...
7463         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7464         "<round_scalar_constraint>")): ... this.
7465         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7466         %0, %1, %2<round_op3>}"): Changed to ...
7467         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7468         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7469         %2<round_scalar_mask_op3>}"): ... this.
7470         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7472 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7474         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7475         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7476         (_mm_maskz_sqrt_round_ss): New intrinsics.
7477         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7478         (__builtin_ia32_sqrtsd_mask_round)
7479         (__builtin_ia32_sqrtss_mask_round): New builtins.
7480         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7481         (__builtin_ia32_sqrtss_round): Remove.
7482         (__builtin_ia32_sqrtsd_mask_round)
7483         (__builtin_ia32_sqrtss_mask_round): New builtins.
7484         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7485         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7486         ((match_operand:VF_128 1 "vector_operand"
7487         "xBm,<round_constraint>")): Changed to ...
7488         ((match_operand:VF_128 1 "vector_operand"
7489         "xBm,<round_scalar_constraint>")): ... this.
7490         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7491         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7492         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7493         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7494         %<iptr>1<round_scalar_mask_op3>}): ... this.
7495         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7496         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7498 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7500         PR target/84266
7501         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7502         Cast vec_cmpeq result to correct type.
7503         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7504         Cast vec_cmpgt result to correct type.
7506 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7508         * final.c (final_scan_insn_1): Renamed from...
7509         (final_scan_insn): ... this.  New wrapper, to recover
7510         seen from the outermost call in recursive ones.
7511         * config/sparc/sparc.c (output_return): Drop seen from call.
7512         (output_sibcall): Likewise.
7513         * config/visium/visium.c (output_branch): Likewise.
7515 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7517         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7518         function label.
7520 2018-02-10  Alan Modra  <amodra@gmail.com>
7522         PR target/84300
7523         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7524         Specify LR as an input.
7526 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7528         PR sanitizer/83987
7529         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7530         remove_member_access_dummy_vars): New functions.
7531         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7532         lower_omp_1, execute_lower_omp): Use them.
7534         PR rtl-optimization/84308
7535         * shrink-wrap.c (spread_components): Release todo vector.
7537 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7539         PR rtl-optimization/57193
7540         * ira-color.c (struct allocno_color_data): Add member
7541         conflict_allocno_hard_prefs.
7542         (update_conflict_allocno_hard_prefs): New.
7543         (bucket_allocno_compare_func): Add a preference based on
7544         conflict_allocno_hard_prefs.
7545         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7546         (color_allocnos): Remove a dead code.  Initiate
7547         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
7549 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7551         PR target/84226
7552         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
7553         constraint from =wa to wa.  Avoid a subreg on the output operand,
7554         instead use a pseudo and subreg it in a move.
7555         (p9_xxbrd_<mode>): Changed to ...
7556         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
7557         (p9_xxbrd_v2df): New expander.
7558         (p9_xxbrw_<mode>): Changed to ...
7559         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
7560         (p9_xxbrw_v4sf): New expander.
7562 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7564         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
7566 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
7568         PR target/83926
7569         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
7570         multiply in 32-bit mode.
7571         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
7572         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
7573         mode.
7575 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7577         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
7578         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
7579         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
7580         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
7582 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
7584         PR lto/84213
7585         * dwarf2out.c (is_trivial_indirect_ref): New function.
7586         (dwarf2out_late_global_decl): Do not generate a location
7587         attribute for variables that have a non-trivial DECL_VALUE_EXPR
7588         and that are not defined in the current unit.
7590 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7592         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
7593         instead of a libcall for UNORDERED.
7595 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
7597         PR target/82641
7598         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7599         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7601 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7603         PR target/PR84295
7604         * config/s390/s390.c (s390_set_current_function): Invoke
7605         s390_indirect_branch_settings also if fndecl didn't change.
7607 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7609         * config/rs6000/rs6000.md (blockage): Set length to zero.
7611 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7613         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7615 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7617         PR sanitizer/84285
7618         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7619         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7620         -static-lib*san.
7622         PR debug/84252
7623         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7624         PARALLEL incoming that failed vt_get_decl_and_offset check.
7626         PR middle-end/84237
7627         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7628         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7629         TREE_READONLY bit.
7630         (get_variable_section): For decls in named .bss* sections pass true as
7631         second argument to bss_initializer_p.
7633 2018-02-09  Marek Polacek  <polacek@redhat.com>
7634             Jakub Jelinek  <jakub@redhat.com>
7636         PR c++/83659
7637         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7638         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
7639         Sync some changes from cxx_fold_indirect_ref.
7641 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7643         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7644         markers.
7645         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7646         (BLOCK_INLINE_ENTRY_LABEL): New.
7647         (dwarf2out_var_location): Disregard inline entry markers.
7648         (inline_entry_data): New struct.
7649         (inline_entry_data_hasher): New hashtable type.
7650         (inline_entry_data_hasher::hash): New.
7651         (inline_entry_data_hasher::equal): New.
7652         (inline_entry_data_table): New variable.
7653         (add_high_low_attributes): Add DW_AT_entry_pc and
7654         DW_AT_GNU_entry_view attributes if a pending entry is found
7655         in inline_entry_data_table.  Add old entry_pc attribute only
7656         if debug nonbinding markers are disabled.
7657         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7658         markers are enabled.
7659         (block_within_block_p, dwarf2out_inline_entry): New.
7660         (dwarf2out_finish): Check that no entries remained in
7661         inline_entry_data_table.
7662         * final.c (reemit_insn_block_notes): Handle inline entry notes.
7663         (final_scan_insn, notice_source_line): Likewise.
7664         (rest_of_clean_state): Skip inline entry markers.
7665         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7666         markers.
7667         * gimple.c (gimple_build_debug_inline_entry): New.
7668         * gimple.h (enum gimple_debug_subcode): Add
7669         GIMPLE_DEBUG_INLINE_ENTRY.
7670         (gimple_build_debug_inline_entry): Declare.
7671         (gimple_debug_inline_entry_p): New.
7672         (gimple_debug_nonbind_marker_p): Adjust.
7673         * insn-notes.def (INLINE_ENTRY): New.
7674         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7675         inline entry marker notes.
7676         (print_insn): Likewise.
7677         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7678         (INSN_DEBUG_MARKER_KIND): Likewise.
7679         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7680         * tree-inline.c (expand_call_inline): Build and insert
7681         debug_inline_entry stmt.
7682         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7683         inline entry blocks early, if nonbind markers are enabled.
7684         (dump_scope_block): Dump fragment info.
7685         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7686         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7687         (gimple_build_debug_inline_entry): New.
7688         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7689         Enable/disable inline entry points too.
7690         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7691         (DEBUG_INSN): Describe inline entry markers.
7693         * common.opt (gvariable-location-views): New.
7694         (gvariable-location-views=incompat5): New.
7695         * config.in: Rebuilt.
7696         * configure: Rebuilt.
7697         * configure.ac: Test assembler for view support.
7698         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7699         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7700         * dwarf2out.c (var_loc_view): New typedef.
7701         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7702         (dwarf2out_locviews_in_attribute): New.
7703         (dwarf2out_locviews_in_loclist): New.
7704         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7705         (enum dw_line_info_opcode): Add LI_adv_address.
7706         (struct dw_line_info_table): Add view.
7707         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7708         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7709         (zero_view_p): New variable.
7710         (ZERO_VIEW_P): New macro.
7711         (output_asm_line_debug_info): New.
7712         (struct var_loc_node): Add view.
7713         (add_AT_view_list, AT_loc_list): New.
7714         (add_var_loc_to_decl): Add view param.  Test it against last.
7715         (new_loc_list): Add view params.  Record them.
7716         (AT_loc_list_ptr): Handle loc and view lists.
7717         (view_list_to_loc_list_val_node): New.
7718         (print_dw_val): Handle dw_val_class_view_list.
7719         (size_of_die): Likewise.
7720         (value_format): Likewise.
7721         (loc_list_has_views): New.
7722         (gen_llsym): Set vl_symbol too.
7723         (maybe_gen_llsym, skip_loc_list_entry): New.
7724         (dwarf2out_maybe_output_loclist_view_pair): New.
7725         (output_loc_list): Output view list or entries too.
7726         (output_view_list_offset): New.
7727         (output_die): Handle dw_val_class_view_list.
7728         (output_dwarf_version): New.
7729         (output_compilation_unit_header): Use it.
7730         (output_skeleton_debug_sections): Likewise.
7731         (output_rnglists, output_line_info): Likewise.
7732         (output_pubnames, output_aranges): Update version comments.
7733         (output_one_line_info_table): Output view numbers in asm comments.
7734         (dw_loc_list): Determine current endview, pass it to new_loc_list.
7735         Call maybe_gen_llsym.
7736         (loc_list_from_tree_1): Adjust.
7737         (add_AT_location_description): Create view list attribute if
7738         needed, check it's absent otherwise.
7739         (convert_cfa_to_fb_loc_list): Adjust.
7740         (maybe_emit_file): Call output_asm_line_debug_info for test.
7741         (dwarf2out_var_location): Reset views as needed.  Precompute
7742         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
7743         attribute.  Set view.
7744         (new_line_info_table): Reset next view.
7745         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7746         (dwarf2out_source_line): Likewise.  Output view resets and labels to
7747         the assembler, or select appropriate line info opcodes.
7748         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7749         (optimize_string_length): Catch it.  Adjust.
7750         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
7751         dw_val_class_view_list, and remove it if no longer needed.
7752         (hash_loc_list): Hash view numbers.
7753         (loc_list_hasher::equal): Compare them.
7754         (optimize_location_lists): Check whether a view list symbol is
7755         needed, and whether the locview attribute is present, and
7756         whether they match.  Remove the locview attribute if no longer
7757         needed.
7758         (index_location_lists): Call skip_loc_list_entry for test.
7759         (dwarf2out_finish): Call output_asm_line_debug_info for test.
7760         Use output_dwarf_version.
7761         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7762         (struct dw_val_node): Add val_view_list.
7763         * final.c (SEEN_NEXT_VIEW): New.
7764         (set_next_view_needed): New.
7765         (clear_next_view_needed): New.
7766         (maybe_output_next_view): New.
7767         (final_start_function): Rename to...
7768         (final_start_function_1): ... this.  Take pointer to FIRST,
7769         add SEEN parameter.  Emit param bindings in the initial view.
7770         (final_start_function): Reintroduce SEEN-less interface.
7771         (final): Rename to...
7772         (final_1): ... this.  Take SEEN parameter.  Output final pending
7773         next view at the end.
7774         (final): Reintroduce seen-less interface.
7775         (final_scan_insn): Output pending next view before switching
7776         sections or ending a block.  Mark the next view as needed when
7777         outputting variable locations.  Notify debug backend of section
7778         changes, and of location view changes.
7779         (rest_of_handle_final): Adjust.
7780         * toplev.c (process_options): Autodetect value for debug variable
7781         location views option.  Warn on incompat5 without -gdwarf-5.
7782         * doc/invoke.texi (gvariable-location-views): New.
7783         (gvariable-location-views=incompat5): New.
7784         (gno-variable-location-views): New.
7786 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
7788         PR tree-optimization/84136
7789         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
7790         that the result of find_edge is non-NULL.
7792 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
7794         PR target/83008
7795         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
7796         storing integer register in SImode.  Fix cost of 256 and 512
7797         byte aligned SSE register store.
7799 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
7801         * config/i386/i386.c (ix86_multiplication_cost): Fix
7802         multiplication cost for TARGET_AVX512DQ.
7804 2018-02-08  Marek Polacek  <polacek@redhat.com>
7806         PR tree-optimization/84238
7807         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
7808         get_range_strlen.
7810 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7812         PR tree-optimization/84265
7813         * tree-vect-stmts.c (vectorizable_store): Don't treat
7814         VMAT_CONTIGUOUS accesses as grouped.
7815         (vectorizable_load): Likewise.
7817 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7819         PR tree-optimization/81635
7820         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
7821         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
7822         (test_round_for_mask): New functions.
7823         (wide_int_cc_tests): Call test_round_for_mask.
7824         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
7825         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
7826         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
7827         range returned by get_range_info.
7829 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7831         PR ipa/81360
7832         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
7833         * symtab.c: Include builtins.h
7834         (symtab_node::output_to_lto_symbol_table_p): Move here
7835         from lto-streamer-out.c:output_symbol_p.
7836         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
7837         (output_symbol_p): Move all logic to symtab.c
7838         (produce_symtab): Update.
7840 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7842         * config/s390/s390-opts.h (enum indirect_branch): Define.
7843         * config/s390/s390-protos.h (s390_return_addr_from_memory)
7844         (s390_indirect_branch_via_thunk)
7845         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
7846         (enum s390_indirect_branch_type): Define.
7847         * config/s390/s390.c (struct s390_frame_layout, struct
7848         machine_function): Remove.
7849         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
7850         (indirect_branch_table_label_no, indirect_branch_table_name):
7851         Define variables.
7852         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
7853         (enum s390_indirect_branch_option): Define.
7854         (s390_return_addr_from_memory): New function.
7855         (s390_handle_string_attribute): New function.
7856         (s390_attribute_table): Add new attribute handler.
7857         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
7858         (s390_indirect_branch_via_thunk): New function.
7859         (s390_indirect_branch_via_inline_thunk): New function.
7860         (s390_function_ok_for_sibcall): When jumping via thunk disallow
7861         sibling call optimization for non z10 compiles.
7862         (s390_emit_call): Force indirect branch target to be a single
7863         register.  Add r1 clobber for non-z10 compiles.
7864         (s390_emit_epilogue): Emit return jump via return_use expander.
7865         (s390_reorg): Handle JUMP_INSNs as execute targets.
7866         (s390_option_override_internal): Perform validity checks for the
7867         new command line options.
7868         (s390_indirect_branch_attrvalue): New function.
7869         (s390_indirect_branch_settings): New function.
7870         (s390_set_current_function): Invoke s390_indirect_branch_settings.
7871         (s390_output_indirect_thunk_function):  New function.
7872         (s390_code_end): Implement target hook.
7873         (s390_case_values_threshold): Implement target hook.
7874         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
7875         macros.
7876         * config/s390/s390.h (struct s390_frame_layout)
7877         (struct machine_function): Move here from s390.c.
7878         (TARGET_INDIRECT_BRANCH_NOBP_RET)
7879         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
7880         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
7881         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
7882         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
7883         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
7884         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
7885         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
7886         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
7887         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
7888         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
7889         (mnemonic attribute): Add values which aren't recognized
7890         automatically.
7891         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
7892         pattern for branch conversion.  Fix mnemonic attribute.
7893         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
7894         indirect branch via thunk if requested.
7895         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
7896         ("*indirect_jump"): Disable for branch conversion using out of
7897         line thunks.
7898         ("indirect_jump_via_thunk<mode>_z10")
7899         ("indirect_jump_via_thunk<mode>")
7900         ("indirect_jump_via_inlinethunk<mode>_z10")
7901         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
7902         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
7903         ("casesi_jump_via_inlinethunk<mode>_z10")
7904         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
7905         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
7906         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
7907         ("*indirect2_jump"): Disable for branch conversion.
7908         ("casesi_jump"): Turn into expander and expand patterns for branch
7909         conversion.
7910         ("return_use"): New expander.
7911         ("*return"): Emit return via thunk and rename it to ...
7912         ("*return<mode>"): ... this one.
7913         * config/s390/s390.opt: Add new options and and enum for the
7914         option values.
7916 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7918         * lra-constraints.c (match_reload): Unconditionally use
7919         gen_lowpart_SUBREG, rather than selecting between that
7920         and equivalent gen_rtx_SUBREG code.
7922 2018-02-08  Richard Biener  <rguenther@suse.de>
7924         PR tree-optimization/84233
7925         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
7926         changed flag instead of boguously re-using phi_inserted.
7928 2018-02-08  Martin Jambor  <mjambor@suse.cz>
7930         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
7931         static local variables.
7933 2018-02-08  Richard Biener  <rguenther@suse.de>
7935         PR tree-optimization/84278
7936         * tree-vect-stmts.c (vectorizable_store): When looking for
7937         smaller vector types to perform grouped strided loads/stores
7938         make sure the mode is supported by the target.
7939         (vectorizable_load): Likewise.
7941 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
7943         * config/aarch64/aarch64.c (aarch64_components_for_bb):
7944         Increase LDP/STP opportunities by adding adjacent callee-saves.
7946 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
7948         PR rtl-optimization/84068
7949         PR rtl-optimization/83459
7950         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
7952 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
7954         PR tree-optimization/84224
7955         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
7956         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
7957         non-zero arguments.
7959 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
7961         PR target/84113
7962         * config/rs6000/altivec.md (*restore_world): Remove LR use.
7963         * config/rs6000/predicates.md (restore_world_operation): Adjust op
7964         count, remove one USE.
7966 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
7968         * doc/install.texi (Configuration): Document the
7969         --with-long-double-format={ibm,ieee} PowerPC configuration
7970         options.
7972         PR target/84154
7973         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
7974         Convert from define_expand to be define_insn_and_split.  Rework
7975         float/double/_Float128 conversions to QI/HI/SImode to work with
7976         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
7977         conversions to QI/HImode types did a store and then a load to
7978         truncate the value.  For conversions to VSX registers, don't split
7979         the insn, instead emit the code directly.  Use the code iterator
7980         any_fix to combine signed and unsigned conversions.
7981         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
7982         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
7983         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7984         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
7985         (fix_<mode>di2_hw): Likewise.
7986         (fixuns_<mode>di2_hw): Likewise.
7987         (fix_<mode>si2_hw): Likewise.
7988         (fixuns_<mode>si2_hw): Likewise.
7989         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
7990         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7991         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
7992         fix<uns>_trunc<SFDF:mode>si2_p8.
7993         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
7994         used.
7995         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
7996         (fix<uns>_<mode>_mem): Likewise.
7997         (fctiw<u>z_<mode>_mem): Likewise.
7998         (fix<uns>_<mode>_mem): Likewise.
7999         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8000         the register allocator from doing a direct move to the GPRs to do
8001         a store, and instead use the ISA 3.0 store byte/half-word from
8002         vector register instruction.  For IEEE 128-bit floating point,
8003         also optimize stores of 32-bit ints.
8004         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8006 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8008         * genextract.c (push_pathstr_operand): New function to support
8009         [a-zA-Z].
8010         (walk_rtx): Call push_pathstr_operand.
8011         (print_path): Support [a-zA-Z].
8013 2018-02-07  Richard Biener  <rguenther@suse.de>
8015         PR tree-optimization/84037
8016         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8017         (cse_and_gimplify_to_preheader): Declare.
8018         (vect_get_place_in_interleaving_chain): Likewise.
8019         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8020         ivexpr_map.
8021         (_loop_vec_info::~_loop_vec_info): Delete it.
8022         (cse_and_gimplify_to_preheader): New function.
8023         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8024         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8025         (vectorizable_load): Likewise.  For grouped stores always base
8026         the IV on the first element.
8027         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8028         condition before gimplifying.
8030 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8032         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8033         *DIV_EXPR and *MOD_EXPR.
8035 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8037         PR target/84248
8038         * config/i386/i386.c (ix86_option_override_internal): Mask out
8039         the CF_SET bit when checking -fcf-protection.
8041 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8043         PR libgomp/84217
8044         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8045         enough.
8047 2018-02-07  Richard Biener  <rguenther@suse.de>
8049         PR tree-optimization/84204
8050         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8051         this place.
8053         PR tree-optimization/84205
8054         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8055         special-case isl_ast_op_zdiv_r.
8057         PR tree-optimization/84223
8058         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8059         Only add conditions from within the region.
8060         (gather_bbs::after_dom_children): Adjust.
8062 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8064         PR target/84209
8065         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8066         * config/avr/avr.md: Only post-reload split REG-REG moves if
8067         either register is GENERAL_REG_P.
8069 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8071         PR tree-optimization/84235
8072         * tree-ssa-scopedtables.c
8073         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8074         if the subtraction is performed in floating point type where NaNs are
8075         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8076         build 1.  Formatting fix.
8078 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8080         PR target/84146
8081         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8082         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8083         and skip it regardless of bb boundaries.  Use CALL_P macro,
8084         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8085         unnecessarily, formatting fix.
8087 2018-02-06  Michael Collison  <michael.collison@arm.com>
8089         * config/arm/thumb2.md:
8090         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8091         (*thumb_mov_notscc): Ditto.
8093 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8095         PR target/84154
8096         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8097         unsigned_fix, not "s".
8099 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8101         * configure.ac (gcc_fn_eh_frame_ro): New function.
8102         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8103         correct .eh_frame permissions.
8104         * configure: Regenerate.
8106 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8108         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8109         irrelevant options.
8111 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8113         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8114         Display warning message for -mno-speculate-indirect-jumps.
8116 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8118         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8119         Undocumented.
8120         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8122 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8124         PR tree-optimization/84225
8125         * tree-eh.c (find_trapping_overflow): Only call
8126         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8128 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8130         PR target/84145
8131         * config/i386/i386.c: Reimplement the check of possible options
8132         -mibt/-mshstk conbination. Change error messages.
8133         * doc/invoke.texi: Fix a typo: remove extra '='.
8135 2018-02-06  Marek Polacek  <polacek@redhat.com>
8137         PR tree-optimization/84228
8138         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8140 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8142         PR target/82641
8143         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8144         emitted arch directives.
8145         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8146         __ARM_FEATURE_COPROC before changing architectures.
8148 2018-02-06  Richard Biener  <rguenther@suse.de>
8150         * config/i386/i386.c (print_reg): Fix typo.
8151         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8153 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8155         * configure: Regenerate.
8157 2018-02-05  Martin Sebor  <msebor@redhat.com>
8159         PR tree-optimization/83369
8160         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8161         inlining context.
8163 2018-02-05  Martin Liska  <mliska@suse.cz>
8165         * doc/invoke.texi: Cherry-pick upstream r323995.
8167 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8169         * ira.c (ira_init_register_move_cost): Adjust comment.
8171 2018-02-05  Martin Liska  <mliska@suse.cz>
8173         PR gcov-profile/84137
8174         * doc/gcov.texi: Fix typo in documentation.
8176 2018-02-05  Martin Liska  <mliska@suse.cz>
8178         PR gcov-profile/83879
8179         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8180         using dlopen functionality.
8182 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8184         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8185         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8186         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8187         _mm_maskz_range_round_ss): New intrinsics.
8188         (__builtin_ia32_rangesd128_round)
8189         (__builtin_ia32_rangess128_round): Remove.
8190         (__builtin_ia32_rangesd128_mask_round,
8191         __builtin_ia32_rangess128_mask_round): New builtins.
8192         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8193         __builtin_ia32_rangess128_round): Remove.
8194         (__builtin_ia32_rangesd128_mask_round,
8195         __builtin_ia32_rangess128_mask_round): New builtins.
8196         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8197         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8198         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8199         "<round_saeonly_constraint>")): Changed to ...
8200         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8201         "<round_saeonly_scalar_constraint>")): ... this.
8202         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8203         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8204         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8205         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8206         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8208 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8210         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8211         options.
8212         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8213         Remove all values except native, 8540 and 8548.
8215 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8217         * config/i386/i386.c (ix86_output_function_return): Pass
8218         INVALID_REGNUM, instead of -1, as invalid register number to
8219         indirect_thunk_name and output_indirect_thunk.
8221 2018-02-02  Julia Koval  <julia.koval@intel.com>
8223         * config.gcc: Add -march=icelake.
8224         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8225         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8226         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8227         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8228         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8229         (processor_target_table): Add icelake.
8230         (ix86_option_override_internal): Handle new PTAs.
8231         (get_builtin_code_for_version): Handle icelake.
8232         (M_INTEL_COREI7_ICELAKE): New.
8233         (fold_builtin_cpu): Handle icelake.
8234         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8235         * doc/invoke.texi: Add -march=icelake.
8237 2018-02-02  Julia Koval  <julia.koval@intel.com>
8239         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8240         to wide_int_bitmask.
8241         * wide-int-bitmask.h: New.
8243 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8245         PR target/84066
8246         * config/i386/i386.md: Replace Pmode with word_mode in
8247         builtin_setjmp_setup and builtin_longjmp to support x32.
8249 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8251         PR target/56010
8252         PR target/83743
8253         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8254         #include "opts.h".
8255         (rs6000_supported_cpu_names): New static variable.
8256         (linux_cpu_translation_table): Likewise.
8257         (elf_platform) <cpu>: Define new static variable and use it.
8258         Translate kernel AT_PLATFORM name to canonical name if needed.
8259         Error if platform name is unknown.
8261 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8263         PR target/84089
8264         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8266 2018-02-01  Jeff Law  <law@redhat.com>
8268         PR target/84128
8269         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8270         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8271         the scratch if RELEASE_VIA_POP is false.
8272         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8273         If we have to save a temporary register, decrement SIZE appropriately.
8274         Pass new arguments to release_scratch_register_on_entry.
8275         (ix86_adjust_stack_and_probe): Likewise.
8276         (ix86_emit_probe_stack_range): Pass new arguments to
8277         release_scratch_register_on_entry.
8279 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8281         PR rtl-optimization/84157
8282         * combine.c (change_zero_ext): Use REG_P predicate in
8283         front of HARD_REGISTER_P predicate.
8285 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8287         * config/avr/avr.c (avr_option_override): Move disabling of
8288         -fdelete-null-pointer-checks to...
8289         * common/config/avr/avr-common.c (avr_option_optimization_table):
8290         ...here.
8292 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8294         PR tree-optimization/81635
8295         * tree-data-ref.c (split_constant_offset_1): For types that
8296         wrap on overflow, try to use range info to prove that wrapping
8297         cannot occur.
8299 2018-02-01  Renlin Li  <renlin.li@arm.com>
8301         PR target/83370
8302         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8303         TAILCALL_ADDR_REGS.
8304         (aarch64_register_move_cost): Likewise.
8305         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8306         TAILCALL_ADDR_REGS.
8307         (REG_CLASS_NAMES): Likewise.
8308         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8309         TAILCALL_ADDR_REGS. Remove IP registers.
8310         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8312 2018-02-01  Richard Biener  <rguenther@suse.de>
8314         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8315         for specifying RPO order and allow NULL for that.
8316         * domwalk.c (dom_walker::dom_walker): Likewise.
8317         (dom_walker::walk): Handle NULL RPO order.
8318         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8319         in RPO order.
8320         (rewrite_update_dom_walker): Likewise.
8321         (mark_def_dom_walker): Likewise.
8323 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8325         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8326         (aarch64_maybe_expand_sve_subreg_move): Declare.
8327         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8328         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8329         predicate.
8330         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8331         that are semantically a reverse operation.
8332         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8333         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8334         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8335         functions.
8336         (aarch64_can_change_mode_class): For big-endian, forbid changes
8337         between two SVE modes if they have different element sizes.
8339 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8341         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8342         the TImode handling for big-endian targets.
8344 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8346         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8347         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8348         not just bytes.
8349         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8350         Remove BSWAP handing for big-endian targets and use the form of
8351         LD1RQ appropariate for the mode.
8353 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8355         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8356         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8357         duplicated element.
8359 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8361         PR tearget/83845
8362         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8363         check for operands that need to go through aarch64_sve_reload_be.
8365 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8367         PR tree-optimization/81661
8368         PR tree-optimization/84117
8369         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8370         * tree-eh.c: Include gimplify.h.
8371         (find_trapping_overflow, replace_trapping_overflow,
8372         rewrite_to_non_trapping_overflow): New functions.
8373         * tree-vect-loop.c: Include tree-eh.h.
8374         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8375         * tree-data-ref.c: Include tree-eh.h.
8376         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8378 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8380         PR rtl-optimization/84123
8381         * combine.c (change_zero_ext): Check if hard register satisfies
8382         can_change_dest_mode before calling gen_lowpart_SUBREG.
8384 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8386         PR target/82444
8387         * ira.c (ira_init_register_move_cost): Remove assert.
8389 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8391         PR rtl-optimization/84071
8392         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8393         * doc/tm.texi: Regenerate.
8395 2018-01-31  Richard Biener  <rguenther@suse.de>
8397         PR tree-optimization/84132
8398         * tree-data-ref.c (analyze_miv_subscript): Properly
8399         check whether evolution_function_is_affine_multivariate_p
8400         before calling gcd_of_steps_may_divide_p.
8402 2018-01-31  Julia Koval  <julia.koval@intel.com>
8404         PR target/83618
8405         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8406         * config/i386/i386.md (rdpid_rex64) New.
8407         (rdpid): Make 32bit only.
8409 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8411         PR lto/84105
8412         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8413         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8415 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8417         Revert
8418         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8420         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8422 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8424         PR rtl-optimization/84071
8425         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8426         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8428 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8430         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8431         (arc_attribute_table): Add 'aux' attribute.
8432         (arc_in_small_data_p): Consider aux like variables.
8433         (arc_is_aux_reg_p): New function.
8434         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8435         (arc_get_aux_arg): New function.
8436         (prepare_move_operands): Handle aux-register access.
8437         (arc_handle_aux_attribute): New function.
8438         * doc/extend.texi (ARC Variable attributes): Add subsection.
8440 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8442         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8443         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8444         (arc_attribute_table): Add 'uncached' attribute.
8445         (arc_print_operand): Print '.di' flag for uncached memory
8446         accesses.
8447         (arc_in_small_data_p): Do not consider for small data the uncached
8448         types.
8449         (arc_is_uncached_mem_p): New function.
8450         * config/arc/predicates.md (compact_store_memory_operand): Check
8451         for uncached memory accesses.
8452         (nonvol_nonimm_operand): Likewise.
8453         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8455 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8457         PR c/84100
8458         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8459         falign-loops=): Add Optimization flag.
8461 2018-01-30  Jeff Law  <law@redhat.com>
8463         PR target/84064
8464         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8465         INT_REGISTERS_SAVED.  Check it prior to calling
8466         get_scratch_register_on_entry.
8467         (ix86_adjust_stack_and_probe): Similarly.
8468         (ix86_emit_probe_stack_range): Similarly.
8469         (ix86_expand_prologue): Corresponding changes.
8471 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8473         PR target/40411
8474         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8475         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8477 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8479         PR target/84112
8480         * lra-constraints.c (curr_insn_transform): Process AND in the
8481         address.
8483 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8485         PR rtl-optimization/83986
8486         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8487         dependence against last_pending_memory_flush in addition to
8488         pending_jump_insns.
8490 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8492         PR tree-optimization/81611
8493         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8494         copies.
8496 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8498         PR target/83758
8499         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8500         a reg rtx.
8502 2018-01-30  Richard Biener  <rguenther@suse.de>
8503             Jakub Jelinek  <jakub@redhat.com>
8505         PR tree-optimization/84111
8506         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8507         inner loops added during recursion, as they don't have up-to-date
8508         SSA form.
8510 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8512         PR ipa/81360
8513         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8514         (can_inline_edge_by_limits_p): ... here.
8515         (can_early_inline_edge_p, check_callers,
8516         update_caller_keys, update_callee_keys, recursive_inlining,
8517         add_new_edges_to_heap, speculation_useful_p,
8518         inline_small_functions,
8519         inline_small_functions, flatten_function,
8520         inline_to_all_callers_1): Update.
8522 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8524         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8525         zeros correctly.
8527 2018-01-30  Richard Biener  <rguenther@suse.de>
8529         PR tree-optimization/83008
8530         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8531         invariant and constant vector uses in stmts when they need
8532         more than one stmt.
8534 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8536         PR bootstrap/84017
8537         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8538         * configure: Regenerate.
8540 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8542         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8543         pattern.
8544         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8545         Use gen_rtx_REG rather than gen_lowpart.
8547 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8549         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
8550         rather than 0 when creating partial subregs.
8552 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8554         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
8555         of usage.
8557 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8559         PR target/81550
8560         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
8561         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
8562         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
8563         flags.  This restores the settings used before the 2017-07-24.
8564         Turning off pre increment/decrement/modify allows IVOPTS to
8565         optimize DF/SF loops where the index is an int.
8567 2018-01-29  Richard Biener  <rguenther@suse.de>
8568             Kelvin Nilsen  <kelvin@gcc.gnu.org>
8570         PR bootstrap/80867
8571         * tree-vect-stmts.c (vectorizable_call): Don't call
8572         targetm.vectorize_builtin_md_vectorized_function if callee is
8573         NULL.
8575 2018-01-22  Carl Love  <cel@us.ibm.com>
8577         * doc/extend.tex: Fix typo in second arg in
8578         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
8580 2018-01-29  Richard Biener  <rguenther@suse.de>
8582         PR tree-optimization/84086
8583         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
8584         (flush_ssaname_freelist): When SSA names were released reset
8585         the SCEV hash table.
8587 2018-01-29  Richard Biener  <rguenther@suse.de>
8589         PR tree-optimization/84057
8590         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
8591         removed paths when removing edges.
8593 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
8595         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
8596         -mfunction-return=@var{choice}.
8598 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8600         PR diagnostic/84034
8601         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8602         Handle CR like TAB.
8603         (layout::print_source_line): Likewise.
8604         (test_get_line_width_without_trailing_whitespace): Add test cases.
8606 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
8608         PR middle-end/84040
8609         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8610         debug insns.
8612 2018-01-26  Jim Wilson  <jimw@sifive.com>
8614         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8616         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8617         specified.
8619 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8621         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8622         and CMP + SUB-immediate -> SUBS.
8624 2018-01-26  Martin Sebor  <msebor@redhat.com>
8626         PR tree-optimization/83896
8627         * tree-ssa-strlen.c (get_string_len): Rename...
8628         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
8629         Avoid assuming length is constant.
8630         (handle_char_store): Use HOST_WIDE_INT for string length.
8632 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
8634         PR target/81763
8635         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8636         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8638 2018-01-26  Richard Biener  <rguenther@suse.de>
8640         PR rtl-optimization/84003
8641         * dse.c (record_store): Only record redundant stores when
8642         the earlier store aliases at least all accesses the later one does.
8644 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
8646         PR rtl-optimization/83985
8647         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8648         REG_CFA_RESTORE insns.
8649         (delete_unmarked_insns): Don't ignore separate shrink wrapping
8650         REG_CFA_RESTORE insns here.
8652         PR c/83989
8653         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8654         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8656 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8658         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8659         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8660         (arc_init): Likewise.
8661         (arc_override_options): Likewise.
8662         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8663         value.
8664         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8665         support.
8666         * config/arc/arc.h (TARGET_DBNZ): Define.
8667         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8668         properly set the tune attribute.
8669         (dbnz): Use TARGET_DBNZ guard.
8670         * config/arc/arc.opt (mtune): Add core3 option.
8672 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8674         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8675         recognize new pic like addresses.
8676         (arc_delegitimize_address): Clean up.
8678 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8680         * config/arc/arc-arches.def: Option mrf16 valid for all
8681         architectures.
8682         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8683         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8684         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8685         * config/arc/arc-tables.opt: Regenerate.
8686         * config/arc/arc.c (arc_conditional_register_usage): Handle
8687         reduced register file case.
8688         (arc_file_start): Set must have build attributes.
8689         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8690         mrf16 option value.
8691         * config/arc/arc.opt (mrf16): Add new option.
8692         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8693         * config/arc/genmultilib.awk: Handle new mrf16 option.
8694         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8695         * config/arc/t-multilib: Regenerate.
8696         * doc/invoke.texi (ARC Options): Document mrf16 option.
8698 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8700         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8701         * config/arc/arc.c (arc_handle_secure_attribute): New function.
8702         (arc_attribute_table): Add 'secure_call' attribute.
8703         (arc_print_operand): Print secure call operand.
8704         (arc_function_ok_for_sibcall): Don't optimize tail calls when
8705         secure.
8706         (arc_is_secure_call_p): New function.  * config/arc/arc.md
8707         (call_i): Add support for sjli instruction.
8708         (call_value_i): Likewise.
8709         * config/arc/constraints.md (Csc): New constraint.
8711 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8712             John Eric Martin  <John.Martin@emmicro-us.com>
8714         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8715         * config/arc/arc.c (_arc_jli_section): New struct.
8716         (arc_jli_section): New type.
8717         (rc_jli_sections): New static variable.
8718         (arc_handle_jli_attribute): New function.
8719         (arc_attribute_table): Add jli_always and jli_fixed attribute.
8720         (arc_file_end): New function.
8721         (TARGET_ASM_FILE_END): Define.
8722         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8723         (arc_add_jli_section): New function.
8724         (jli_call_scan): Likewise.
8725         (arc_reorg): Call jli_call_scan.
8726         (arc_output_addsi): Remove 'S' from printing asm operand.
8727         (arc_is_jli_call_p): New function.
8728         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8729         operand.
8730         (movhi_insn): Likewise.
8731         (movsi_insn): Likewise.
8732         (movsi_set_cc_insn): Likewise.
8733         (loadqi_update): Likewise.
8734         (load_zeroextendqisi_update): Likewise.
8735         (load_signextendqisi_update): Likewise.
8736         (loadhi_update): Likewise.
8737         (load_zeroextendhisi_update): Likewise.
8738         (load_signextendhisi_update): Likewise.
8739         (loadsi_update): Likewise.
8740         (loadsf_update): Likewise.
8741         (movsicc_insn): Likewise.
8742         (bset_insn): Likewise.
8743         (bxor_insn): Likewise.
8744         (bclr_insn): Likewise.
8745         (bmsk_insn): Likewise.
8746         (bicsi3_insn): Likewise.
8747         (cmpsi_cc_c_insn): Likewise.
8748         (movsi_ne): Likewise.
8749         (movsi_cond_exec): Likewise.
8750         (clrsbsi2): Likewise.
8751         (norm_f): Likewise.
8752         (normw): Likewise.
8753         (swap): Likewise.
8754         (divaw): Likewise.
8755         (flag): Likewise.
8756         (sr): Likewise.
8757         (kflag): Likewise.
8758         (ffs): Likewise.
8759         (ffs_f): Likewise.
8760         (fls): Likewise.
8761         (call_i): Remove 'S' asm letter, add jli instruction.
8762         (call_value_i): Likewise.
8763         * config/arc/arc.op (mjli-always): New option.
8764         * config/arc/constraints.md (Cji): New constraint.
8765         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8766         operand.
8767         (subsf3_fpx): Likewise.
8768         (mulsf3_fpx): Likewise.
8769         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8770         asm operand.
8771         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8772         function attrbutes.
8773         * doc/invoke.texi (ARC): Document mjli-always option.
8775 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
8777         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
8778         avoid addition with 0 and use incw and decw where possible.
8780 2018-01-26  Richard Biener  <rguenther@suse.de>
8782         PR tree-optimization/81082
8783         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8784         association if it requires casting to unsigned.
8785         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8786         from fold_plusminus_mult_expr to catch important cases late when
8787         range info is available.
8789 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8791         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
8792         * configure.ac (hidden_linkonce): New test.
8793         * configure: Regenerate.
8794         * config.in: Regenerate.
8796 2018-01-26  Julia Koval  <julia.koval@intel.com>
8798         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
8799         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
8800         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
8801         _mm_mask_bitshuffle_epi64_mask): Fix type.
8802         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
8803         USI_FTYPE_V4DI_V4DI_USI): Remove.
8804         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
8805         __builtin_ia32_vpshufbitqmb256_mask,
8806         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
8807         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
8808         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
8810 2018-01-26  Alan Modra  <amodra@gmail.com>
8812         PR target/84033
8813         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
8814         UNSPEC_VBPERMQ.  Sort other unspecs.
8816 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
8818         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
8820 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
8822         PR middle-end/83055
8823         * predict.c (drop_profile): Do not push/pop cfun; update also
8824         node->count.
8825         (handle_missing_profiles): Fix logic looking for zero profiles.
8827 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
8829         PR middle-end/83977
8830         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
8831         on functions with #pragma omp declare simd or functions with simd
8832         attribute.
8833         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
8834         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
8835         Remove trailing \n from warning_at calls.
8837 2018-01-25  Tom de Vries  <tom@codesourcery.com>
8839         PR target/84028
8840         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8841         for neutered workers.
8843 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
8845         PR target/68467
8846         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
8847         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
8849 2018-01-24  Jeff Law  <law@redhat.com>
8851         PR target/83994
8852         * i386.c (get_probe_interval): Move to earlier point.
8853         (ix86_compute_frame_layout): If -fstack-clash-protection and
8854         the frame is larger than the probe interval, then use pushes
8855         to save registers rather than reg->mem moves.
8856         (ix86_expand_prologue): Remove conditional for int_registers_saved
8857         assertion.
8859 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
8861         PR target/84014
8862         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
8863         min/max for never referenced object.
8865 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
8867         PR middle-end/83977
8868         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
8869         here.
8870         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
8871         attributes from DECL_ATTRIBUTES (decl) without affecting
8872         DECL_ATTRIBUTES (current_function_decl).
8873         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
8874         functions with non-NULL DECL_ABSTRACT_ORIGIN.
8876 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
8878         PR tree-optimization/83979
8879         * fold-const.c (fold_comparison): Use constant_boolean_node
8880         instead of boolean_{true,false}_node.
8882 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
8884         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
8885         with zero counts.
8887 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8889         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8890         Simplify the clause that sets the length attribute.
8891         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8892         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
8893         clause that sets the length attribute.
8894         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8896 2018-01-24  Tom de Vries  <tom@codesourcery.com>
8898         PR target/83589
8899         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
8900         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
8901         Add strict parameter.
8902         (prevent_branch_around_nothing): Insert dummy insn between branch to
8903         label and label with no ptx insn inbetween.
8904         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
8906 2018-01-24  Tom de Vries  <tom@codesourcery.com>
8908         PR target/81352
8909         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8910         for neutered threads in warp.
8911         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
8913 2018-01-24  Richard Biener  <rguenther@suse.de>
8915         PR tree-optimization/83176
8916         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
8917         operands.
8919 2018-01-24  Richard Biener  <rguenther@suse.de>
8921         PR tree-optimization/82819
8922         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
8923         code generating pluses that are no-ops in the target precision.
8925 2018-01-24  Richard Biener  <rguenther@suse.de>
8927         PR middle-end/84000
8928         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
8930 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
8932         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
8933         to merge probabilities.
8934         * predict.c (probably_never_executed): Also mark as cold functions
8935         with global 0 profile and guessed local profile.
8936         * profile-count.c (profile_probability::combine_with_count): New
8937         member function.
8938         * profile-count.h (profile_probability::operator*,
8939         profile_probability::operator*=, profile_probability::operator/,
8940         profile_probability::operator/=): Reduce precision to adjusted
8941         and set value to guessed on contradictory divisions.
8942         (profile_probability::combine_with_freq): Remove.
8943         (profile_probability::combine_wiht_count): Declare.
8944         (profile_count::force_nonzero):: Set to adjusted.
8945         (profile_count::probability_in):: Set quality to adjusted.
8946         * tree-ssa-tail-merge.c (replace_block_by): Use
8947         combine_with_count.
8949 2018-01-23  Andrew Waterman  <andrew@sifive.com>
8950             Jim Wilson  <jimw@sifive.com>
8952         * config/riscv/riscv.c (riscv_stack_boundary): New.
8953         (riscv_option_override): Set riscv_stack_boundary.  Handle
8954         riscv_preferred_stack_boundary_arg.
8955         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
8956         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
8957         (STACK_BOUNDARY): Set to riscv_stack_boundary.
8958         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
8959         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
8960         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
8962 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
8964         PR target/83905
8965         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
8966         of struct ix86_frame.
8967         (ix86_expand_epilogue): Likewise.  Add a local variable for
8968         the reg_save_offset field in struct ix86_frame.
8970 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
8972         PR tree-optimization/82604
8973         * tree-loop-distribution.c (enum partition_kind): New enum item
8974         PKIND_PARTIAL_MEMSET.
8975         (partition_builtin_p): Support above new enum item.
8976         (generate_code_for_partition): Ditto.
8977         (compute_access_range): Differentiate cases that equality can be
8978         proven at all loops, the innermost loops or no loops.
8979         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
8980         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
8981         (finalize_partitions, distribute_loop): Don't fuse partition of
8982         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
8983         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
8984         parloop is enabled.
8986 2018-01-23  Martin Liska  <mliska@suse.cz>
8988         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
8989         order to ignore the predictor.
8990         (PRED_POLYMORPHIC_CALL): Likewise.
8991         (PRED_RECURSIVE_CALL): Likewise.
8993 2018-01-23  Martin Liska  <mliska@suse.cz>
8995         * tree-profile.c (tree_profiling): Print function header to
8996         aware reader which function we are working on.
8997         * value-prof.c (gimple_find_values_to_profile): Do not print
8998         not interesting value histograms.
9000 2018-01-23  Martin Liska  <mliska@suse.cz>
9002         * profile-count.h (enum profile_quality): Add
9003         profile_uninitialized as the first value. Do not number values
9004         as they are zero based.
9005         (profile_count::verify): Update sanity check.
9006         (profile_probability::verify): Likewise.
9008 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9010         * doc/invoke.texi (ffor-scope): Deprecate.
9012 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9014         PR tree-optimization/83510
9015         * domwalk.c (set_all_edges_as_executable): New function.
9016         (dom_walker::dom_walker): Convert bool param
9017         "skip_unreachable_blocks" to enum reachability.  Move setup of
9018         edge flags to set_all_edges_as_executable and only do it when
9019         reachability is REACHABLE_BLOCKS.
9020         * domwalk.h (enum dom_walker::reachability): New enum.
9021         (dom_walker::dom_walker): Convert bool param
9022         "skip_unreachable_blocks" to enum reachability.
9023         (set_all_edges_as_executable): New decl.
9024         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9025         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9026         "reachability".
9027         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9028         but converting true to REACHABLE_BLOCKS.
9029         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9030         * tree-vrp.c
9031         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9032         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9033         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9034         REACHABLE_BLOCKS.
9035         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9036         if check_all_array_refs will be called.
9038 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9040         * tree.c (selftest::test_location_wrappers): Add more test
9041         coverage.
9043 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9045         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9046         (selftest::test_bit_in_range): Likewise.
9048 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9050         PR testsuite/83888
9051         * doc/sourcebuild.texi (vect_float): Say that the selector
9052         only describes the situation when -funsafe-math-optimizations is on.
9053         (vect_float_strict): Document.
9055 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9057         PR tree-optimization/83965
9058         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9059         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9060         instead of checking only for a reduction.
9061         (vect_recog_widen_sum_pattern): Likewise.
9063 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9065         * predict.c (probably_never_executed): Only use precise profile info.
9066         (compute_function_frequency): Skip after inlining hack since we now
9067         have quality checking.
9069 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9071         * profile-count.h (profile_probability::very_unlikely,
9072         profile_probability::unlikely, profile_probability::even): Set
9073         precision to guessed.
9075 2018-01-23  Richard Biener  <rguenther@suse.de>
9077         PR tree-optimization/83963
9078         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9079         Properly terminate dominator walk when crossing the exit edge not
9080         when visiting its source block.
9082 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9084         PR c++/83918
9085         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9086         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9088 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9090         PR tree-optimization/83957
9091         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9092         semicolon after for body surrounded by braces.
9094         PR tree-optimization/83081
9095         * profile-count.h (profile_probability::split): New method.
9096         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9097         Use profile_probability::split.
9098         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9099         when splitting a single conditional jump into 2.
9101 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9103         PR tree-optimization/69452
9104         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9105         decl.
9107 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9109         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9110         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9111         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9113 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9115         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9116         * config/rl78/rl78.md (movdi): New define_expand.
9117         * config/rl78/rl78.c (rl78_split_movdi): New function.
9119 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9121         PR target/83862
9122         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9123         no longer used.
9124         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9125         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9126         128-bit to produce an UNSPEC move to get the double word with the
9127         signbit and then a shift directly to do signbit.
9128         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9129         implementation with a new version that just does either a direct
9130         move or a regular move.  Move memory interface to separate insns.
9131         Move insns so they are next to the expander.
9132         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9133         with signbit move.  Split big and little endian case.
9134         (signbit<mode>2_dm_mem_le): Likewise.
9135         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9136         (signbit<mode>2_dm2): Likewise.
9138 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9140         * config/rl78/rl78.md (anddi3): New define_expand.
9142 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9144         * config/rl78/rl78.md (umindi3): New define_expand.
9146 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9148         * config/rl78/rl78.md (smindi3): New define_expand.
9150 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9152         * config/rl78/rl78.md (smaxdi3): New define_expand.
9154 2018-01-22  Carl Love  <cel@us.ibm.com>
9156         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9157         LVX_V1TI): Add macro expansion.
9158         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9159         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9160         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9161         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9162         Change check to determine if the instruction is a byte reversing
9163         entry.  Fix typo in comment.
9164         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9165         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9166         Add def_builtin calls for new builtins.
9167         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9168         Add define_insn expansion.
9170 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9172         * config/rl78/rl78.md (umaxdi3): New define_expand.
9174 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9176         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9177         for non-QImode registers.
9179 2018-01-22  Richard Biener  <rguenther@suse.de>
9181         PR tree-optimization/83963
9182         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9183         including the loop exit block.
9184         (scop_detection::merge_sese): Likewise.
9185         (scop_detection::add_scop): Do it here instead.
9187 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9189         * doc/sourcebuild.texi (arm_softfloat): Document.
9191 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9193         PR gcc/77734
9194         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9195         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9196         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9198 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9199             David Edelsohn  <dje.gcc@gmail.com>
9201         PR target/83946
9202         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9203         Change "crset eq" to "crset 2".
9204         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9205         (*call_indirect_aix<mode>_nospec): Likewise.
9206         (*call_value_indirect_aix<mode>_nospec): Likewise.
9207         (*call_indirect_elfv2<mode>_nospec): Likewise.
9208         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9209         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9210         change assembly output from . to $.
9211         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9212         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9213         (*tablejump<mode>_internal1_nospec): Likewise.
9215 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9217         PR target/80870
9218         * config/sh/sh_optimize_sett_clrt.cc:
9219         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9221 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9223         PR tree-optimization/83940
9224         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9225         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9226         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9227         use it to pass back the definition type.
9228         (vect_check_store_rhs): Likewise rhs_dt_out.
9229         (vect_build_gather_load_calls): Add a mask_dt argument and use
9230         it instead of a call to vect_is_simple_use.
9231         (vectorizable_store): Update calls to vect_check_load_store_mask
9232         and vect_check_store_rhs.  Use the dt returned by the latter instead
9233         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9234         instead of calls to vect_is_simple_use.  Pass the scalar rather
9235         than the vector operand to vect_is_simple_use when handling
9236         second and subsequent copies of an rhs value.
9237         (vectorizable_load): Update calls to vect_check_load_store_mask
9238         and vect_build_gather_load_calls.  Use the cached mask_dt and
9239         gs_info.offset_dt instead of calls to vect_is_simple_use.
9241 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9243         PR middle-end/83945
9244         * tree-emutls.c: Include gimplify.h.
9245         (lower_emutls_2): New function.
9246         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9247         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9248         it before further processing.
9250         PR target/83930
9251         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9252         UINTVAL (trueop1) instead of INTVAL (op1).
9254 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9256         PR debug/81570
9257         PR debug/83728
9258         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9259         INCOMING_FRAME_SP_OFFSET if not defined.
9260         (scan_trace): Add ENTRY argument.  If true and
9261         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9262         emit a note to adjust the CFA offset.
9263         (create_cfi_notes): Adjust scan_trace callers.
9264         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9265         INCOMING_FRAME_SP_OFFSET in the CIE.
9266         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9267         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9268         Likewise.
9269         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9270         * doc/tm.texi: Regenerated.
9272 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9274         PR rtl-optimization/83147
9275         * lra-constraints.c (remove_inheritance_pseudos): Use
9276         lra_substitute_pseudo_within_insn.
9278 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9279             Cesar Philippidis  <cesar@codesourcery.com>
9281         PR target/83920
9282         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9284 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9286         PR target/83790
9287         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9288         spaces for function labels.
9290 2018-01-19  Martin Liska  <mliska@suse.cz>
9292         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9293         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9294         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9295         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9296         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9297         (PRED_CONST_RETURN): Change from 69 to 65.
9298         (PRED_NULL_RETURN): Change from 91 to 71.
9299         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9300         (PRED_LOOP_GUARD): Change from 66 to 73.
9302 2018-01-19  Martin Liska  <mliska@suse.cz>
9304         * predict.c (predict_insn_def): Add new assert.
9305         (struct branch_predictor): Change type to signed integer.
9306         (test_prediction_value_range): Amend test to cover
9307         PROB_UNINITIALIZED.
9308         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9309         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9310         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9311         (PRED_LOOP_IV_COMPARE): Likewise.
9312         * predict.h (PROB_UNINITIALIZED): Define new constant.
9314 2018-01-19  Martin Liska  <mliska@suse.cz>
9316         * predict.c (dump_prediction): Add new format for
9317         analyze_brprob.py script which is enabled with -details
9318         suboption.
9319         * profile-count.h (precise_p): New function.
9321 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9323         PR tree-optimization/83922
9324         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9325         there are no statements that need masking.
9326         (vect_active_double_reduction_p): New function.
9327         (vect_analyze_loop_operations): Use it when handling phis that
9328         are not in the loop header.
9330 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9332         PR tree-optimization/83914
9333         * tree-vect-loop.c (vectorizable_induction): Don't convert
9334         init_expr or apply the peeling adjustment for inductions
9335         that are nested within the vectorized loop.
9337 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9339         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9340         instead of NEG.
9342 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9344         PR sanitizer/81715
9345         PR testsuite/83882
9346         * function.h (gimplify_parameters): Add gimple_seq * argument.
9347         * function.c: Include gimple.h and options.h.
9348         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9349         for the added local temporaries if needed.
9350         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9351         if there are any parameter cleanups, wrap whole body into a
9352         try/finally with the cleanups.
9354 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9356         PR target/82964
9357         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9358         Use GET_MODE_CLASS for scalar floating point.
9360 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9362         PR ipa/82256
9363         patch by PaX Team
9364         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9365         Fix call of call_cgraph_insertion_hooks.
9367 2018-01-18  Martin Sebor  <msebor@redhat.com>
9369         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9371 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9373         PR ipa/83619
9374         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9375         frequencies.
9377 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9379         PR other/70268
9380         * common.opt: (-ffile-prefix-map): New option.
9381         * opts.c (common_handle_option): Defer it.
9382         * opts-global.c (handle_common_deferred_options): Handle it.
9383         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9384         * file-prefix-map.h: New file.
9385         (remap_debug_filename, add_debug_prefix_map): ...here.
9386         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9387         * final.c (debug_prefix_map, add_debug_prefix_map
9388         remap_debug_filename): Move to...
9389         * file-prefix-map.c: New file.
9390         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9391         generalize, get rid of alloca(), use strrchr() instead of strchr().
9392         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9393         Implement in terms of add_prefix_map().
9394         (remap_macro_filename, remap_debug_filename): Implement in term of
9395         remap_filename().
9396         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9397         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9398         * dbxout.c: Include file-prefix-map.h.
9399         * varasm.c: Likewise.
9400         * vmsdbgout.c: Likewise.
9401         * xcoffout.c: Likewise.
9402         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9403         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9404         * doc/invoke.texi (-ffile-prefix-map): Document.
9405         (-fdebug-prefix-map): Update description.
9407 2018-01-18  Martin Liska  <mliska@suse.cz>
9409         * config/i386/i386.c (indirect_thunk_name): Document that also
9410         lfence is emitted.
9411         (output_indirect_thunk): Document why both instructions
9412         (pause and lfence) are generated.
9414 2018-01-18  Richard Biener  <rguenther@suse.de>
9416         PR tree-optimization/83887
9417         * graphite-scop-detection.c
9418         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9419         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9420         (scop_detection::merge_sese): Re-implement with a flood-fill
9421         algorithm that properly finds a SESE region if it exists.
9423 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9425         PR c/61240
9426         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9427         pointer_diff optimizations use view_convert instead of convert.
9429 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9431         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9432         Generate different code for -mno-speculate-indirect-jumps.
9433         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9434         (*call_indirect_aix<mode>): Disable for
9435         -mno-speculate-indirect-jumps.
9436         (*call_indirect_aix<mode>_nospec): New define_insn.
9437         (*call_value_indirect_aix<mode>): Disable for
9438         -mno-speculate-indirect-jumps.
9439         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9440         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9441         -mno-speculate-indirect-jumps.
9442         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9444 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9446         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9447         long double type, set the flags for noting the default long double
9448         type, even if we don't pass or return a long double type.
9450 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9452         PR ipa/83051
9453         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9454         failure.
9456 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9458         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9459         support for merge[hl].
9460         (fold_mergehl_helper): New helper function.
9461         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9462         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9463         (altivec_vmrglw_direct): Add xxmrglw insn.
9465 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9467         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9468         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9470 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9472         PR lto/83121
9473         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9474         call the lto_location_cache before reading the
9475         DECL_SOURCE_LOCATION of the types.
9477 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9478             Richard Sandiford  <richard.sandiford@linaro.org>
9480         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9481         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9482         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9483         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9484         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9485         Add declaration.
9486         * config/aarch64/constraints.md (aarch64_movti_operand):
9487         Limit immediates.
9488         * config/aarch64/predicates.md (Uti): Add new constraint.
9490 2018-01-17 Carl Love  <cel@us.ibm.com>
9492         * config/rs6000/vsx.md (define_expand xl_len_r,
9493         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9494         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9495         lxvll.
9496         (define_expand, define_insn): Move the shift left from  the
9497         define_insn to the define_expand for lxvl and stxvl instructions.
9498         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9499         and XL_LEN_R definitions to PURE.
9501 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9503         * config/i386/i386.c (indirect_thunk_name): Declare regno
9504         as unsigned int.  Compare regno with INVALID_REGNUM.
9505         (output_indirect_thunk): Ditto.
9506         (output_indirect_thunk_function): Ditto.
9507         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9508         in the call to output_indirect_thunk_function.
9510 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9512         PR middle-end/83884
9513         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9514         rather than the size of inner_type to determine the stack slot size
9515         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9517 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9519         PR target/83546
9520         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9521         to PTA_SILVERMONT.
9523 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9525         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9526         endian Linux systems to optionally enable multilibs for selecting
9527         the long double type if the user configured an explicit type.
9528         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9529         have no long double multilibs if not defined.
9530         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9531         warn if the user used -mabi={ieee,ibm}longdouble and we built
9532         multilibs for long double.
9533         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9534         appropriate multilib option.
9535         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9536         multilib options.
9537         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9538         for building long double multilibs.
9539         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9541 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
9543         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9544         copies.
9546         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9547         64 bits.
9548         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9549         128 bits.
9551         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
9552         variables.
9554         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
9555         return value.
9557 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9559         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
9560         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
9562 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9564         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
9565         different rtl trees depending on TARGET_64BIT.
9566         (rs6000_gen_lvx): Likewise.
9568 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9570         * config/visium/visium.md (nop): Tweak comment.
9571         (hazard_nop): Likewise.
9573 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9575         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
9576         -mspeculate-indirect-jumps.
9577         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
9578         for -mno-speculate-indirect-jumps.
9579         (*call_indirect_elfv2<mode>_nospec): New define_insn.
9580         (*call_value_indirect_elfv2<mode>): Disable for
9581         -mno-speculate-indirect-jumps.
9582         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
9583         (indirect_jump): Emit different RTL for
9584         -mno-speculate-indirect-jumps.
9585         (*indirect_jump<mode>): Disable for
9586         -mno-speculate-indirect-jumps.
9587         (*indirect_jump<mode>_nospec): New define_insn.
9588         (tablejump): Emit different RTL for
9589         -mno-speculate-indirect-jumps.
9590         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
9591         (tablejumpsi_nospec): New define_expand.
9592         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
9593         (tablejumpdi_nospec): New define_expand.
9594         (*tablejump<mode>_internal1): Disable for
9595         -mno-speculate-indirect-jumps.
9596         (*tablejump<mode>_internal1_nospec): New define_insn.
9597         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9598         option.
9600 2018-01-16  Artyom Skrobov tyomitch@gmail.com
9602         * caller-save.c (insert_save): Drop unnecessary parameter.  All
9603         callers updated.
9605 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9606             Richard Biener  <rguenth@suse.de>
9608         PR libgomp/83590
9609         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9610         return early, inline manually is_gimple_sizepos.  Make sure if we
9611         call gimplify_expr we don't end up with a gimple constant.
9612         * tree.c (variably_modified_type_p): Don't return true for
9613         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
9614         * gimplify.h (is_gimple_sizepos): Remove.
9616 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9618         PR tree-optimization/83857
9619         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9620         vectorizable_live_operation for pure SLP statements.
9621         (vectorizable_live_operation): Handle PHIs.
9623 2018-01-16  Richard Biener  <rguenther@suse.de>
9625         PR tree-optimization/83867
9626         * tree-vect-stmts.c (vect_transform_stmt): Precompute
9627         nested_in_vect_loop_p since the scalar stmt may get invalidated.
9629 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9631         PR c/83844
9632         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9633         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9634         If off is not INTEGER_CST, issue a may not be aligned warning
9635         rather than isn't aligned.  Use isn%'t rather than isn't.
9636         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9637         into MULT_EXPR.
9638         <case MULT_EXPR>: Improve the case when bottom and one of the
9639         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9640         operand, in that case check if the other operand is multiple of
9641         bottom divided by the INTEGER_CST operand.
9643 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9645         PR target/83858
9646         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9647         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9648         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9649         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9650         * config/pa/pa.c (pa_function_arg_advance): Likewise.
9651         (pa_function_arg, pa_arg_partial_bytes): Likewise.
9652         (pa_function_arg_size): New function.
9654 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9656         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9657         in a separate statement.
9659 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9661         PR tree-optimization/83847
9662         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9663         group gathers and scatters.
9665 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9667         PR rtl-optimization/86620
9668         * params.def (max-sched-ready-insns): Bump minimum value to 1.
9670         PR rtl-optimization/83213
9671         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9672         to last if both are JUMP_INSNs.
9674         PR tree-optimization/83843
9675         * gimple-ssa-store-merging.c
9676         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9677         store_immediate_info for bswap/nop orig_stores.
9679 2018-01-15  Andrew Waterman  <andrew@sifive.com>
9681         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9682         !TARGET_MUL.
9683         <UDIV>: Increase cost if !TARGET_DIV.
9685 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
9687         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9688         (define_attr "cr_logical_3op"): New.
9689         (cceq_ior_compare): Adjust.
9690         (cceq_ior_compare_complement): Adjust.
9691         (*cceq_rev_compare): Adjust.
9692         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9693         (is_cracked_insn): Adjust.
9694         (insn_must_be_first_in_group): Adjust.
9695         * config/rs6000/40x.md: Adjust.
9696         * config/rs6000/440.md: Adjust.
9697         * config/rs6000/476.md: Adjust.
9698         * config/rs6000/601.md: Adjust.
9699         * config/rs6000/603.md: Adjust.
9700         * config/rs6000/6xx.md: Adjust.
9701         * config/rs6000/7450.md: Adjust.
9702         * config/rs6000/7xx.md: Adjust.
9703         * config/rs6000/8540.md: Adjust.
9704         * config/rs6000/cell.md: Adjust.
9705         * config/rs6000/e300c2c3.md: Adjust.
9706         * config/rs6000/e500mc.md: Adjust.
9707         * config/rs6000/e500mc64.md: Adjust.
9708         * config/rs6000/e5500.md: Adjust.
9709         * config/rs6000/e6500.md: Adjust.
9710         * config/rs6000/mpc.md: Adjust.
9711         * config/rs6000/power4.md: Adjust.
9712         * config/rs6000/power5.md: Adjust.
9713         * config/rs6000/power6.md: Adjust.
9714         * config/rs6000/power7.md: Adjust.
9715         * config/rs6000/power8.md: Adjust.
9716         * config/rs6000/power9.md: Adjust.
9717         * config/rs6000/rs64.md: Adjust.
9718         * config/rs6000/titan.md: Adjust.
9720 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9722         * config/i386/predicates.md (indirect_branch_operand): Rewrite
9723         ix86_indirect_branch_register logic.
9725 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9727         * config/i386/constraints.md (Bs): Update
9728         ix86_indirect_branch_register check.  Don't check
9729         ix86_indirect_branch_register with GOT_memory_operand.
9730         (Bw): Likewise.
9731         * config/i386/predicates.md (GOT_memory_operand): Don't check
9732         ix86_indirect_branch_register here.
9733         (GOT32_symbol_operand): Likewise.
9735 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9737         * config/i386/predicates.md (constant_call_address_operand):
9738         Rewrite ix86_indirect_branch_register logic.
9739         (sibcall_insn_operand): Likewise.
9741 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9743         * config/i386/constraints.md (Bs): Replace
9744         ix86_indirect_branch_thunk_register with
9745         ix86_indirect_branch_register.
9746         (Bw): Likewise.
9747         * config/i386/i386.md (indirect_jump): Likewise.
9748         (tablejump): Likewise.
9749         (*sibcall_memory): Likewise.
9750         (*sibcall_value_memory): Likewise.
9751         Peepholes of indirect call and jump via memory: Likewise.
9752         * config/i386/i386.opt: Likewise.
9753         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9754         (GOT_memory_operand): Likewise.
9755         (call_insn_operand): Likewise.
9756         (sibcall_insn_operand): Likewise.
9757         (GOT32_symbol_operand): Likewise.
9759 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9761         PR middle-end/83837
9762         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9763         type rather than type addr's type points to.
9764         (expand_omp_atomic_mutex): Likewise.
9765         (expand_omp_atomic): Likewise.
9767 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9769         PR target/83839
9770         * config/i386/i386.c (output_indirect_thunk_function): Use
9771         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9772         for  __x86_return_thunk.
9774 2018-01-15  Richard Biener  <rguenther@suse.de>
9776         PR middle-end/83850
9777         * expmed.c (extract_bit_field_1): Fix typo.
9779 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9781         PR target/83687
9782         * config/arm/iterators.md (VF): New mode iterator.
9783         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9784         Remove integer-related logic from pattern.
9785         (neon_vabd<mode>_3): Likewise.
9787 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9789         PR middle-end/82694
9790         * common.opt (fstrict-overflow): No longer an alias.
9791         (fwrapv-pointer): New option.
9792         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
9793         also for pointer types based on flag_wrapv_pointer.
9794         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
9795         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
9796         opts->x_flag_wrapv got set.
9797         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
9798         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
9799         POINTER_TYPE_OVERFLOW_UNDEFINED.
9800         * match.pd: Likewise in address comparison pattern.
9801         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
9803 2018-01-15  Richard Biener  <rguenther@suse.de>
9805         PR lto/83804
9806         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
9807         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
9808         Reset type names to their identifier if their TYPE_DECL doesn't
9809         have linkage (and thus is used for ODR and devirt).
9810         (save_debug_info_for_decl): Remove.
9811         (save_debug_info_for_type): Likewise.
9812         (add_tree_to_fld_list): Adjust.
9813         * tree-pretty-print.c (dump_generic_node): Make dumping of
9814         type names more robust.
9816 2018-01-15  Richard Biener  <rguenther@suse.de>
9818         * BASE-VER: Bump to 8.0.1.
9820 2018-01-14  Martin Sebor  <msebor@redhat.com>
9822         PR other/83508
9823         * builtins.c (check_access): Avoid warning when the no-warning bit
9824         is set.
9826 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
9828         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
9829         * ira-color (allocno_hard_regs_compare): Likewise.
9831 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
9833         PR target/83013
9834         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
9835         Use .pushsection/.popsection.
9837 2018-01-14  Martin Sebor  <msebor@redhat.com>
9839         PR c++/81327
9840         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
9842 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
9844         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
9845         entry from extra_headers.
9846         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
9847         extra_headers, make the list bitwise identical to the i?86-*-* one.
9849 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9851         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
9852         -mcmodel=large with -mindirect-branch=thunk,
9853         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
9854         -mfunction-return=thunk-extern.
9855         * doc/invoke.texi: Document -mcmodel=large is incompatible with
9856         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
9857         -mfunction-return=thunk and -mfunction-return=thunk-extern.
9859 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9861         * config/i386/i386.c (print_reg): Print the name of the full
9862         integer register without '%'.
9863         (ix86_print_operand): Handle 'V'.
9864          * doc/extend.texi: Document 'V' modifier.
9866 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9868         * config/i386/constraints.md (Bs): Disallow memory operand for
9869         -mindirect-branch-register.
9870         (Bw): Likewise.
9871         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9872         (GOT_memory_operand): Likewise.
9873         (call_insn_operand): Likewise.
9874         (sibcall_insn_operand): Likewise.
9875         (GOT32_symbol_operand): Likewise.
9876         * config/i386/i386.md (indirect_jump): Call convert_memory_address
9877         for -mindirect-branch-register.
9878         (tablejump): Likewise.
9879         (*sibcall_memory): Likewise.
9880         (*sibcall_value_memory): Likewise.
9881         Disallow peepholes of indirect call and jump via memory for
9882         -mindirect-branch-register.
9883         (*call_pop): Replace m with Bw.
9884         (*call_value_pop): Likewise.
9885         (*sibcall_pop_memory): Replace m with Bs.
9886         * config/i386/i386.opt (mindirect-branch-register): New option.
9887         * doc/invoke.texi: Document -mindirect-branch-register option.
9889 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9891         * config/i386/i386-protos.h (ix86_output_function_return): New.
9892         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
9893         set function_return_type.
9894         (indirect_thunk_name): Add ret_p to indicate thunk for function
9895         return.
9896         (output_indirect_thunk_function): Pass false to
9897         indirect_thunk_name.
9898         (ix86_output_indirect_branch_via_reg): Likewise.
9899         (ix86_output_indirect_branch_via_push): Likewise.
9900         (output_indirect_thunk_function): Create alias for function
9901         return thunk if regno < 0.
9902         (ix86_output_function_return): New function.
9903         (ix86_handle_fndecl_attribute): Handle function_return.
9904         (ix86_attribute_table): Add function_return.
9905         * config/i386/i386.h (machine_function): Add
9906         function_return_type.
9907         * config/i386/i386.md (simple_return_internal): Use
9908         ix86_output_function_return.
9909         (simple_return_internal_long): Likewise.
9910         * config/i386/i386.opt (mfunction-return=): New option.
9911         (indirect_branch): Mention -mfunction-return=.
9912         * doc/extend.texi: Document function_return function attribute.
9913         * doc/invoke.texi: Document -mfunction-return= option.
9915 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9917         * config/i386/i386-opts.h (indirect_branch): New.
9918         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
9919         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
9920         with local indirect jump when converting indirect call and jump.
9921         (ix86_set_indirect_branch_type): New.
9922         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
9923         (indirectlabelno): New.
9924         (indirect_thunk_needed): Likewise.
9925         (indirect_thunk_bnd_needed): Likewise.
9926         (indirect_thunks_used): Likewise.
9927         (indirect_thunks_bnd_used): Likewise.
9928         (INDIRECT_LABEL): Likewise.
9929         (indirect_thunk_name): Likewise.
9930         (output_indirect_thunk): Likewise.
9931         (output_indirect_thunk_function): Likewise.
9932         (ix86_output_indirect_branch_via_reg): Likewise.
9933         (ix86_output_indirect_branch_via_push): Likewise.
9934         (ix86_output_indirect_branch): Likewise.
9935         (ix86_output_indirect_jmp): Likewise.
9936         (ix86_code_end): Call output_indirect_thunk_function if needed.
9937         (ix86_output_call_insn): Call ix86_output_indirect_branch if
9938         needed.
9939         (ix86_handle_fndecl_attribute): Handle indirect_branch.
9940         (ix86_attribute_table): Add indirect_branch.
9941         * config/i386/i386.h (machine_function): Add indirect_branch_type
9942         and has_local_indirect_jump.
9943         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
9944         to true.
9945         (tablejump): Likewise.
9946         (*indirect_jump): Use ix86_output_indirect_jmp.
9947         (*tablejump_1): Likewise.
9948         (simple_return_indirect_internal): Likewise.
9949         * config/i386/i386.opt (mindirect-branch=): New option.
9950         (indirect_branch): New.
9951         (keep): Likewise.
9952         (thunk): Likewise.
9953         (thunk-inline): Likewise.
9954         (thunk-extern): Likewise.
9955         * doc/extend.texi: Document indirect_branch function attribute.
9956         * doc/invoke.texi: Document -mindirect-branch= option.
9958 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
9960         PR ipa/83051
9961         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
9963 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
9965         * ipa-inline.c (want_inline_small_function_p): Return false if
9966         inlining has already failed with CIF_FINAL_ERROR.
9967         (update_caller_keys): Call want_inline_small_function_p before
9968         can_inline_edge_p.
9969         (update_callee_keys): Likewise.
9971 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9973         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
9974         New function.
9975         (rs6000_quadword_masked_address_p): Likewise.
9976         (quad_aligned_load_p): Likewise.
9977         (quad_aligned_store_p): Likewise.
9978         (const_load_sequence_p): Add comment to describe the outer-most loop.
9979         (mimic_memory_attributes_and_flags): New function.
9980         (rs6000_gen_stvx): Likewise.
9981         (replace_swapped_aligned_store): Likewise.
9982         (rs6000_gen_lvx): Likewise.
9983         (replace_swapped_aligned_load): Likewise.
9984         (replace_swapped_load_constant): Capitalize argument name in
9985         comment describing this function.
9986         (rs6000_analyze_swaps): Add a third pass to search for vector loads
9987         and stores that access quad-word aligned addresses and replace
9988         with stvx or lvx instructions when appropriate.
9989         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
9990         New function prototype.
9991         (rs6000_quadword_masked_address_p): Likewise.
9992         (rs6000_gen_lvx): Likewise.
9993         (rs6000_gen_stvx): Likewise.
9994         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
9995         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
9996         when memory address is aligned.
9997         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
9998         this split to select lvx instruction when memory address is aligned.
9999         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10000         instruction when memory address is aligned.
10001         (*vsx_le_perm_load_v16qi): Likewise.
10002         (four unnamed splitters): Modify to select the stvx instruction
10003         when memory is aligned.
10005 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10007         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10008         which appears in the queue multiple times.
10010 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10011             Alan Hayward  <alan.hayward@arm.com>
10012             David Sherwood  <david.sherwood@arm.com>
10014         * tree-vectorizer.h (vec_lower_bound): New structure.
10015         (_loop_vec_info): Add check_nonzero and lower_bounds.
10016         (LOOP_VINFO_CHECK_NONZERO): New macro.
10017         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10018         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10019         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10020         fields.  Make seg_len the distance travelled, not including the
10021         access size.
10022         (dr_direction_indicator): Declare.
10023         (dr_zero_step_indicator): Likewise.
10024         (dr_known_forward_stride_p): Likewise.
10025         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10026         tree-ssanames.h.
10027         (runtime_alias_check_p): Allow runtime alias checks with
10028         variable strides.
10029         (operator ==): Compare access_size and align.
10030         (prune_runtime_alias_test_list): Rework for new distinction between
10031         the access_size and seg_len.
10032         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10033         segment lengths.
10034         (get_segment_min_max): New function.
10035         (create_intersect_range_checks): Use it.
10036         (dr_step_indicator): New function.
10037         (dr_direction_indicator): Likewise.
10038         (dr_zero_step_indicator): Likewise.
10039         (dr_known_forward_stride_p): Likewise.
10040         * tree-loop-distribution.c (data_ref_segment_size): Return
10041         DR_STEP * (niters - 1).
10042         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10043         constructor.
10044         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10045         (vect_preserves_scalar_order_p): New function, split out from...
10046         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10047         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10048         (vect_vfa_access_size): New function.
10049         (vect_vfa_align): Likewise.
10050         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10051         (dump_lower_bound): New function.
10052         (vect_check_lower_bound): Likewise.
10053         (vect_small_gap_p): Likewise.
10054         (vectorizable_with_step_bound_p): Likewise.
10055         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10056         depencies if the vectorization factor is 1.  Convert the checks
10057         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10058         a bunds check for variable steps if the minimum required step is
10059         relatively small. Update calls to the dr_with_seg_len
10060         constructor and to vect_compile_time_alias.
10061         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10062         function.
10063         (vect_loop_versioning): Call it.
10064         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10065         when retrying.
10066         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10068 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10069             Alan Hayward  <alan.hayward@arm.com>
10070             David Sherwood  <david.sherwood@arm.com>
10072         * doc/sourcebuild.texi (vect_scatter_store): Document.
10073         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10074         optabs.
10075         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10076         Document.
10077         * genopinit.c (main): Add supports_vec_scatter_store and
10078         supports_vec_scatter_store_cached to target_optabs.
10079         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10080         IFN_MASK_SCATTER_STORE.
10081         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10082         functions.
10083         * internal-fn.h (internal_store_fn_p): Declare.
10084         (internal_fn_stored_value_index): Likewise.
10085         * internal-fn.c (scatter_store_direct): New macro.
10086         (expand_scatter_store_optab_fn): New function.
10087         (direct_scatter_store_optab_supported_p): New macro.
10088         (internal_store_fn_p): New function.
10089         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10090         IFN_MASK_SCATTER_STORE.
10091         (internal_fn_mask_index): Likewise.
10092         (internal_fn_stored_value_index): New function.
10093         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10094         for scatter stores.
10095         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10096         * optabs-query.c (supports_vec_scatter_store_p): New function.
10097         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10098         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10099         true for scatter stores.
10100         (vect_gather_scatter_fn_p): Handle scatter stores too.
10101         (vect_check_gather_scatter): Consider using scatter stores if
10102         supports_vec_scatter_store_p.
10103         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10104         scatter stores too.
10105         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10106         internal_fn_stored_value_index.
10107         (check_load_store_masking): Handle scatter stores too.
10108         (vect_get_store_rhs): Make public.
10109         (vectorizable_call): Use internal_store_fn_p.
10110         (vectorizable_store): Handle scatter store internal functions.
10111         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10112         when deciding whether the end of the group has been reached.
10113         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10114         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10115         (mask_scatter_store<mode>): New insns.
10117 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10118             Alan Hayward  <alan.hayward@arm.com>
10119             David Sherwood  <david.sherwood@arm.com>
10121         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10122         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10123         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10124         function.
10125         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10126         Use vect_truncate_gather_scatter_offset if we can't treat the
10127         operation as a normal gather load or scatter store.
10128         (get_group_load_store_type): Take the gather_scatter_info
10129         as argument.  Try using a gather load or scatter store for
10130         single-element groups.
10131         (get_load_store_type): Update calls to get_group_load_store_type
10132         and vect_use_strided_gather_scatters_p.
10134 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10135             Alan Hayward  <alan.hayward@arm.com>
10136             David Sherwood  <david.sherwood@arm.com>
10138         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10139         optional tree argument.
10140         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10141         null target hooks.
10142         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10143         but continue to use the current value as a fallback.
10144         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10145         to compare the updates.
10146         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10147         (get_load_store_type): Use it when handling a strided access.
10148         (vect_get_strided_load_store_ops): New function.
10149         (vect_get_data_ptr_increment): Likewise.
10150         (vectorizable_load): Handle strided gather loads.  Always pass
10151         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10153 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10154             Alan Hayward  <alan.hayward@arm.com>
10155             David Sherwood  <david.sherwood@arm.com>
10157         * doc/md.texi (gather_load@var{m}): Document.
10158         (mask_gather_load@var{m}): Likewise.
10159         * genopinit.c (main): Add supports_vec_gather_load and
10160         supports_vec_gather_load_cached to target_optabs.
10161         * optabs-tree.c (init_tree_optimization_optabs): Use
10162         ggc_cleared_alloc to allocate target_optabs.
10163         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10164         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10165         functions.
10166         * internal-fn.h (internal_load_fn_p): Declare.
10167         (internal_gather_scatter_fn_p): Likewise.
10168         (internal_fn_mask_index): Likewise.
10169         (internal_gather_scatter_fn_supported_p): Likewise.
10170         * internal-fn.c (gather_load_direct): New macro.
10171         (expand_gather_load_optab_fn): New function.
10172         (direct_gather_load_optab_supported_p): New macro.
10173         (direct_internal_fn_optab): New function.
10174         (internal_load_fn_p): Likewise.
10175         (internal_gather_scatter_fn_p): Likewise.
10176         (internal_fn_mask_index): Likewise.
10177         (internal_gather_scatter_fn_supported_p): Likewise.
10178         * optabs-query.c (supports_at_least_one_mode_p): New function.
10179         (supports_vec_gather_load_p): Likewise.
10180         * optabs-query.h (supports_vec_gather_load_p): Declare.
10181         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10182         and memory_type field.
10183         (NUM_PATTERNS): Bump to 15.
10184         * tree-vect-data-refs.c: Include internal-fn.h.
10185         (vect_gather_scatter_fn_p): New function.
10186         (vect_describe_gather_scatter_call): Likewise.
10187         (vect_check_gather_scatter): Try using internal functions for
10188         gather loads.  Recognize existing calls to a gather load function.
10189         (vect_analyze_data_refs): Consider using gather loads if
10190         supports_vec_gather_load_p.
10191         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10192         (vect_get_gather_scatter_offset_type): Likewise.
10193         (vect_convert_mask_for_vectype): Likewise.
10194         (vect_add_conversion_to_patterm): Likewise.
10195         (vect_try_gather_scatter_pattern): Likewise.
10196         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10197         (vect_vect_recog_func_ptrs): Add it.
10198         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10199         internal_fn_mask_index and internal_gather_scatter_fn_p.
10200         (check_load_store_masking): Take the gather_scatter_info as an
10201         argument and handle gather loads.
10202         (vect_get_gather_scatter_ops): New function.
10203         (vectorizable_call): Check internal_load_fn_p.
10204         (vectorizable_load): Likewise.  Handle gather load internal
10205         functions.
10206         (vectorizable_store): Update call to check_load_store_masking.
10207         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10208         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10209         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10210         (aarch64_gather_scale_operand_d): New predicates.
10211         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10212         (mask_gather_load<mode>): New insns.
10214 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10215             Alan Hayward  <alan.hayward@arm.com>
10216             David Sherwood  <david.sherwood@arm.com>
10218         * optabs.def (fold_left_plus_optab): New optab.
10219         * doc/md.texi (fold_left_plus_@var{m}): Document.
10220         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10221         * internal-fn.c (fold_left_direct): Define.
10222         (expand_fold_left_optab_fn): Likewise.
10223         (direct_fold_left_optab_supported_p): Likewise.
10224         * fold-const-call.c (fold_const_fold_left): New function.
10225         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10226         * tree-parloops.c (valid_reduction_p): New function.
10227         (gather_scalar_reductions): Use it.
10228         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10229         (vect_finish_replace_stmt): Declare.
10230         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10231         (needs_fold_left_reduction_p): New function, split out from...
10232         (vect_is_simple_reduction): ...here.  Accept reductions that
10233         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10234         (vect_force_simple_reduction): Also store the reduction type in
10235         the assignment's STMT_VINFO_REDUC_TYPE.
10236         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10237         (merge_with_identity): New function.
10238         (vect_expand_fold_left): Likewise.
10239         (vectorize_fold_left_reduction): Likewise.
10240         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10241         scalar phi in place for it.  Check for target support and reject
10242         cases that would reassociate the operation.  Defer the transform
10243         phase to vectorize_fold_left_reduction.
10244         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10245         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10246         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10248 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10250         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10251         call to ifc_temp_var.
10253 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10254             Alan Hayward  <alan.hayward@arm.com>
10255             David Sherwood  <david.sherwood@arm.com>
10257         * target.def (legitimize_address_displacement): Take the original
10258         offset as a poly_int.
10259         * targhooks.h (default_legitimize_address_displacement): Update
10260         accordingly.
10261         * targhooks.c (default_legitimize_address_displacement): Likewise.
10262         * doc/tm.texi: Regenerate.
10263         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10264         as an argument, moving assert of ad->disp == ad->disp_term to...
10265         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10266         Try calling targetm.legitimize_address_displacement before expanding
10267         the address rather than afterwards, and adjust for the new interface.
10268         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10269         Match the new hook interface.  Handle SVE addresses.
10270         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10271         new hook interface.
10273 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10275         * Makefile.in (OBJS): Add early-remat.o.
10276         * target.def (select_early_remat_modes): New hook.
10277         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10278         * doc/tm.texi: Regenerate.
10279         * targhooks.h (default_select_early_remat_modes): Declare.
10280         * targhooks.c (default_select_early_remat_modes): New function.
10281         * timevar.def (TV_EARLY_REMAT): New timevar.
10282         * passes.def (pass_early_remat): New pass.
10283         * tree-pass.h (make_pass_early_remat): Declare.
10284         * early-remat.c: New file.
10285         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10286         function.
10287         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10289 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10290             Alan Hayward  <alan.hayward@arm.com>
10291             David Sherwood  <david.sherwood@arm.com>
10293         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10294         vfm1 with a bound_epilog parameter.
10295         (vect_do_peeling): Update calls accordingly, and move the prologue
10296         call earlier in the function.  Treat the base bound_epilog as 0 for
10297         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10298         this base when peeling for gaps.
10299         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10300         with fully-masked loops.
10301         (vect_estimate_min_profitable_iters): Handle the single peeled
10302         iteration in that case.
10304 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10305             Alan Hayward  <alan.hayward@arm.com>
10306             David Sherwood  <david.sherwood@arm.com>
10308         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10309         single-element interleaving even if the size is not a power of 2.
10310         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10311         accesses for single-element interleaving if the group size is
10312         not a power of 2.
10314 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10315             Alan Hayward  <alan.hayward@arm.com>
10316             David Sherwood  <david.sherwood@arm.com>
10318         * doc/md.texi (fold_extract_last_@var{m}): Document.
10319         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10320         * optabs.def (fold_extract_last_optab): New optab.
10321         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10322         * internal-fn.c (fold_extract_direct): New macro.
10323         (expand_fold_extract_optab_fn): Likewise.
10324         (direct_fold_extract_optab_supported_p): Likewise.
10325         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10326         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10327         EXTRACT_LAST_REDUCTION.
10328         (get_initial_def_for_reduction): Do not create an initial vector
10329         for EXTRACT_LAST_REDUCTION reductions.
10330         (vectorizable_reduction): Leave the scalar phi in place for
10331         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10332         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10333         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10334         transform phase to vectorizable_condition.
10335         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10336         split out from...
10337         (vect_finish_stmt_generation): ...here.
10338         (vect_finish_replace_stmt): New function.
10339         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10340         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10341         pattern.
10342         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10344 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10345             Alan Hayward  <alan.hayward@arm.com>
10346             David Sherwood  <david.sherwood@arm.com>
10348         * doc/md.texi (extract_last_@var{m}): Document.
10349         * optabs.def (extract_last_optab): New optab.
10350         * internal-fn.def (EXTRACT_LAST): New internal function.
10351         * internal-fn.c (cond_unary_direct): New macro.
10352         (expand_cond_unary_optab_fn): Likewise.
10353         (direct_cond_unary_optab_supported_p): Likewise.
10354         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10355         loops using EXTRACT_LAST.
10356         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10357         (extract_last_<mode>): ...this optab.
10358         (vec_extract<mode><Vel>): Update accordingly.
10360 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10361             Alan Hayward  <alan.hayward@arm.com>
10362             David Sherwood  <david.sherwood@arm.com>
10364         * target.def (empty_mask_is_expensive): New hook.
10365         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10366         * doc/tm.texi: Regenerate.
10367         * targhooks.h (default_empty_mask_is_expensive): Declare.
10368         * targhooks.c (default_empty_mask_is_expensive): New function.
10369         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10370         if the target says that empty masks are expensive.
10371         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10372         New function.
10373         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10375 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10376             Alan Hayward  <alan.hayward@arm.com>
10377             David Sherwood  <david.sherwood@arm.com>
10379         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10380         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10381         (vect_use_loop_mask_for_alignment_p): New function.
10382         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10383         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10384         niters_skip argument.  Make sure that the first niters_skip elements
10385         of the first iteration are inactive.
10386         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10387         Update call to vect_set_loop_masks_directly.
10388         (get_misalign_in_elems): New function, split out from...
10389         (vect_gen_prolog_loop_niters): ...here.
10390         (vect_update_init_of_dr): Take a code argument that specifies whether
10391         the adjustment should be added or subtracted.
10392         (vect_update_init_of_drs): Likewise.
10393         (vect_prepare_for_masked_peels): New function.
10394         (vect_do_peeling): Skip prologue peeling if we're using a mask
10395         instead.  Update call to vect_update_inits_of_drs.
10396         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10397         mask_skip_niters.
10398         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10399         alignment.  Do not include the number of peeled iterations in
10400         the minimum threshold in that case.
10401         (vectorizable_induction): Adjust the start value down by
10402         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10403         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10404         Take the number of skipped iterations into account when calculating
10405         the loop bounds.
10406         * tree-vect-stmts.c (vect_gen_while_not): New function.
10408 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10409             Alan Hayward  <alan.hayward@arm.com>
10410             David Sherwood  <david.sherwood@arm.com>
10412         * doc/sourcebuild.texi (vect_fully_masked): Document.
10413         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10414         default value to 0.
10415         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10416         split out from...
10417         (vect_analyze_loop_2): ...here. Don't check the vectorization
10418         factor against the number of loop iterations if the loop is
10419         fully-masked.
10421 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10422             Alan Hayward  <alan.hayward@arm.com>
10423             David Sherwood  <david.sherwood@arm.com>
10425         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10426         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10427         (dump_groups): Update accordingly.
10428         (iv_use::mem_type): New member variable.
10429         (address_p): New function.
10430         (record_use): Add a mem_type argument and initialize the new
10431         mem_type field.
10432         (record_group_use): Add a mem_type argument.  Use address_p.
10433         Remove obsolete null checks of base_object.  Update call to record_use.
10434         (find_interesting_uses_op): Update call to record_group_use.
10435         (find_interesting_uses_cond): Likewise.
10436         (find_interesting_uses_address): Likewise.
10437         (get_mem_type_for_internal_fn): New function.
10438         (find_address_like_use): Likewise.
10439         (find_interesting_uses_stmt): Try find_address_like_use before
10440         calling find_interesting_uses_op.
10441         (addr_offset_valid_p): Use the iv mem_type field as the type
10442         of the addressed memory.
10443         (add_autoinc_candidates): Likewise.
10444         (get_address_cost): Likewise.
10445         (split_small_address_groups_p): Use address_p.
10446         (split_address_groups): Likewise.
10447         (add_iv_candidate_for_use): Likewise.
10448         (autoinc_possible_for_pair): Likewise.
10449         (rewrite_groups): Likewise.
10450         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10451         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10452         (get_alias_ptr_type_for_ptr_address): New function.
10453         (rewrite_use_address): Rewrite address uses in calls that were
10454         identified by find_address_like_use.
10456 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10457             Alan Hayward  <alan.hayward@arm.com>
10458             David Sherwood  <david.sherwood@arm.com>
10460         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10461         TARGET_MEM_REFs.
10462         * gimple-expr.h (is_gimple_addressable: Likewise.
10463         * gimple-expr.c (is_gimple_address): Likewise.
10464         * internal-fn.c (expand_call_mem_ref): New function.
10465         (expand_mask_load_optab_fn): Use it.
10466         (expand_mask_store_optab_fn): Likewise.
10468 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10469             Alan Hayward  <alan.hayward@arm.com>
10470             David Sherwood  <david.sherwood@arm.com>
10472         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10473         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10474         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10475         (cond_umax@var{mode}): Document.
10476         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10477         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10478         (cond_umin_optab, cond_umax_optab): New optabs.
10479         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10480         (COND_IOR, COND_XOR): New internal functions.
10481         * internal-fn.h (get_conditional_internal_fn): Declare.
10482         * internal-fn.c (cond_binary_direct): New macro.
10483         (expand_cond_binary_optab_fn): Likewise.
10484         (direct_cond_binary_optab_supported_p): Likewise.
10485         (get_conditional_internal_fn): New function.
10486         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10487         Cope with reduction statements that are vectorized as calls rather
10488         than assignments.
10489         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10490         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10491         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10492         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10493         (UNSPEC_COND_EOR): New unspecs.
10494         (optab): Add mappings for them.
10495         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10496         (sve_int_op, sve_fp_op): New int attributes.
10498 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10499             Alan Hayward  <alan.hayward@arm.com>
10500             David Sherwood  <david.sherwood@arm.com>
10502         * optabs.def (while_ult_optab): New optab.
10503         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10504         * internal-fn.def (WHILE_ULT): New internal function.
10505         * internal-fn.h (direct_internal_fn_supported_p): New override
10506         that takes two types as argument.
10507         * internal-fn.c (while_direct): New macro.
10508         (expand_while_optab_fn): New function.
10509         (convert_optab_supported_p): Likewise.
10510         (direct_while_optab_supported_p): New macro.
10511         * wide-int.h (wi::udiv_ceil): New function.
10512         * tree-vectorizer.h (rgroup_masks): New structure.
10513         (vec_loop_masks): New typedef.
10514         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10515         and fully_masked_p.
10516         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10517         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10518         (vect_max_vf): New function.
10519         (slpeel_make_loop_iterate_ntimes): Delete.
10520         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10521         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10522         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10523         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10524         internal-fn.h, stor-layout.h and optabs-query.h.
10525         (vect_set_loop_mask): New function.
10526         (add_preheader_seq): Likewise.
10527         (add_header_seq): Likewise.
10528         (interleave_supported_p): Likewise.
10529         (vect_maybe_permute_loop_masks): Likewise.
10530         (vect_set_loop_masks_directly): Likewise.
10531         (vect_set_loop_condition_masked): Likewise.
10532         (vect_set_loop_condition_unmasked): New function, split out from
10533         slpeel_make_loop_iterate_ntimes.
10534         (slpeel_make_loop_iterate_ntimes): Rename to..
10535         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10536         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10537         (vect_do_peeling): Update call accordingly.
10538         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10539         loops.
10540         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10541         mask_compare_type, can_fully_mask_p and fully_masked_p.
10542         (release_vec_loop_masks): New function.
10543         (_loop_vec_info): Use it to free the loop masks.
10544         (can_produce_all_loop_masks_p): New function.
10545         (vect_get_max_nscalars_per_iter): Likewise.
10546         (vect_verify_full_masking): Likewise.
10547         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10548         retries, and free the mask rgroups before retrying.  Check loop-wide
10549         reasons for disallowing fully-masked loops.  Make the final decision
10550         about whether use a fully-masked loop or not.
10551         (vect_estimate_min_profitable_iters): Do not assume that peeling
10552         for the number of iterations will be needed for fully-masked loops.
10553         (vectorizable_reduction): Disable fully-masked loops.
10554         (vectorizable_live_operation): Likewise.
10555         (vect_halve_mask_nunits): New function.
10556         (vect_double_mask_nunits): Likewise.
10557         (vect_record_loop_mask): Likewise.
10558         (vect_get_loop_mask): Likewise.
10559         (vect_transform_loop): Handle the case in which the final loop
10560         iteration might handle a partial vector.  Call vect_set_loop_condition
10561         instead of slpeel_make_loop_iterate_ntimes.
10562         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
10563         (check_load_store_masking): New function.
10564         (prepare_load_store_mask): Likewise.
10565         (vectorizable_store): Handle fully-masked loops.
10566         (vectorizable_load): Likewise.
10567         (supportable_widening_operation): Use vect_halve_mask_nunits for
10568         booleans.
10569         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
10570         (vect_gen_while): New function.
10571         * config/aarch64/aarch64.md (umax<mode>3): New expander.
10572         (aarch64_uqdec<mode>): New insn.
10574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10575             Alan Hayward  <alan.hayward@arm.com>
10576             David Sherwood  <david.sherwood@arm.com>
10578         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
10579         (reduc_xor_scal_optab): New optabs.
10580         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
10581         (reduc_xor_scal_@var{m}): Document.
10582         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
10583         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
10584         internal functions.
10585         * fold-const-call.c (fold_const_call): Handle them.
10586         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
10587         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
10588         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
10589         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
10590         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
10591         (UNSPEC_XORV): New unspecs.
10592         (optab): Add entries for them.
10593         (BITWISEV): New int iterator.
10594         (bit_reduc_op): New int attributes.
10596 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10597             Alan Hayward  <alan.hayward@arm.com>
10598             David Sherwood  <david.sherwood@arm.com>
10600         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10601         * internal-fn.def (VEC_SHL_INSERT): New internal function.
10602         * optabs.def (vec_shl_insert_optab): New optab.
10603         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10604         (duplicate_and_interleave): Likewise.
10605         * tree-vect-loop.c: Include internal-fn.h.
10606         (neutral_op_for_slp_reduction): New function, split out from
10607         get_initial_defs_for_reduction.
10608         (get_initial_def_for_reduction): Handle option 2 for variable-length
10609         vectors by loading the neutral value into a vector and then shifting
10610         the initial value into element 0.
10611         (get_initial_defs_for_reduction): Replace the code argument with
10612         the neutral value calculated by neutral_op_for_slp_reduction.
10613         Use gimple_build_vector for constant-length vectors.
10614         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10615         but the first group_size elements have a neutral value.
10616         Use duplicate_and_interleave otherwise.
10617         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10618         Update call to get_initial_defs_for_reduction.  Handle SLP
10619         reductions for variable-length vectors by creating one vector
10620         result for each scalar result, with the elements associated
10621         with other scalar results stubbed out with the neutral value.
10622         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10623         Require IFN_VEC_SHL_INSERT for double reductions on
10624         variable-length vectors, or SLP reductions that have
10625         a neutral value.  Require can_duplicate_and_interleave_p
10626         support for variable-length unchained SLP reductions if there
10627         is no neutral value, such as for MIN/MAX reductions.  Also require
10628         the number of vector elements to be a multiple of the number of
10629         SLP statements when doing variable-length unchained SLP reductions.
10630         Update call to vect_create_epilog_for_reduction.
10631         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10632         and remove initial values.
10633         (duplicate_and_interleave): Make public.
10634         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10635         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10637 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10638             Alan Hayward  <alan.hayward@arm.com>
10639             David Sherwood  <david.sherwood@arm.com>
10641         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10642         (can_duplicate_and_interleave_p): New function.
10643         (vect_get_and_check_slp_defs): Take the vector of statements
10644         rather than just the current one.  Remove excess parentheses.
10645         Restriction rejectinon of vect_constant_def and vect_external_def
10646         for variable-length vectors to boolean types, or types for which
10647         can_duplicate_and_interleave_p is false.
10648         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10649         (duplicate_and_interleave): New function.
10650         (vect_get_constant_vectors): Use gimple_build_vector for
10651         constant-length vectors and suitable variable-length constant
10652         vectors.  Use duplicate_and_interleave for other variable-length
10653         vectors.  Don't defer the update when inserting new statements.
10655 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10656             Alan Hayward  <alan.hayward@arm.com>
10657             David Sherwood  <david.sherwood@arm.com>
10659         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10660         min_profitable_iters doesn't go negative.
10662 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10663             Alan Hayward  <alan.hayward@arm.com>
10664             David Sherwood  <david.sherwood@arm.com>
10666         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10667         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10668         * optabs.def (vec_mask_load_lanes_optab): New optab.
10669         (vec_mask_store_lanes_optab): Likewise.
10670         * internal-fn.def (MASK_LOAD_LANES): New internal function.
10671         (MASK_STORE_LANES): Likewise.
10672         * internal-fn.c (mask_load_lanes_direct): New macro.
10673         (mask_store_lanes_direct): Likewise.
10674         (expand_mask_load_optab_fn): Handle masked operations.
10675         (expand_mask_load_lanes_optab_fn): New macro.
10676         (expand_mask_store_optab_fn): Handle masked operations.
10677         (expand_mask_store_lanes_optab_fn): New macro.
10678         (direct_mask_load_lanes_optab_supported_p): Likewise.
10679         (direct_mask_store_lanes_optab_supported_p): Likewise.
10680         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10681         parameter.
10682         (vect_load_lanes_supported): Likewise.
10683         * tree-vect-data-refs.c (strip_conversion): New function.
10684         (can_group_stmts_p): Likewise.
10685         (vect_analyze_data_ref_accesses): Use it instead of checking
10686         for a pair of assignments.
10687         (vect_store_lanes_supported): Take a masked_p parameter.
10688         (vect_load_lanes_supported): Likewise.
10689         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10690         vect_store_lanes_supported and vect_load_lanes_supported.
10691         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10692         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10693         parameter.  Don't allow gaps for masked accesses.
10694         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
10695         and vect_load_lanes_supported.
10696         (get_load_store_type): Take a masked_p parameter and update
10697         call to get_group_load_store_type.
10698         (vectorizable_store): Update call to get_load_store_type.
10699         Handle IFN_MASK_STORE_LANES.
10700         (vectorizable_load): Update call to get_load_store_type.
10701         Handle IFN_MASK_LOAD_LANES.
10703 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10704             Alan Hayward  <alan.hayward@arm.com>
10705             David Sherwood  <david.sherwood@arm.com>
10707         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10708         modes for SVE.
10709         * config/aarch64/aarch64-protos.h
10710         (aarch64_sve_struct_memory_operand_p): Declare.
10711         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10712         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10713         (VPRED, vpred): Handle SVE structure modes.
10714         * config/aarch64/constraints.md (Utx): New constraint.
10715         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10716         (aarch64_sve_struct_nonimmediate_operand): New predicates.
10717         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10718         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10719         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10720         structure modes.  Split into pieces after RA.
10721         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10722         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10723         New patterns.
10724         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10725         SVE structure modes.
10726         (aarch64_classify_address): Likewise.
10727         (sizetochar): Move earlier in file.
10728         (aarch64_print_operand): Handle SVE register lists.
10729         (aarch64_array_mode): New function.
10730         (aarch64_sve_struct_memory_operand_p): Likewise.
10731         (TARGET_ARRAY_MODE): Redefine.
10733 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10734             Alan Hayward  <alan.hayward@arm.com>
10735             David Sherwood  <david.sherwood@arm.com>
10737         * target.def (array_mode): New target hook.
10738         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10739         * doc/tm.texi: Regenerate.
10740         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10741         * hooks.c (hook_optmode_mode_uhwi_none): New function.
10742         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10743         targetm.array_mode.
10744         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
10745         type sizes.
10747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10748             Alan Hayward  <alan.hayward@arm.com>
10749             David Sherwood  <david.sherwood@arm.com>
10751         * fold-const.c (fold_binary_loc): Check the argument types
10752         rather than the result type when testing for a vector operation.
10754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10756         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10757         * doc/tm.texi: Regenerate.
10759 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10760             Alan Hayward  <alan.hayward@arm.com>
10761             David Sherwood  <david.sherwood@arm.com>
10763         * doc/invoke.texi (-msve-vector-bits=): Document new option.
10764         (sve): Document new AArch64 extension.
10765         * doc/md.texi (w): Extend the description of the AArch64
10766         constraint to include SVE vectors.
10767         (Upl, Upa): Document new AArch64 predicate constraints.
10768         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10769         enum.
10770         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10771         (msve-vector-bits=): New option.
10772         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10773         SVE when these are disabled.
10774         (sve): New extension.
10775         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10776         modes.  Adjust their number of units based on aarch64_sve_vg.
10777         (MAX_BITSIZE_MODE_ANY_MODE): Define.
10778         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10779         aarch64_addr_query_type.
10780         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10781         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10782         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10783         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10784         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10785         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10786         (aarch64_simd_imm_zero_p): Delete.
10787         (aarch64_check_zero_based_sve_index_immediate): Declare.
10788         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10789         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10790         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10791         (aarch64_sve_float_mul_immediate_p): Likewise.
10792         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10793         rather than an rtx.
10794         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
10795         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
10796         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
10797         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
10798         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
10799         (aarch64_regmode_natural_size): Likewise.
10800         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
10801         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
10802         left one place.
10803         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
10804         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
10805         for VG and the SVE predicate registers.
10806         (V_ALIASES): Add a "z"-prefixed alias.
10807         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
10808         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
10809         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
10810         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
10811         (REG_CLASS_NAMES): Add entries for them.
10812         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
10813         and the predicate registers.
10814         (aarch64_sve_vg): Declare.
10815         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
10816         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
10817         (REGMODE_NATURAL_SIZE): Define.
10818         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
10819         SVE macros.
10820         * config/aarch64/aarch64.c: Include cfgrtl.h.
10821         (simd_immediate_info): Add a constructor for series vectors,
10822         and an associated step field.
10823         (aarch64_sve_vg): New variable.
10824         (aarch64_dbx_register_number): Handle VG and the predicate registers.
10825         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
10826         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
10827         (VEC_ANY_DATA, VEC_STRUCT): New constants.
10828         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
10829         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
10830         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
10831         (aarch64_get_mask_mode): New functions.
10832         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
10833         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
10834         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
10835         predicate modes and predicate registers.  Explicitly restrict
10836         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
10837         to store a vector mode if it is recognized by
10838         aarch64_classify_vector_mode.
10839         (aarch64_regmode_natural_size): New function.
10840         (aarch64_hard_regno_caller_save_mode): Return the original mode
10841         for predicates.
10842         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
10843         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
10844         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
10845         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
10846         functions.
10847         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
10848         does not overlap dest if the function is frame-related.  Handle
10849         SVE constants.
10850         (aarch64_split_add_offset): New function.
10851         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
10852         them aarch64_add_offset.
10853         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
10854         and update call to aarch64_sub_sp.
10855         (aarch64_add_cfa_expression): New function.
10856         (aarch64_expand_prologue): Pass extra temporary registers to the
10857         functions above.  Handle the case in which we need to emit new
10858         DW_CFA_expressions for registers that were originally saved
10859         relative to the stack pointer, but now have to be expressed
10860         relative to the frame pointer.
10861         (aarch64_output_mi_thunk): Pass extra temporary registers to the
10862         functions above.
10863         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
10864         IP0 and IP1 values for SVE frames.
10865         (aarch64_expand_vec_series): New function.
10866         (aarch64_expand_sve_widened_duplicate): Likewise.
10867         (aarch64_expand_sve_const_vector): Likewise.
10868         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
10869         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
10870         into the register, rather than emitting a SET directly.
10871         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
10872         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
10873         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
10874         (offset_9bit_signed_scaled_p): New functions.
10875         (aarch64_replicate_bitmask_imm): New function.
10876         (aarch64_bitmask_imm): Use it.
10877         (aarch64_cannot_force_const_mem): Reject expressions involving
10878         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
10879         (aarch64_classify_index): Handle SVE indices, by requiring
10880         a plain register index with a scale that matches the element size.
10881         (aarch64_classify_address): Handle SVE addresses.  Assert that
10882         the mode of the address is VOIDmode or an integer mode.
10883         Update call to aarch64_classify_symbol.
10884         (aarch64_classify_symbolic_expression): Update call to
10885         aarch64_classify_symbol.
10886         (aarch64_const_vec_all_in_range_p): New function.
10887         (aarch64_print_vector_float_operand): Likewise.
10888         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
10889         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
10890         and the FP immediates 1.0 and 0.5.
10891         (aarch64_print_address_internal): Handle SVE addresses.
10892         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
10893         (aarch64_regno_regclass): Handle predicate registers.
10894         (aarch64_secondary_reload): Handle big-endian reloads of SVE
10895         data modes.
10896         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
10897         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
10898         (aarch64_convert_sve_vector_bits): New function.
10899         (aarch64_override_options): Use it to handle -msve-vector-bits=.
10900         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10901         rather than an rtx.
10902         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
10903         Handle SVE vector and predicate modes.  Accept VL-based constants
10904         that need only one temporary register, and VL offsets that require
10905         no temporary registers.
10906         (aarch64_conditional_register_usage): Mark the predicate registers
10907         as fixed if SVE isn't available.
10908         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
10909         Return true for SVE vector and predicate modes.
10910         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
10911         rather than an unsigned int.  Handle SVE modes.
10912         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
10913         SVE modes.
10914         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
10915         if SVE is enabled.
10916         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10917         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10918         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10919         (aarch64_sve_float_mul_immediate_p): New functions.
10920         (aarch64_sve_valid_immediate): New function.
10921         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
10922         Explicitly reject structure modes.  Check for INDEX constants.
10923         Handle PTRUE and PFALSE constants.
10924         (aarch64_check_zero_based_sve_index_immediate): New function.
10925         (aarch64_simd_imm_zero_p): Delete.
10926         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
10927         vector modes.  Accept constants in the range of CNT[BHWD].
10928         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
10929         ask for an Advanced SIMD mode.
10930         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
10931         (aarch64_simd_vector_alignment): Handle SVE predicates.
10932         (aarch64_vectorize_preferred_vector_alignment): New function.
10933         (aarch64_simd_vector_alignment_reachable): Use it instead of
10934         the vector size.
10935         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
10936         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
10937         functions.
10938         (MAX_VECT_LEN): Delete.
10939         (expand_vec_perm_d): Add a vec_flags field.
10940         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
10941         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
10942         (aarch64_evpc_ext): Don't apply a big-endian lane correction
10943         for SVE modes.
10944         (aarch64_evpc_rev): Rename to...
10945         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
10946         (aarch64_evpc_rev_global): New function.
10947         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
10948         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
10949         MAX_VECT_LEN.
10950         (aarch64_evpc_sve_tbl): New function.
10951         (aarch64_expand_vec_perm_const_1): Update after rename of
10952         aarch64_evpc_rev.  Handle SVE permutes too, trying
10953         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
10954         than aarch64_evpc_tbl.
10955         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
10956         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
10957         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
10958         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
10959         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
10960         (aarch64_expand_sve_vcond): New functions.
10961         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
10962         of aarch64_vector_mode_p.
10963         (aarch64_dwarf_poly_indeterminate_value): New function.
10964         (aarch64_compute_pressure_classes): Likewise.
10965         (aarch64_can_change_mode_class): Likewise.
10966         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
10967         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
10968         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
10969         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
10970         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
10971         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
10972         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
10973         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
10974         constraints.
10975         (Dn, Dl, Dr): Accept const as well as const_vector.
10976         (Dz): Likewise.  Compare against CONST0_RTX.
10977         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
10978         of "vector" where appropriate.
10979         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
10980         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
10981         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
10982         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
10983         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
10984         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
10985         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
10986         (v_int_equiv): Extend to SVE modes.
10987         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
10988         mode attributes.
10989         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
10990         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
10991         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
10992         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
10993         (SVE_COND_FP_CMP): New int iterators.
10994         (perm_hilo): Handle the new unpack unspecs.
10995         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
10996         attributes.
10997         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
10998         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
10999         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11000         (aarch64_equality_operator, aarch64_constant_vector_operand)
11001         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11002         (aarch64_sve_nonimmediate_operand): Likewise.
11003         (aarch64_sve_general_operand): Likewise.
11004         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11005         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11006         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11007         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11008         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11009         (aarch64_sve_float_arith_immediate): Likewise.
11010         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11011         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11012         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11013         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11014         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11015         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11016         (aarch64_sve_float_arith_operand): Likewise.
11017         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11018         (aarch64_sve_float_mul_operand): Likewise.
11019         (aarch64_sve_vec_perm_operand): Likewise.
11020         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11021         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11022         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11023         as well as const_vector.
11024         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11025         in file.  Use CONST0_RTX and CONSTM1_RTX.
11026         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11027         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11028         Use aarch64_simd_imm_zero.
11029         * config/aarch64/aarch64-sve.md: New file.
11030         * config/aarch64/aarch64.md: Include it.
11031         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11032         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11033         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11034         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11035         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11036         (sve): New attribute.
11037         (enabled): Disable instructions with the sve attribute unless
11038         TARGET_SVE.
11039         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11040         aarch64_expand_mov_immediate.
11041         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11042         CNT[BHSD] immediates.
11043         (movti): Split CONST_POLY_INT moves into two halves.
11044         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11045         Split additions that need a temporary here if the destination
11046         is the stack pointer.
11047         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11048         (*add<mode>3_poly_1): New instruction.
11049         (set_clobber_cc): New expander.
11051 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11053         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11054         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11055         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11056         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11057         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11058         Change innermode from fixed_mode_size to machine_mode.
11059         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11060         subreg of a variable-length CONST_VECTOR.
11062 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11063             Alan Hayward  <alan.hayward@arm.com>
11064             David Sherwood  <david.sherwood@arm.com>
11066         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11067         (add_offset_to_base): New function, split out from...
11068         (create_mem_ref): ...here.  When handling a scale other than 1,
11069         check first whether the address is valid without the offset.
11070         Add it into the base if so, leaving the index and scale as-is.
11072 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11074         PR c++/83778
11075         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11076         fold_for_warn before checking if arg2 is INTEGER_CST.
11078 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11080         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11081         (store_multiple_operation): Delete.
11082         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11083         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11084         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11085         guarded by TARGET_STRING.
11086         (rs6000_output_load_multiple): Delete.
11087         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11088         OPTION_MASK_STRING / TARGET_STRING handling.
11089         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11090         (const rs6000_opt_masks) <"string">: Change mask to 0.
11091         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11092         (MASK_STRING): Delete.
11093         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11094         parts.  Simplify.
11095         (load_multiple): Delete.
11096         (*ldmsi8): Delete.
11097         (*ldmsi7): Delete.
11098         (*ldmsi6): Delete.
11099         (*ldmsi5): Delete.
11100         (*ldmsi4): Delete.
11101         (*ldmsi3): Delete.
11102         (store_multiple): Delete.
11103         (*stmsi8): Delete.
11104         (*stmsi7): Delete.
11105         (*stmsi6): Delete.
11106         (*stmsi5): Delete.
11107         (*stmsi4): Delete.
11108         (*stmsi3): Delete.
11109         (movmemsi_8reg): Delete.
11110         (corresponding unnamed define_insn): Delete.
11111         (movmemsi_6reg): Delete.
11112         (corresponding unnamed define_insn): Delete.
11113         (movmemsi_4reg): Delete.
11114         (corresponding unnamed define_insn): Delete.
11115         (movmemsi_2reg): Delete.
11116         (corresponding unnamed define_insn): Delete.
11117         (movmemsi_1reg): Delete.
11118         (corresponding unnamed define_insn): Delete.
11119         * config/rs6000/rs6000.opt (mno-string): New.
11120         (mstring): Replace by deprecation warning stub.
11121         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11123 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11125         * regrename.c (regrename_do_replace): If replacing the same
11126         reg multiple times, try to reuse last created gen_raw_REG.
11128         PR debug/81155
11129         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11130         main to workaround a bug in GDB.
11132 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11134         PR target/83737
11135         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11137 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11139         PR rtl-optimization/80481
11140         * ira-color.c (get_cap_member): New function.
11141         (allocnos_conflict_by_live_ranges_p): Use it.
11142         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11143         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11145 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11147         PR target/83628
11148         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11149         (*saddl_se_1): Ditto.
11150         (*ssubsi_1): Ditto.
11151         (*ssubl_se_1): Ditto.
11153 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11155         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11156         rather than wi::to_widest for DR_INITs.
11157         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11158         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11159         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11160         INTEGER_CSTs.
11161         (vect_analyze_group_access_1): Note that here.
11163 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11165         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11166         polynomial type sizes.
11168 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11170         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11171         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11172         (gimple_add_tmp_var): Likewise.
11174 2018-01-12  Martin Liska  <mliska@suse.cz>
11176         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11177         (gimple_alloc_sizes): Likewise.
11178         (dump_gimple_statistics): Use PRIu64 in printf format.
11179         * gimple.h: Change uint64_t to int.
11181 2018-01-12  Martin Liska  <mliska@suse.cz>
11183         * tree-core.h: Use uint64_t instead of int.
11184         * tree.c (tree_node_counts): Likewise.
11185         (tree_node_sizes): Likewise.
11186         (dump_tree_statistics): Use PRIu64 in printf format.
11188 2018-01-12  Martin Liska  <mliska@suse.cz>
11190         * Makefile.in: As qsort_chk is implemented in vec.c, add
11191         vec.o to linkage of gencfn-macros.
11192         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11193         passing the info to record_node_allocation_statistics.
11194         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11195         and pass the info.
11196         * ggc-common.c (struct ggc_usage): Add operator== and use
11197         it in operator< and compare function.
11198         * mem-stats.h (struct mem_usage): Likewise.
11199         * vec.c (struct vec_usage): Remove operator< and compare
11200         function. Can be simply inherited.
11202 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11204         PR target/81616
11205         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11206         * tree-ssa-math-opts.c: Include domwalk.h.
11207         (convert_mult_to_fma_1): New function.
11208         (fma_transformation_info): New type.
11209         (fma_deferring_state): Likewise.
11210         (cancel_fma_deferring): New function.
11211         (result_of_phi): Likewise.
11212         (last_fma_candidate_feeds_initial_phi): Likewise.
11213         (convert_mult_to_fma): Added deferring logic, split actual
11214         transformation to convert_mult_to_fma_1.
11215         (math_opts_dom_walker): New type.
11216         (math_opts_dom_walker::after_dom_children): New method, body moved
11217         here from pass_optimize_widening_mul::execute, added deferring logic
11218         bits.
11219         (pass_optimize_widening_mul::execute): Moved most of code to
11220         math_opts_dom_walker::after_dom_children.
11221         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11222         * config/i386/i386.c (ix86_option_override_internal): Added
11223         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11225 2018-01-12  Richard Biener  <rguenther@suse.de>
11227         PR debug/83157
11228         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11229         inline instance vars.
11231 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11233         PR target/81819
11234         * config/rx/rx.c (rx_is_restricted_memory_address):
11235         Handle SUBREG case.
11237 2018-01-12  Richard Biener  <rguenther@suse.de>
11239         PR tree-optimization/80846
11240         * target.def (split_reduction): New target hook.
11241         * targhooks.c (default_split_reduction): New function.
11242         * targhooks.h (default_split_reduction): Declare.
11243         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11244         target requests first reduce vectors by combining low and high
11245         parts.
11246         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11247         (get_vectype_for_scalar_type_and_size): Export.
11248         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11249         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11250         * doc/tm.texi: Regenerate.
11251         * config/i386/i386.c (ix86_split_reduction): Implement
11252         TARGET_VECTORIZE_SPLIT_REDUCTION.
11254 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11256         PR target/83368
11257         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11258         in PIC mode except for TARGET_VXWORKS_RTP.
11259         * config/sparc/sparc.c: Include cfgrtl.h.
11260         (TARGET_INIT_PIC_REG): Define.
11261         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11262         (sparc_pic_register_p): New predicate.
11263         (sparc_legitimate_address_p): Use it.
11264         (sparc_legitimize_pic_address): Likewise.
11265         (sparc_delegitimize_address): Likewise.
11266         (sparc_mode_dependent_address_p): Likewise.
11267         (gen_load_pcrel_sym): Remove 4th parameter.
11268         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11269         (sparc_expand_prologue): Do not call load_got_register here.
11270         (sparc_flat_expand_prologue): Likewise.
11271         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11272         (sparc_use_pseudo_pic_reg): New function.
11273         (sparc_init_pic_reg): Likewise.
11274         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11275         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11277 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11279         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11280         Add item for branch_cost.
11282 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11284         PR rtl-optimization/83565
11285         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11286         not extend the result to a larger mode for rotate operations.
11287         (num_sign_bit_copies1): Likewise.
11289 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11291         PR target/40411
11292         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11293         -symbolic.
11294         Use values-Xc.o for -pedantic.
11295         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11297 2018-01-12  Martin Liska  <mliska@suse.cz>
11299         PR ipa/83054
11300         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11301         New function.
11302         (possible_polymorphic_call_targets): Use it.
11303         (ipa_devirt): Likewise.
11305 2018-01-12  Martin Liska  <mliska@suse.cz>
11307         * profile-count.h (enum profile_quality): Use 0 as invalid
11308         enum value of profile_quality.
11310 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11312         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11313         -mext-string options.
11315 2018-01-12  Richard Biener  <rguenther@suse.de>
11317         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11318         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11319         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11320         Likewise.
11321         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11323 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11325         * configure.ac (--with-long-double-format): Add support for the
11326         configuration option to change the default long double format on
11327         PowerPC systems.
11328         * config.gcc (powerpc*-linux*-*): Likewise.
11329         * configure: Regenerate.
11330         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11331         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11332         used without modification.
11334 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11336         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11337         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11338         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11339         MISC_BUILTIN_SPEC_BARRIER.
11340         (rs6000_init_builtins): Likewise.
11341         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11342         enum value.
11343         (speculation_barrier): New define_insn.
11344         * doc/extend.texi: Document __builtin_speculation_barrier.
11346 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11348         PR target/83203
11349         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11350         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11351         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11352         iterators.
11353         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11354         integral modes instead of "ss" and "sd".
11355         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11356         vectors with 32-bit and 64-bit elements.
11357         (vecdupssescalarmodesuffix): New mode attribute.
11358         (vec_dup<mode>): Use it.
11360 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11362         PR target/83330
11363         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11364         frame if argument is passed on stack.
11366 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11368         PR target/82682
11369         * ree.c (combine_reaching_defs): Optimize also
11370         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11371         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11373 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11375         PR middle-end/83189
11376         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11378 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11380         PR middle-end/83718
11381         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11382         after they are computed.
11384 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11386         PR tree-optimization/83695
11387         * gimple-loop-linterchange.cc
11388         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11389         reset cached scev information after interchange.
11390         (pass_linterchange::execute): Remove call to scev_reset_htab.
11392 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11394         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11395         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11396         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11397         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11398         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11399         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11400         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11401         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11402         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11403         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11404         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11405         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11406         (V_lane_reg): Likewise.
11407         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11408         New define_expand.
11409         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11410         (vfmal_lane_low<mode>_intrinsic,
11411         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11412         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11413         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11414         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11415         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11416         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11418 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11420         * config/arm/arm-cpus.in (fp16fml): New feature.
11421         (ALL_SIMD): Add fp16fml.
11422         (armv8.2-a): Add fp16fml as an option.
11423         (armv8.3-a): Likewise.
11424         (armv8.4-a): Add fp16fml as part of fp16.
11425         * config/arm/arm.h (TARGET_FP16FML): Define.
11426         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11427         when appropriate.
11428         * config/arm/arm-modes.def (V2HF): Define.
11429         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11430         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11431         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11432         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11433         vfmsl_low, vfmsl_high): New set of builtins.
11434         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11435         (vfml_op): New code attribute.
11436         (VFMLHALVES): New int iterator.
11437         (VFML, VFMLSEL): New mode attributes.
11438         (V_reg): Define mapping for V2HF.
11439         (V_hi, V_lo): New mode attributes.
11440         (VF_constraint): Likewise.
11441         (vfml_half, vfml_half_selector): New int attributes.
11442         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11443         define_expand.
11444         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11445         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11446         New define_insn.
11447         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11448         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11449         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11450         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11451         documentation.
11452         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11453         Document new effective target and option set.
11455 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11457         * config/arm/arm-cpus.in (armv8_4): New feature.
11458         (ARMv8_4a): New fgroup.
11459         (armv8.4-a): New arch.
11460         * config/arm/arm-tables.opt: Regenerate.
11461         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11462         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11463         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11464         Add matching rules for -march=armv8.4-a and extensions.
11465         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11467 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11469         PR target/81821
11470         * config/rx/rx.md (BW): New mode attribute.
11471         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11473 2018-01-11  Richard Biener  <rguenther@suse.de>
11475         PR tree-optimization/83435
11476         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11477         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11478         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11480 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11481             Alan Hayward  <alan.hayward@arm.com>
11482             David Sherwood  <david.sherwood@arm.com>
11484         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11485         field.
11486         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11487         (aarch64_print_address_internal): Use it to check for a zero offset.
11489 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11490             Alan Hayward  <alan.hayward@arm.com>
11491             David Sherwood  <david.sherwood@arm.com>
11493         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11494         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11495         Return a poly_int64 rather than a HOST_WIDE_INT.
11496         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11497         rather than a HOST_WIDE_INT.
11498         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11499         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11500         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11501         final_offset from HOST_WIDE_INT to poly_int64.
11502         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11503         to_constant when getting the number of units in an Advanced SIMD
11504         mode.
11505         (aarch64_builtin_vectorized_function): Check for a constant number
11506         of units.
11507         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11508         GET_MODE_SIZE.
11509         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11510         attribute instead of GET_MODE_NUNITS.
11511         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11512         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11513         GET_MODE_SIZE for fixed-size registers.
11514         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11515         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11516         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11517         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11518         (aarch64_print_operand, aarch64_print_address_internal)
11519         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11520         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11521         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11522         Handle polynomial GET_MODE_SIZE.
11523         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11524         wider than SImode without modification.
11525         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11526         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11527         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11528         passing and returning SVE modes.
11529         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11530         rather than GEN_INT.
11531         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11532         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11533         (aarch64_allocate_and_probe_stack_space): Likewise.
11534         (aarch64_layout_frame): Cope with polynomial offsets.
11535         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11536         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11537         polynomial offsets.
11538         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11539         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11540         poly_int64 rather than a HOST_WIDE_INT.
11541         (aarch64_get_separate_components, aarch64_process_components)
11542         (aarch64_expand_prologue, aarch64_expand_epilogue)
11543         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11544         (aarch64_anchor_offset): New function, split out from...
11545         (aarch64_legitimize_address): ...here.
11546         (aarch64_builtin_vectorization_cost): Handle polynomial
11547         TYPE_VECTOR_SUBPARTS.
11548         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11549         GET_MODE_NUNITS.
11550         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
11551         number of elements from the PARALLEL rather than the mode.
11552         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
11553         rather than GET_MODE_BITSIZE.
11554         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
11555         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
11556         (aarch64_expand_vec_perm_const_1): Handle polynomial
11557         d->perm.length () and d->perm elements.
11558         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
11559         Apply to_constant to d->perm elements.
11560         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
11561         polynomial CONST_VECTOR_NUNITS.
11562         (aarch64_move_pointer): Take amount as a poly_int64 rather
11563         than an int.
11564         (aarch64_progress_pointer): Avoid temporary variable.
11565         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
11566         the mode attribute instead of GET_MODE.
11568 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11569             Alan Hayward  <alan.hayward@arm.com>
11570             David Sherwood  <david.sherwood@arm.com>
11572         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
11573         x exists before using it.
11574         (aarch64_add_constant_internal): Rename to...
11575         (aarch64_add_offset_1): ...this.  Replace regnum with separate
11576         src and dest rtxes.  Handle the case in which they're different,
11577         including when the offset is zero.  Replace scratchreg with an rtx.
11578         Use 2 additions if there is no spare register into which we can
11579         move a 16-bit constant.
11580         (aarch64_add_constant): Delete.
11581         (aarch64_add_offset): Replace reg with separate src and dest
11582         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
11583         Use aarch64_add_offset_1.
11584         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
11585         an rtx rather than an int.  Take the delta as a poly_int64
11586         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
11587         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
11588         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
11589         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
11590         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
11591         and aarch64_add_sp.
11592         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
11593         aarch64_add_constant.
11595 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11597         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11598         Use scalar_float_mode.
11600 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11602         * config/aarch64/aarch64-simd.md
11603         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11604         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11605         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11606         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11607         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11608         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11609         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11610         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11611         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11612         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11614 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11616         PR target/83514
11617         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11618         targ_options->x_arm_arch_string is non NULL.
11620 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
11622         * config/aarch64/aarch64.h
11623         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
11625 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
11627         PR target/82096
11628         * expmed.c (emit_store_flag_force): Swap if const op0
11629         and change VOIDmode to mode of op0.
11631 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11633         PR rtl-optimization/83761
11634         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11635         than bytes to mode_for_size.
11637 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11639         PR middle-end/83189
11640         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11641         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11642         profile.
11644 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11646         PR middle-end/83575
11647         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11648         when in layout mode.
11649         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11650         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11651         partition fixup.
11653 2018-01-10  Michael Collison  <michael.collison@arm.com>
11655         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11656         * config/aarch64/aarch64-option-extension.def: Add
11657         AARCH64_OPT_EXTENSION of 'fp16fml'.
11658         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11659         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11660         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11661         * config/aarch64/constraints.md (Ui7): New constraint.
11662         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11663         (VFMLA_SEL_W): Ditto.
11664         (f16quad): Ditto.
11665         (f16mac1): Ditto.
11666         (VFMLA16_LOW): New int iterator.
11667         (VFMLA16_HIGH): Ditto.
11668         (UNSPEC_FMLAL): New unspec.
11669         (UNSPEC_FMLSL): Ditto.
11670         (UNSPEC_FMLAL2): Ditto.
11671         (UNSPEC_FMLSL2): Ditto.
11672         (f16mac): New code attribute.
11673         * config/aarch64/aarch64-simd-builtins.def
11674         (aarch64_fmlal_lowv2sf): Ditto.
11675         (aarch64_fmlsl_lowv2sf): Ditto.
11676         (aarch64_fmlalq_lowv4sf): Ditto.
11677         (aarch64_fmlslq_lowv4sf): Ditto.
11678         (aarch64_fmlal_highv2sf): Ditto.
11679         (aarch64_fmlsl_highv2sf): Ditto.
11680         (aarch64_fmlalq_highv4sf): Ditto.
11681         (aarch64_fmlslq_highv4sf): Ditto.
11682         (aarch64_fmlal_lane_lowv2sf): Ditto.
11683         (aarch64_fmlsl_lane_lowv2sf): Ditto.
11684         (aarch64_fmlal_laneq_lowv2sf): Ditto.
11685         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11686         (aarch64_fmlalq_lane_lowv4sf): Ditto.
11687         (aarch64_fmlsl_lane_lowv4sf): Ditto.
11688         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11689         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11690         (aarch64_fmlal_lane_highv2sf): Ditto.
11691         (aarch64_fmlsl_lane_highv2sf): Ditto.
11692         (aarch64_fmlal_laneq_highv2sf): Ditto.
11693         (aarch64_fmlsl_laneq_highv2sf): Ditto.
11694         (aarch64_fmlalq_lane_highv4sf): Ditto.
11695         (aarch64_fmlsl_lane_highv4sf): Ditto.
11696         (aarch64_fmlalq_laneq_highv4sf): Ditto.
11697         (aarch64_fmlsl_laneq_highv4sf): Ditto.
11698         * config/aarch64/aarch64-simd.md:
11699         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11700         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11701         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11702         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11703         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11704         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11705         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11706         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11707         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11708         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11709         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11710         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11711         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11712         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11713         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11714         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11715         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11716         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11717         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11718         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11719         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11720         (vfmlsl_low_u32): Ditto.
11721         (vfmlalq_low_u32): Ditto.
11722         (vfmlslq_low_u32): Ditto.
11723         (vfmlal_high_u32): Ditto.
11724         (vfmlsl_high_u32): Ditto.
11725         (vfmlalq_high_u32): Ditto.
11726         (vfmlslq_high_u32): Ditto.
11727         (vfmlal_lane_low_u32): Ditto.
11728         (vfmlsl_lane_low_u32): Ditto.
11729         (vfmlal_laneq_low_u32): Ditto.
11730         (vfmlsl_laneq_low_u32): Ditto.
11731         (vfmlalq_lane_low_u32): Ditto.
11732         (vfmlslq_lane_low_u32): Ditto.
11733         (vfmlalq_laneq_low_u32): Ditto.
11734         (vfmlslq_laneq_low_u32): Ditto.
11735         (vfmlal_lane_high_u32): Ditto.
11736         (vfmlsl_lane_high_u32): Ditto.
11737         (vfmlal_laneq_high_u32): Ditto.
11738         (vfmlsl_laneq_high_u32): Ditto.
11739         (vfmlalq_lane_high_u32): Ditto.
11740         (vfmlslq_lane_high_u32): Ditto.
11741         (vfmlalq_laneq_high_u32): Ditto.
11742         (vfmlslq_laneq_high_u32): Ditto.
11743         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11744         (AARCH64_FL_FOR_ARCH8_4): New.
11745         (AARCH64_ISA_F16FML): New ISA flag.
11746         (TARGET_F16FML): New feature flag for fp16fml.
11747         (doc/invoke.texi): Document new fp16fml option.
11749 2018-01-10  Michael Collison  <michael.collison@arm.com>
11751         * config/aarch64/aarch64-builtins.c:
11752         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11753         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11754         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11755         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11756         (AARCH64_ISA_SHA3): New ISA flag.
11757         (TARGET_SHA3): New feature flag for sha3.
11758         * config/aarch64/iterators.md (sha512_op): New int attribute.
11759         (CRYPTO_SHA512): New int iterator.
11760         (UNSPEC_SHA512H): New unspec.
11761         (UNSPEC_SHA512H2): Ditto.
11762         (UNSPEC_SHA512SU0): Ditto.
11763         (UNSPEC_SHA512SU1): Ditto.
11764         * config/aarch64/aarch64-simd-builtins.def
11765         (aarch64_crypto_sha512hqv2di): New builtin.
11766         (aarch64_crypto_sha512h2qv2di): Ditto.
11767         (aarch64_crypto_sha512su0qv2di): Ditto.
11768         (aarch64_crypto_sha512su1qv2di): Ditto.
11769         (aarch64_eor3qv8hi): Ditto.
11770         (aarch64_rax1qv2di): Ditto.
11771         (aarch64_xarqv2di): Ditto.
11772         (aarch64_bcaxqv8hi): Ditto.
11773         * config/aarch64/aarch64-simd.md:
11774         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11775         (aarch64_crypto_sha512su0qv2di): Ditto.
11776         (aarch64_crypto_sha512su1qv2di): Ditto.
11777         (aarch64_eor3qv8hi): Ditto.
11778         (aarch64_rax1qv2di): Ditto.
11779         (aarch64_xarqv2di): Ditto.
11780         (aarch64_bcaxqv8hi): Ditto.
11781         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11782         (vsha512h2q_u64): Ditto.
11783         (vsha512su0q_u64): Ditto.
11784         (vsha512su1q_u64): Ditto.
11785         (veor3q_u16): Ditto.
11786         (vrax1q_u64): Ditto.
11787         (vxarq_u64): Ditto.
11788         (vbcaxq_u16): Ditto.
11789         * config/arm/types.md (crypto_sha512): New type attribute.
11790         (crypto_sha3): Ditto.
11791         (doc/invoke.texi): Document new sha3 option.
11793 2018-01-10  Michael Collison  <michael.collison@arm.com>
11795         * config/aarch64/aarch64-builtins.c:
11796         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
11797         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11798         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
11799         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
11800         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
11801         (AARCH64_ISA_SM4): New ISA flag.
11802         (TARGET_SM4): New feature flag for sm4.
11803         * config/aarch64/aarch64-simd-builtins.def
11804         (aarch64_sm3ss1qv4si): Ditto.
11805         (aarch64_sm3tt1aq4si): Ditto.
11806         (aarch64_sm3tt1bq4si): Ditto.
11807         (aarch64_sm3tt2aq4si): Ditto.
11808         (aarch64_sm3tt2bq4si): Ditto.
11809         (aarch64_sm3partw1qv4si): Ditto.
11810         (aarch64_sm3partw2qv4si): Ditto.
11811         (aarch64_sm4eqv4si): Ditto.
11812         (aarch64_sm4ekeyqv4si): Ditto.
11813         * config/aarch64/aarch64-simd.md:
11814         (aarch64_sm3ss1qv4si): Ditto.
11815         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
11816         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
11817         (aarch64_sm4eqv4si): Ditto.
11818         (aarch64_sm4ekeyqv4si): Ditto.
11819         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
11820         (sm3part_op): Ditto.
11821         (CRYPTO_SM3TT): Ditto.
11822         (CRYPTO_SM3PART): Ditto.
11823         (UNSPEC_SM3SS1): New unspec.
11824         (UNSPEC_SM3TT1A): Ditto.
11825         (UNSPEC_SM3TT1B): Ditto.
11826         (UNSPEC_SM3TT2A): Ditto.
11827         (UNSPEC_SM3TT2B): Ditto.
11828         (UNSPEC_SM3PARTW1): Ditto.
11829         (UNSPEC_SM3PARTW2): Ditto.
11830         (UNSPEC_SM4E): Ditto.
11831         (UNSPEC_SM4EKEY): Ditto.
11832         * config/aarch64/constraints.md (Ui2): New constraint.
11833         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
11834         * config/arm/types.md (crypto_sm3): New type attribute.
11835         (crypto_sm4): Ditto.
11836         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
11837         (vsm3tt1aq_u32): Ditto.
11838         (vsm3tt1bq_u32): Ditto.
11839         (vsm3tt2aq_u32): Ditto.
11840         (vsm3tt2bq_u32): Ditto.
11841         (vsm3partw1q_u32): Ditto.
11842         (vsm3partw2q_u32): Ditto.
11843         (vsm4eq_u32): Ditto.
11844         (vsm4ekeyq_u32): Ditto.
11845         (doc/invoke.texi): Document new sm4 option.
11847 2018-01-10  Michael Collison  <michael.collison@arm.com>
11849         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
11850         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
11851         (AARCH64_FL_FOR_ARCH8_4): New.
11852         (AARCH64_FL_V8_4): New flag.
11853         (doc/invoke.texi): Document new armv8.4-a option.
11855 2018-01-10  Michael Collison  <michael.collison@arm.com>
11857         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11858         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
11859         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
11860         * config/aarch64/aarch64-option-extension.def: Add
11861         AARCH64_OPT_EXTENSION of 'sha2'.
11862         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
11863         (crypto): Disable sha2 and aes if crypto disabled.
11864         (crypto): Enable aes and sha2 if enabled.
11865         (simd): Disable sha2 and aes if simd disabled.
11866         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
11867         New flags.
11868         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
11869         (TARGET_SHA2): New feature flag for sha2.
11870         (TARGET_AES): New feature flag for aes.
11871         * config/aarch64/aarch64-simd.md:
11872         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
11873         conditional on TARGET_AES.
11874         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
11875         (aarch64_crypto_sha1hsi): Make pattern conditional
11876         on TARGET_SHA2.
11877         (aarch64_crypto_sha1hv4si): Ditto.
11878         (aarch64_be_crypto_sha1hv4si): Ditto.
11879         (aarch64_crypto_sha1su1v4si): Ditto.
11880         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
11881         (aarch64_crypto_sha1su0v4si): Ditto.
11882         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
11883         (aarch64_crypto_sha256su0v4si): Ditto.
11884         (aarch64_crypto_sha256su1v4si): Ditto.
11885         (doc/invoke.texi): Document new aes and sha2 options.
11887 2018-01-10  Martin Sebor  <msebor@redhat.com>
11889         PR tree-optimization/83781
11890         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
11891         as string arrays.
11893 2018-01-11  Martin Sebor  <msebor@gmail.com>
11894             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11896         PR tree-optimization/83501
11897         PR tree-optimization/81703
11899         * tree-ssa-strlen.c (get_string_cst): Rename...
11900         (get_string_len): ...to this.  Handle global constants.
11901         (handle_char_store): Adjust.
11903 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
11904             Jim Wilson  <jimw@sifive.com>
11906         * config/riscv/riscv-protos.h (riscv_output_return): New.
11907         * config/riscv/riscv.c (struct machine_function): New naked_p field.
11908         (riscv_attribute_table, riscv_output_return),
11909         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
11910         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
11911         (riscv_compute_frame_info): Only compute frame->mask if not a naked
11912         function.
11913         (riscv_expand_prologue): Add early return for naked function.
11914         (riscv_expand_epilogue): Likewise.
11915         (riscv_function_ok_for_sibcall): Return false for naked function.
11916         (riscv_set_current_function): New.
11917         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
11918         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
11919         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
11920         * doc/extend.texi (RISC-V Function Attributes): New.
11922 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11924         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
11925         check for 128-bit long double before checking TCmode.
11926         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
11927         128-bit long doubles before checking TFmode or TCmode.
11928         (FLOAT128_IBM_P): Likewise.
11930 2018-01-10  Martin Sebor  <msebor@redhat.com>
11932         PR tree-optimization/83671
11933         * builtins.c (c_strlen): Unconditionally return zero for the empty
11934         string.
11935         Use -Warray-bounds for warnings.
11936         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
11937         for non-constant array indices with COMPONENT_REF, arrays of
11938         arrays, and pointers to arrays.
11939         (gimple_fold_builtin_strlen): Determine and set length range for
11940         non-constant character arrays.
11942 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
11944         PR middle-end/81897
11945         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
11946         empty blocks.
11948 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
11950         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
11952 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
11954         PR target/83399
11955         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
11956         VECTOR_MEM_ALTIVEC_OR_VSX_P.
11957         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
11958         indexed_or_indirect_operand predicate.
11959         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
11960         (*vsx_le_perm_load_v8hi): Likewise.
11961         (*vsx_le_perm_load_v16qi): Likewise.
11962         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
11963         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
11964         (*vsx_le_perm_store_v8hi): Likewise.
11965         (*vsx_le_perm_store_v16qi): Likewise.
11966         (eight unnamed splitters): Likewise.
11968 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
11970         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
11971         * config/rs6000/emmintrin.h: Likewise.
11972         * config/rs6000/mmintrin.h: Likewise.
11973         * config/rs6000/xmmintrin.h: Likewise.
11975 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
11977         PR c++/43486
11978         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
11979         "public_flag".
11980         * tree.c (tree_nop_conversion): Return true for location wrapper
11981         nodes.
11982         (maybe_wrap_with_location): New function.
11983         (selftest::check_strip_nops): New function.
11984         (selftest::test_location_wrappers): New function.
11985         (selftest::tree_c_tests): Call it.
11986         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
11987         (maybe_wrap_with_location): New decl.
11988         (EXPR_LOCATION_WRAPPER_P): New macro.
11989         (location_wrapper_p): New inline function.
11990         (tree_strip_any_location_wrapper): New inline function.
11992 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
11994         PR target/83735
11995         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
11996         stack_realign_offset for the largest alignment of stack slot
11997         actually used.
11998         (ix86_find_max_used_stack_alignment): New function.
11999         (ix86_finalize_stack_frame_flags): Use it.  Set
12000         max_used_stack_alignment if we don't realign stack.
12001         * config/i386/i386.h (machine_function): Add
12002         max_used_stack_alignment.
12004 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12006         * config/arm/arm.opt (-mbranch-cost): New option.
12007         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12008         account.
12010 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12012         PR target/83629
12013         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12014         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12016 2018-01-10  Richard Biener  <rguenther@suse.de>
12018         PR debug/83765
12019         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12020         early out so it also covers the case where we have a non-NULL
12021         origin.
12023 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12025         PR tree-optimization/83753
12026         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12027         for non-strided grouped accesses if the number of elements is 1.
12029 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12031         PR target/81616
12032         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12033         * i386.h (TARGET_USE_GATHER): Define.
12034         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12036 2018-01-10  Martin Liska  <mliska@suse.cz>
12038         PR bootstrap/82831
12039         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12040         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12041         partitioning.
12042         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12043         CLEANUP_NO_PARTITIONING is not set.
12045 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12047         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12048         for vectors, as a partial revert of r254296.
12049         * rtl.h (const_vec_p): Delete.
12050         (const_vec_duplicate_p): Don't test for vector CONSTs.
12051         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12052         * expmed.c (make_tree): Likewise.
12054         Revert:
12055         * common.md (E, F): Use CONSTANT_P instead of checking for
12056         CONST_VECTOR.
12057         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12058         checking for CONST_VECTOR.
12060 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12062         PR middle-end/83575
12063         * predict.c (force_edge_cold): Handle in more sane way edges
12064         with no prediction.
12066 2018-01-09  Carl Love  <cel@us.ibm.com>
12068         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12069         V4SI, V4SF types.
12070         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12071         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12072         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12073         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12074         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12075         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12076         * config/rs6000/rs6000-protos.h: Add extern defition for
12077         rs6000_generate_float2_double_code.
12078         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12079         function.
12080         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12081         (float2_v2df): Add define_expand.
12083 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12085         PR target/83628
12086         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12087         op_mode in the force_to_mode call.
12089 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12091         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12092         instead of checking each element individually.
12093         (aarch64_evpc_uzp): Likewise.
12094         (aarch64_evpc_zip): Likewise.
12095         (aarch64_evpc_ext): Likewise.
12096         (aarch64_evpc_rev): Likewise.
12097         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12098         instead of checking each element individually.  Return true without
12099         generating rtl if
12100         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12101         whether all selected elements come from the same input, instead of
12102         checking each element individually.  Remove calls to gen_rtx_REG,
12103         start_sequence and end_sequence and instead assert that no rtl is
12104         generated.
12106 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12108         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12109         order of HIGH and CONST checks.
12111 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12113         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12114         if the destination isn't an SSA_NAME.
12116 2018-01-09  Richard Biener  <rguenther@suse.de>
12118         PR tree-optimization/83668
12119         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12120         move prologue...
12121         (canonicalize_loop_form): ... here, renamed from ...
12122         (canonicalize_loop_closed_ssa_form): ... this and amended to
12123         swap successor edges for loop exit blocks to make us use
12124         the RPO order we need for initial schedule generation.
12126 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12128         PR tree-optimization/64811
12129         * match.pd: When optimizing comparisons with Inf, avoid
12130         introducing or losing exceptions from comparisons with NaN.
12132 2018-01-09  Martin Liska  <mliska@suse.cz>
12134         PR sanitizer/82517
12135         * asan.c (shadow_mem_size): Add gcc_assert.
12137 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12139         Don't save registers in main().
12141         PR target/83738
12142         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12143         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12144         * config/avr/avr.c (avr_set_current_function): Don't error if
12145         naked, OS_task or OS_main are specified at the same time.
12146         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12147         OS_main.
12148         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12149         attribute.
12150         * common/config/avr/avr-common.c (avr_option_optimization_table):
12151         Switch on -mmain-is-OS_task for optimizing compilations.
12153 2018-01-09  Richard Biener  <rguenther@suse.de>
12155         PR tree-optimization/83572
12156         * graphite.c: Include cfganal.h.
12157         (graphite_transform_loops): Connect infinite loops to exit
12158         and remove fake edges at the end.
12160 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12162         * ipa-inline.c (edge_badness): Revert accidental checkin.
12164 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12166         PR ipa/80763
12167         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12168         symbols; not inline clones.
12170 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12172         PR target/83507
12173         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12174         hard registers.  Formatting fixes.
12176         PR preprocessor/83722
12177         * gcc.c (try_generate_repro): Pass
12178         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12179         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12180         do_report_bug.
12182 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12183             Kito Cheng  <kito.cheng@gmail.com>
12185         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12186         (riscv_leaf_function_p): Delete.
12187         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12189 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12191         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12192         function.
12193         (do_ifelse): New function.
12194         (do_isel): New function.
12195         (do_sub3): New function.
12196         (do_add3): New function.
12197         (do_load_mask_compare): New function.
12198         (do_overlap_load_compare): New function.
12199         (expand_compare_loop): New function.
12200         (expand_block_compare): Call expand_compare_loop() when appropriate.
12201         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12202         option description.
12203         (-mblock-compare-inline-loop-limit): New option.
12205 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12207         PR target/83677
12208         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12209         Reverse order of second and third operands in first alternative.
12210         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12211         of first and second elements in UNSPEC_VPERMR vector.
12212         (altivec_expand_vec_perm_le): Likewise.
12214 2018-01-08  Jeff Law  <law@redhat.com>
12216         PR rtl-optimizatin/81308
12217         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12218         (process_switch): If group_case_labels makes a change, then set
12219         cfg_altered.
12220         (pass_convert_switch::execute): If a switch is converted, then
12221         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12223         PR rtl-optimization/81308
12224         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12225         splitting insns.
12227 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12229         PR target/83663 - Revert r255946
12230         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12231         generation for cases where splatting a value is not useful.
12232         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12233         across a vec_duplicate and a paradoxical subreg forming a vector
12234         mode to a vec_concat.
12236 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12238         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12239         -march=armv8.3-a variants.
12240         * config/arm/t-multilib: Likewise.
12241         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12243 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12245         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12246         to generate rtl.
12247         (cceq_ior_compare_complement): Give it a name so I can use it, and
12248         change boolean_or_operator predicate to boolean_operator so it can
12249         be used to generate a crand.
12250         (eqne): New code iterator.
12251         (bd/bd_neg): New code_attrs.
12252         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12253         a single define_insn.
12254         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12255         decrement (bdnzt/bdnzf/bdzt/bdzf).
12256         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12257         with the new names of the branch decrement patterns, and added the
12258         names of the branch decrement conditional patterns.
12260 2018-01-08  Richard Biener  <rguenther@suse.de>
12262         PR tree-optimization/83563
12263         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12264         cache.
12266 2018-01-08  Richard Biener  <rguenther@suse.de>
12268         PR middle-end/83713
12269         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12271 2018-01-08  Richard Biener  <rguenther@suse.de>
12273         PR tree-optimization/83685
12274         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12275         references to abnormals.
12277 2018-01-08  Richard Biener  <rguenther@suse.de>
12279         PR lto/83719
12280         * dwarf2out.c (output_indirect_strings): Handle empty
12281         skeleton_debug_str_hash.
12282         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12284 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12286         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12287         (emit_store_direct): Likewise.
12288         (arc_trampoline_adjust_address): Likewise.
12289         (arc_asm_trampoline_template): New function.
12290         (arc_initialize_trampoline): Use asm_trampoline_template.
12291         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12292         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12293         * config/arc/arc.md (flush_icache): Delete pattern.
12295 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12297         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12298         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12299         munaligned-access.
12301 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12303         PR target/83681
12304         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12305         by not USED_FOR_TARGET.
12306         (make_pass_resolve_sw_modes): Likewise.
12308 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12310         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12311         USED_FOR_TARGET.
12313 2018-01-08  Richard Biener  <rguenther@suse.de>
12315         PR middle-end/83580
12316         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12318 2018-01-08  Richard Biener  <rguenther@suse.de>
12320         PR middle-end/83517
12321         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12323 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12325         PR middle-end/81897
12326         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12327         basic blocks with a small number of successors.
12328         (convert_control_dep_chain_into_preds): Improve handling of
12329         forwarder blocks.
12330         (dump_predicates): Split apart into...
12331         (dump_pred_chain): ...here...
12332         (dump_pred_info): ...and here.
12333         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12334         (can_chain_union_be_invalidated_p): Improve check for invalidation
12335         of paths.
12336         (uninit_uses_cannot_happen): Avoid unnecessary if
12337         convert_control_dep_chain_into_preds yielded nothing.
12339 2018-01-06  Martin Sebor  <msebor@redhat.com>
12341         PR tree-optimization/83640
12342         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12343         subtracting negative offset from size.
12344         (builtin_access::overlap): Adjust offset bounds of the access to fall
12345         within the size of the object if possible.
12347 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12349         PR rtl-optimization/83699
12350         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12351         extract_bit_field_as_subreg to cases in which the extracted
12352         value is also a vector.
12354         * lra-constraints.c (process_alt_operands): Test for the equivalence
12355         substitutions when detecting a possible reload cycle.
12357 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12359         PR debug/83480
12360         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12361         by default if flag_selective_schedling{,2}.  Formatting fixes.
12363         PR rtl-optimization/83682
12364         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12365         if it has non-VECTOR_MODE element mode.
12366         (vec_duplicate_p): Likewise.
12368         PR middle-end/83694
12369         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12370         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12372 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12374         PR target/83604
12375         * config/i386/i386-builtin.def
12376         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12377         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12378         Require also OPTION_MASK_ISA_AVX512F in addition to
12379         OPTION_MASK_ISA_GFNI.
12380         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12381         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12382         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12383         to OPTION_MASK_ISA_GFNI.
12384         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12385         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12386         OPTION_MASK_ISA_AVX512BW.
12387         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12388         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12389         addition to OPTION_MASK_ISA_GFNI.
12390         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12391         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12392         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12393         to OPTION_MASK_ISA_GFNI.
12394         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12395         a requirement for all ISAs rather than any of them with a few
12396         exceptions.
12397         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12398         processing.
12399         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12400         bitmasks to be enabled with 3 exceptions, instead of requiring any
12401         enabled ISA with lots of exceptions.
12402         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12403         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12404         Change avx512bw in isa attribute to avx512f.
12405         * config/i386/sgxintrin.h: Add license boilerplate.
12406         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12407         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12408         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12409         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12410         defined.
12411         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12412         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12413         temporarily sse2 rather than sse if not enabled already.
12415         PR target/83604
12416         * config/i386/sse.md (VI248_VLBW): Rename to ...
12417         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12418         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12419         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12420         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12421         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12422         mode iterator instead of VI248_VLBW.
12424 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12426         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12427         (record_modified): Skip clobbers; add debug output.
12428         (param_change_prob): Use sreal frequencies.
12430 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12432         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12433         punt for user-aligned variables.
12435 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12437         * tree-chrec.c (chrec_contains_symbols): Return true for
12438         POLY_INT_CST.
12440 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12442         PR target/82439
12443         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12444         of (x|y) == x for BICS pattern.
12446 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12448         PR tree-optimization/83605
12449         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12450         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12451         can throw.
12453 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12455         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12456         * config/epiphany/rtems.h: New file.
12458 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12459             Uros Bizjak  <ubizjak@gmail.com>
12461         PR target/83554
12462         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12463         QIreg_operand instead of register_operand predicate.
12464         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12465         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12466         comments instead of -fmitigate[-_]rop.
12468 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12470         PR bootstrap/81926
12471         * cgraphunit.c (symbol_table::compile): Switch to text_section
12472         before calling assembly_start debug hook.
12473         * run-rtl-passes.c (run_rtl_passes): Likewise.
12474         Include output.h.
12476 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12478         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12479         range_int_cst_p rather than !symbolic_range_p before calling
12480         extract_range_from_multiplicative_op_1.
12482 2018-01-04  Jeff Law  <law@redhat.com>
12484         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12485         redundant test in assertion.
12487 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12489         * doc/rtl.texi: Document machine_mode wrapper classes.
12491 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12493         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12494         using tree_to_uhwi.
12496 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12498         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12499         the VEC_PERM_EXPR fold to fail.
12501 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12503         PR debug/83585
12504         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12505         to switched_sections.
12507 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12509         PR target/83680
12510         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12511         test for d.testing.
12513 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12515         PR target/83387
12516         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12517         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12519 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12521         PR debug/83666
12522         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12523         is BLKmode and bitpos not zero or mode change is needed.
12525 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12527         PR target/83675
12528         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12529         TARGET_VIS2.
12531 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12533         PR target/83628
12534         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12535         instead of MULT rtx.  Update all corresponding splitters.
12536         (*saddl_se): Ditto.
12537         (*ssub<modesuffix>): Ditto.
12538         (*ssubl_se): Ditto.
12539         (*cmp_sadd_di): Update split patterns.
12540         (*cmp_sadd_si): Ditto.
12541         (*cmp_sadd_sidi): Ditto.
12542         (*cmp_ssub_di): Ditto.
12543         (*cmp_ssub_si): Ditto.
12544         (*cmp_ssub_sidi): Ditto.
12545         * config/alpha/predicates.md (const23_operand): New predicate.
12546         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12547         Look for ASHIFT, not MULT inner operand.
12548         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
12550 2018-01-04  Martin Liska  <mliska@suse.cz>
12552         PR gcov-profile/83669
12553         * gcov.c (output_intermediate_file): Add version to intermediate
12554         gcov file.
12555         * doc/gcov.texi: Document new field 'version' in intermediate
12556         file format. Fix location of '-k' option of gcov command.
12558 2018-01-04  Martin Liska  <mliska@suse.cz>
12560         PR ipa/82352
12561         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
12563 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12565         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
12567 2018-01-03  Martin Sebor  <msebor@redhat.com>
12569         PR tree-optimization/83655
12570         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
12571         checking calls with invalid arguments.
12573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12575         * tree-vect-stmts.c (vect_get_store_rhs): New function.
12576         (vectorizable_mask_load_store): Delete.
12577         (vectorizable_call): Return false for masked loads and stores.
12578         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
12579         instead of gimple_assign_rhs1.
12580         (vectorizable_load): Handle IFN_MASK_LOAD.
12581         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
12583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12585         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
12586         split out from..,
12587         (vectorizable_mask_load_store): ...here.
12588         (vectorizable_load): ...and here.
12590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12592         * tree-vect-stmts.c (vect_build_all_ones_mask)
12593         (vect_build_zero_merge_argument): New functions, split out from...
12594         (vectorizable_load): ...here.
12596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12598         * tree-vect-stmts.c (vect_check_store_rhs): New function,
12599         split out from...
12600         (vectorizable_mask_load_store): ...here.
12601         (vectorizable_store): ...and here.
12603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12605         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12606         split out from...
12607         (vectorizable_mask_load_store): ...here.
12609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12611         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12612         (vect_model_store_cost): Take a vec_load_store_type instead of a
12613         vect_def_type.
12614         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12615         (vect_model_store_cost): Take a vec_load_store_type instead of a
12616         vect_def_type.
12617         (vectorizable_mask_load_store): Update accordingly.
12618         (vectorizable_store): Likewise.
12619         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12621 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12623         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12624         IFN_MASK_LOAD calls here rather than...
12625         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12627 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12628             Alan Hayward  <alan.hayward@arm.com>
12629             David Sherwood  <david.sherwood@arm.com>
12631         * expmed.c (extract_bit_field_1): For vector extracts,
12632         fall back to extract_bit_field_as_subreg if vec_extract
12633         isn't available.
12635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12636             Alan Hayward  <alan.hayward@arm.com>
12637             David Sherwood  <david.sherwood@arm.com>
12639         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12640         they are variable or constant sized.
12641         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12642         slots for constant-sized data.
12644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12645             Alan Hayward  <alan.hayward@arm.com>
12646             David Sherwood  <david.sherwood@arm.com>
12648         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12649         handling COND_EXPRs with boolean comparisons, try to find a better
12650         basis for the mask type than the boolean itself.
12652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12654         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12655         is calculated and how it can be overridden.
12656         * genmodes.c (max_bitsize_mode_any_mode): New variable.
12657         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12658         if defined.
12659         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12660         if nonzero.
12662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12663             Alan Hayward  <alan.hayward@arm.com>
12664             David Sherwood  <david.sherwood@arm.com>
12666         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12667         Remove the mode argument.
12668         (aarch64_simd_valid_immediate): Remove the mode and inverse
12669         arguments.
12670         * config/aarch64/iterators.md (bitsize): New iterator.
12671         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12672         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12673         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12674         aarch64_simd_valid_immediate.
12675         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12676         (aarch64_reg_or_bic_imm): Likewise.
12677         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12678         with an insn_type enum and msl with a modifier_type enum.
12679         Replace element_width with a scalar_mode.  Change the shift
12680         to unsigned int.  Add constructors for scalar_float_mode and
12681         scalar_int_mode elements.
12682         (aarch64_vect_float_const_representable_p): Delete.
12683         (aarch64_can_const_movi_rtx_p)
12684         (aarch64_simd_scalar_immediate_valid_for_move)
12685         (aarch64_simd_make_constant): Update call to
12686         aarch64_simd_valid_immediate.
12687         (aarch64_advsimd_valid_immediate_hs): New function.
12688         (aarch64_advsimd_valid_immediate): Likewise.
12689         (aarch64_simd_valid_immediate): Remove mode and inverse
12690         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
12691         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12692         and aarch64_float_const_representable_p on the result.
12693         (aarch64_output_simd_mov_immediate): Remove mode argument.
12694         Update call to aarch64_simd_valid_immediate and use of
12695         simd_immediate_info.
12696         (aarch64_output_scalar_simd_mov_immediate): Update call
12697         accordingly.
12699 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12700             Alan Hayward  <alan.hayward@arm.com>
12701             David Sherwood  <david.sherwood@arm.com>
12703         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12704         (mode_nunits): Likewise CONST_MODE_NUNITS.
12705         * machmode.def (ADJUST_NUNITS): Document.
12706         * genmodes.c (mode_data::need_nunits_adj): New field.
12707         (blank_mode): Update accordingly.
12708         (adj_nunits): New variable.
12709         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12710         parameter.
12711         (emit_mode_size_inline): Set need_bytesize_adj for all modes
12712         listed in adj_nunits.
12713         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12714         listed in adj_nunits.  Don't emit case statements for such modes.
12715         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12716         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
12717         nothing if adj_nunits is nonnull.
12718         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12719         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12720         (emit_mode_fbit): Update use of print_maybe_const_decl.
12721         (emit_move_size): Likewise.  Treat the array as non-const
12722         if adj_nunits.
12723         (emit_mode_adjustments): Handle adj_nunits.
12725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12727         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12728         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12729         (VECTOR_MODES): Use it.
12730         (make_vector_modes): Take the prefix as an argument.
12732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12733             Alan Hayward  <alan.hayward@arm.com>
12734             David Sherwood  <david.sherwood@arm.com>
12736         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12737         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12738         for MODE_VECTOR_BOOL.
12739         * machmode.def (VECTOR_BOOL_MODE): Document.
12740         * genmodes.c (VECTOR_BOOL_MODE): New macro.
12741         (make_vector_bool_mode): New function.
12742         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12743         MODE_VECTOR_BOOL.
12744         * lto-streamer-in.c (lto_input_mode_table): Likewise.
12745         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12746         Likewise.
12747         * stor-layout.c (int_mode_for_mode): Likewise.
12748         * tree.c (build_vector_type_for_mode): Likewise.
12749         * varasm.c (output_constant_pool_2): Likewise.
12750         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12751         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
12752         for MODE_VECTOR_BOOL.
12753         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12754         of mode class checks.
12755         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12756         instead of a list of mode class checks.
12757         (expand_vector_scalar_condition): Likewise.
12758         (type_for_widest_vector_mode): Handle BImode as an inner mode.
12760 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12761             Alan Hayward  <alan.hayward@arm.com>
12762             David Sherwood  <david.sherwood@arm.com>
12764         * machmode.h (mode_size): Change from unsigned short to
12765         poly_uint16_pod.
12766         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12767         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12768         or if measurement_type is not polynomial.
12769         (fixed_size_mode::includes_p): Check for constant-sized modes.
12770         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12771         return a poly_uint16 rather than an unsigned short.
12772         (emit_mode_size): Change the type of mode_size from unsigned short
12773         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
12774         (emit_mode_adjustments): Cope with polynomial vector sizes.
12775         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12776         for GET_MODE_SIZE.
12777         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12778         for GET_MODE_SIZE.
12779         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12780         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12781         * caller-save.c (setup_save_areas): Likewise.
12782         (replace_reg_with_saved_mem): Likewise.
12783         * calls.c (emit_library_call_value_1): Likewise.
12784         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12785         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12786         (gen_lowpart_for_combine): Likewise.
12787         * convert.c (convert_to_integer_1): Likewise.
12788         * cse.c (equiv_constant, cse_insn): Likewise.
12789         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
12790         (cselib_subst_to_values): Likewise.
12791         * dce.c (word_dce_process_block): Likewise.
12792         * df-problems.c (df_word_lr_mark_ref): Likewise.
12793         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
12794         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
12795         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
12796         (rtl_for_decl_location): Likewise.
12797         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
12798         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
12799         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
12800         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
12801         (expand_expr_real_1): Likewise.
12802         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
12803         (pad_below): Likewise.
12804         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12805         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
12806         * ira.c (get_subreg_tracking_sizes): Likewise.
12807         * ira-build.c (ira_create_allocno_objects): Likewise.
12808         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
12809         (ira_sort_regnos_for_alter_reg): Likewise.
12810         * ira-costs.c (record_operand_costs): Likewise.
12811         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
12812         (resolve_simple_move): Likewise.
12813         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
12814         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
12815         (lra_constraints): Likewise.
12816         (CONST_POOL_OK_P): Reject variable-sized modes.
12817         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
12818         (add_pseudo_to_slot, lra_spill): Likewise.
12819         * omp-low.c (omp_clause_aligned_alignment): Likewise.
12820         * optabs-query.c (get_best_extraction_insn): Likewise.
12821         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12822         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
12823         (expand_mult_highpart, valid_multiword_target_p): Likewise.
12824         * recog.c (offsettable_address_addr_space_p): Likewise.
12825         * regcprop.c (maybe_mode_change): Likewise.
12826         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
12827         * regrename.c (build_def_use): Likewise.
12828         * regstat.c (dump_reg_info): Likewise.
12829         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
12830         (find_reloads, find_reloads_subreg_address): Likewise.
12831         * reload1.c (eliminate_regs_1): Likewise.
12832         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
12833         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
12834         (simplify_binary_operation_1, simplify_subreg): Likewise.
12835         * targhooks.c (default_function_arg_padding): Likewise.
12836         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
12837         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
12838         (verify_gimple_assign_ternary): Likewise.
12839         * tree-inline.c (estimate_move_cost): Likewise.
12840         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12841         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
12842         (get_address_cost_ainc): Likewise.
12843         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
12844         (vect_supportable_dr_alignment): Likewise.
12845         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12846         (vectorizable_reduction): Likewise.
12847         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
12848         (vectorizable_operation, vectorizable_load): Likewise.
12849         * tree.c (build_same_sized_truth_vector_type): Likewise.
12850         * valtrack.c (cleanup_auto_inc_dec): Likewise.
12851         * var-tracking.c (emit_note_insn_var_location): Likewise.
12852         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
12853         (ADDR_VEC_ALIGN): Likewise.
12855 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12856             Alan Hayward  <alan.hayward@arm.com>
12857             David Sherwood  <david.sherwood@arm.com>
12859         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
12860         unsigned short.
12861         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12862         or if measurement_type is polynomial.
12863         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
12864         * combine.c (make_extraction): Likewise.
12865         * dse.c (find_shift_sequence): Likewise.
12866         * dwarf2out.c (mem_loc_descriptor): Likewise.
12867         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
12868         (extract_bit_field, extract_low_bits): Likewise.
12869         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
12870         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
12871         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
12872         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
12873         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12874         * reload.c (find_reloads): Likewise.
12875         * reload1.c (alter_reg): Likewise.
12876         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
12877         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
12878         * tree-if-conv.c (predicate_mem_writes): Likewise.
12879         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
12880         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
12881         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
12882         * valtrack.c (dead_debug_insert_temp): Likewise.
12883         * varasm.c (mergeable_constant_section): Likewise.
12884         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
12886 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12887             Alan Hayward  <alan.hayward@arm.com>
12888             David Sherwood  <david.sherwood@arm.com>
12890         * expr.c (expand_assignment): Cope with polynomial mode sizes
12891         when assigning to a CONCAT.
12893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12894             Alan Hayward  <alan.hayward@arm.com>
12895             David Sherwood  <david.sherwood@arm.com>
12897         * machmode.h (mode_precision): Change from unsigned short to
12898         poly_uint16_pod.
12899         (mode_to_precision): Return a poly_uint16 rather than an unsigned
12900         short.
12901         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
12902         or if measurement_type is not polynomial.
12903         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
12904         in which the mode is already known to be a scalar_int_mode.
12905         * genmodes.c (emit_mode_precision): Change the type of mode_precision
12906         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
12907         initializer.
12908         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12909         for GET_MODE_PRECISION.
12910         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12911         for GET_MODE_PRECISION.
12912         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
12913         as polynomial.
12914         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
12915         (expand_field_assignment, make_extraction): Likewise.
12916         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
12917         (get_last_value): Likewise.
12918         * convert.c (convert_to_integer_1): Likewise.
12919         * cse.c (cse_insn): Likewise.
12920         * expr.c (expand_expr_real_1): Likewise.
12921         * lra-constraints.c (simplify_operand_subreg): Likewise.
12922         * optabs-query.c (can_atomic_load_p): Likewise.
12923         * optabs.c (expand_atomic_load): Likewise.
12924         (expand_atomic_store): Likewise.
12925         * ree.c (combine_reaching_defs): Likewise.
12926         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
12927         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
12928         * tree.h (type_has_mode_precision_p): Likewise.
12929         * ubsan.c (instrument_si_overflow): Likewise.
12931 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12932             Alan Hayward  <alan.hayward@arm.com>
12933             David Sherwood  <david.sherwood@arm.com>
12935         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
12936         polynomial numbers of units.
12937         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
12938         (valid_vector_subparts_p): New function.
12939         (build_vector_type): Remove temporary shim and take the number
12940         of units as a poly_uint64 rather than an int.
12941         (build_opaque_vector_type): Take the number of units as a
12942         poly_uint64 rather than an int.
12943         * tree.c (build_vector_from_ctor): Handle polynomial
12944         TYPE_VECTOR_SUBPARTS.
12945         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
12946         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
12947         (build_vector_from_val): If the number of units is variable,
12948         use build_vec_duplicate_cst for constant operands and
12949         VEC_DUPLICATE_EXPR otherwise.
12950         (make_vector_type): Remove temporary is_constant ().
12951         (build_vector_type, build_opaque_vector_type): Take the number of
12952         units as a poly_uint64 rather than an int.
12953         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
12954         VECTOR_CST_NELTS.
12955         * cfgexpand.c (expand_debug_expr): Likewise.
12956         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
12957         (store_constructor, expand_expr_real_1): Likewise.
12958         (const_scalar_mask_from_tree): Likewise.
12959         * fold-const-call.c (fold_const_reduction): Likewise.
12960         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
12961         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
12962         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
12963         (fold_relational_const): Likewise.
12964         (native_interpret_vector): Likewise.  Change the size from an
12965         int to an unsigned int.
12966         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
12967         TYPE_VECTOR_SUBPARTS.
12968         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
12969         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
12970         duplicating a non-constant operand into a variable-length vector.
12971         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
12972         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
12973         * ipa-icf.c (sem_variable::equals): Likewise.
12974         * match.pd: Likewise.
12975         * omp-simd-clone.c (simd_clone_subparts): Likewise.
12976         * print-tree.c (print_node): Likewise.
12977         * stor-layout.c (layout_type): Likewise.
12978         * targhooks.c (default_builtin_vectorization_cost): Likewise.
12979         * tree-cfg.c (verify_gimple_comparison): Likewise.
12980         (verify_gimple_assign_binary): Likewise.
12981         (verify_gimple_assign_ternary): Likewise.
12982         (verify_gimple_assign_single): Likewise.
12983         * tree-pretty-print.c (dump_generic_node): Likewise.
12984         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12985         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
12986         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
12987         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
12988         (vect_shift_permute_load_chain): Likewise.
12989         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
12990         (expand_vector_condition, optimize_vector_constructor): Likewise.
12991         (lower_vec_perm, get_compute_type): Likewise.
12992         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12993         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
12994         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12995         (vect_recog_mask_conversion_pattern): Likewise.
12996         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
12997         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
12998         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12999         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13000         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13001         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13002         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13003         (supportable_widening_operation): Likewise.
13004         (supportable_narrowing_operation): Likewise.
13005         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13006         Likewise.
13007         * varasm.c (output_constant): Likewise.
13009 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13010             Alan Hayward  <alan.hayward@arm.com>
13011             David Sherwood  <david.sherwood@arm.com>
13013         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13014         so that both the length == 3 and length != 3 cases set up their
13015         own permute vectors.  Add comments explaining why we know the
13016         number of elements is constant.
13017         (vect_permute_load_chain): Likewise.
13019 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13020             Alan Hayward  <alan.hayward@arm.com>
13021             David Sherwood  <david.sherwood@arm.com>
13023         * machmode.h (mode_nunits): Change from unsigned char to
13024         poly_uint16_pod.
13025         (ONLY_FIXED_SIZE_MODES): New macro.
13026         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13027         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13028         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13029         New typedefs.
13030         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13031         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13032         or if measurement_type is not polynomial.
13033         * genmodes.c (ZERO_COEFFS): New macro.
13034         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13035         poly_uint16.
13036         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13037         Use ZERO_COEFFS when emitting initializers.
13038         * data-streamer.h (bp_pack_poly_value): New function.
13039         (bp_unpack_poly_value): Likewise.
13040         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13041         for GET_MODE_NUNITS.
13042         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13043         for GET_MODE_NUNITS.
13044         * tree.c (make_vector_type): Remove temporary shim and make
13045         the real function take the number of units as a poly_uint64
13046         rather than an int.
13047         (build_vector_type_for_mode): Handle polynomial nunits.
13048         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13049         * emit-rtl.c (const_vec_series_p_1): Likewise.
13050         (gen_rtx_CONST_VECTOR): Likewise.
13051         * fold-const.c (test_vec_duplicate_folding): Likewise.
13052         * genrecog.c (validate_pattern): Likewise.
13053         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13054         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13055         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13056         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13057         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13058         * rtlanal.c (subreg_get_info): Likewise.
13059         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13060         (vect_grouped_load_supported): Likewise.
13061         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13062         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13063         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13064         (simplify_const_unary_operation, simplify_binary_operation_1)
13065         (simplify_const_binary_operation, simplify_ternary_operation)
13066         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13067         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13068         instead of CONST_VECTOR_NUNITS.
13069         * varasm.c (output_constant_pool_2): Likewise.
13070         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13071         explicit-encoded elements in the XVEC for variable-length vectors.
13073 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13075         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13078             Alan Hayward  <alan.hayward@arm.com>
13079             David Sherwood  <david.sherwood@arm.com>
13081         * coretypes.h (fixed_size_mode): Declare.
13082         (fixed_size_mode_pod): New typedef.
13083         * builtins.h (target_builtins::x_apply_args_mode)
13084         (target_builtins::x_apply_result_mode): Change type to
13085         fixed_size_mode_pod.
13086         * builtins.c (apply_args_size, apply_result_size, result_vector)
13087         (expand_builtin_apply_args_1, expand_builtin_apply)
13088         (expand_builtin_return): Update accordingly.
13090 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13092         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13093         * cselib.c (cselib_hash_rtx): Likewise.
13094         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13095         CONST_VECTOR encoding.
13097 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13098             Jeff Law  <law@redhat.com>
13100         PR target/83641
13101         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13102         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13103         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13104         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13106         PR target/83641
13107         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13108         explicitly probe *sp in a noreturn function if there were any callee
13109         register saves or frame pointer is needed.
13111 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13113         PR debug/83621
13114         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13115         BLKmode for ternary, binary or unary expressions.
13117         PR debug/83645
13118         * var-tracking.c (delete_vta_debug_insn): New inline function.
13119         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13120         insns from get_insns () to NULL instead of each bb separately.
13121         Use delete_vta_debug_insn.  No longer static.
13122         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13123         delete_vta_debug_insns callers.
13124         * rtl.h (delete_vta_debug_insns): Declare.
13125         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13126         instead of variable_tracking_main.
13128 2018-01-03  Martin Sebor  <msebor@redhat.com>
13130         PR tree-optimization/83603
13131         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13132         arguments past the endof the argument list in functions declared
13133         without a prototype.
13134         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13135         Avoid checking when arguments are null.
13137 2018-01-03  Martin Sebor  <msebor@redhat.com>
13139         PR c/83559
13140         * doc/extend.texi (attribute const): Fix a typo.
13141         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13142         issuing -Wsuggest-attribute for void functions.
13144 2018-01-03  Martin Sebor  <msebor@redhat.com>
13146         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13147         offset_int::from instead of wide_int::to_shwi.
13148         (maybe_diag_overlap): Remove assertion.
13149         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13150         * gimple-ssa-sprintf.c (format_directive): Same.
13151         (parse_directive): Same.
13152         (sprintf_dom_walker::compute_format_length): Same.
13153         (try_substitute_return_value): Same.
13155 2018-01-03  Jeff Law  <law@redhat.com>
13157         PR middle-end/83654
13158         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13159         non-constant residual for zero at runtime and avoid probing in
13160         that case.  Reorganize code for trailing problem to mirror handling
13161         of the residual.
13163 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13165         PR tree-optimization/83501
13166         * tree-ssa-strlen.c (get_string_cst): New.
13167         (handle_char_store): Call get_string_cst.
13169 2018-01-03  Martin Liska  <mliska@suse.cz>
13171         PR tree-optimization/83593
13172         * tree-ssa-strlen.c: Include tree-cfg.h.
13173         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13174         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13175         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13176         to false.
13177         (strlen_dom_walker::before_dom_children): Call
13178         gimple_purge_dead_eh_edges. Dump tranformation with details
13179         dump flags.
13180         (strlen_dom_walker::before_dom_children): Update call by adding
13181         new argument cleanup_eh.
13182         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13184 2018-01-03  Martin Liska  <mliska@suse.cz>
13186         PR ipa/83549
13187         * cif-code.def (VARIADIC_THUNK): New enum value.
13188         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13189         thunks.
13191 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13193         * sse.md (mov<mode>_internal): Tighten condition for when to use
13194         vmovdqu<ssescalarsize> for TI and OI modes.
13196 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13198         Update copyright years.
13200 2018-01-03  Martin Liska  <mliska@suse.cz>
13202         PR ipa/83594
13203         * ipa-visibility.c (function_and_variable_visibility): Skip
13204         functions with noipa attribure.
13206 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13208         * gcc.c (process_command): Update copyright notice dates.
13209         * gcov-dump.c (print_version): Ditto.
13210         * gcov.c (print_version): Ditto.
13211         * gcov-tool.c (print_version): Ditto.
13212         * gengtype.c (create_file): Ditto.
13213         * doc/cpp.texi: Bump @copying's copyright year.
13214         * doc/cppinternals.texi: Ditto.
13215         * doc/gcc.texi: Ditto.
13216         * doc/gccint.texi: Ditto.
13217         * doc/gcov.texi: Ditto.
13218         * doc/install.texi: Ditto.
13219         * doc/invoke.texi: Ditto.
13221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13223         * vector-builder.h (vector_builder::m_full_nelts): Change from
13224         unsigned int to poly_uint64.
13225         (vector_builder::full_nelts): Update prototype accordingly.
13226         (vector_builder::new_vector): Likewise.
13227         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13228         (vector_builder::operator ==): Likewise.
13229         (vector_builder::finalize): Likewise.
13230         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13231         Take the number of elements as a poly_uint64 rather than an
13232         unsigned int.
13233         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13234         from unsigned int to poly_uint64.
13235         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13236         (vec_perm_indices::new_vector): Likewise.
13237         (vec_perm_indices::length): Likewise.
13238         (vec_perm_indices::nelts_per_input): Likewise.
13239         (vec_perm_indices::input_nelts): Likewise.
13240         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13241         number of elements per input as a poly_uint64 rather than an
13242         unsigned int.  Use the original encoding for variable-length
13243         vectors, rather than clamping each individual element.
13244         For the second and subsequent elements in each pattern,
13245         clamp the step and base before clamping their sum.
13246         (vec_perm_indices::series_p): Handle polynomial element counts.
13247         (vec_perm_indices::all_in_range_p): Likewise.
13248         (vec_perm_indices_to_tree): Likewise.
13249         (vec_perm_indices_to_rtx): Likewise.
13250         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13251         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13252         (tree_vector_builder::new_binary_operation): Handle polynomial
13253         element counts.  Return false if we need to know the number
13254         of elements at compile time.
13255         * fold-const.c (fold_vec_perm): Punt if the number of elements
13256         isn't known at compile time.
13258 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13260         * vec-perm-indices.h (vec_perm_builder): Change element type
13261         from HOST_WIDE_INT to poly_int64.
13262         (vec_perm_indices::element_type): Update accordingly.
13263         (vec_perm_indices::clamp): Handle polynomial element_types.
13264         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13265         (vec_perm_indices::all_in_range_p): Likewise.
13266         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13267         than shwi trees.
13268         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13269         polynomial vec_perm_indices element types.
13270         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13271         * fold-const.c (fold_vec_perm): Likewise.
13272         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13273         * tree-vect-generic.c (lower_vec_perm): Likewise.
13274         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13275         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13276         element type to HOST_WIDE_INT.
13278 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13279             Alan Hayward  <alan.hayward@arm.com>
13280             David Sherwood  <david.sherwood@arm.com>
13282         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13283         rather than an int.  Use plus_constant.
13284         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13285         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13288             Alan Hayward  <alan.hayward@arm.com>
13289             David Sherwood  <david.sherwood@arm.com>
13291         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13292         a HOST_WIDE_INT to a poly_int64.
13294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13295             Alan Hayward  <alan.hayward@arm.com>
13296             David Sherwood  <david.sherwood@arm.com>
13298         * calls.c (load_register_parameters): Cope with polynomial
13299         mode sizes.  Require a constant size for BLKmode parameters
13300         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13301         forces a parameter to be padded at the lsb end in order to
13302         fill a complete number of words, require the parameter size
13303         to be ordered wrt UNITS_PER_WORD.
13305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13306             Alan Hayward  <alan.hayward@arm.com>
13307             David Sherwood  <david.sherwood@arm.com>
13309         * reload1.c (spill_stack_slot_width): Change element type
13310         from unsigned int to poly_uint64_pod.
13311         (alter_reg): Treat mode sizes as polynomial.
13313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13314             Alan Hayward  <alan.hayward@arm.com>
13315             David Sherwood  <david.sherwood@arm.com>
13317         * reload.c (complex_word_subreg_p): New function.
13318         (reload_inner_reg_of_subreg, push_reload): Use it.
13320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13321             Alan Hayward  <alan.hayward@arm.com>
13322             David Sherwood  <david.sherwood@arm.com>
13324         * lra-constraints.c (process_alt_operands): Reject matched
13325         operands whose sizes aren't ordered.
13326         (match_reload): Refer to this check here.
13328 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13329             Alan Hayward  <alan.hayward@arm.com>
13330             David Sherwood  <david.sherwood@arm.com>
13332         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13333         that the mode size is in the set {1, 2, 4, 8, 16}.
13335 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13336             Alan Hayward  <alan.hayward@arm.com>
13337             David Sherwood  <david.sherwood@arm.com>
13339         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13340         Use plus_constant instead of gen_rtx_PLUS.
13342 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13343             Alan Hayward  <alan.hayward@arm.com>
13344             David Sherwood  <david.sherwood@arm.com>
13346         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13347         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13348         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13349         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13350         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13351         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13352         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13353         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13354         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13355         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13356         a poly_int64.
13357         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13358         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13359         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13360         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13361         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13362         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13363         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13364         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13365         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13366         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13367         function.
13368         * expr.c (emit_move_resolve_push): Treat the input and result
13369         of PUSH_ROUNDING as a poly_int64.
13370         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13371         (emit_push_insn): Likewise.
13372         * lra-eliminations.c (mark_not_eliminable): Likewise.
13373         * recog.c (push_operand): Likewise.
13374         * reload1.c (elimination_effects): Likewise.
13375         * rtlanal.c (nonzero_bits1): Likewise.
13376         * calls.c (store_one_arg): Likewise.  Require the padding to be
13377         known at compile time.
13379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13380             Alan Hayward  <alan.hayward@arm.com>
13381             David Sherwood  <david.sherwood@arm.com>
13383         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13384         Use plus_constant instead of gen_rtx_PLUS.
13386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13387             Alan Hayward  <alan.hayward@arm.com>
13388             David Sherwood  <david.sherwood@arm.com>
13390         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13391         rather than an int.
13393 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13394             Alan Hayward  <alan.hayward@arm.com>
13395             David Sherwood  <david.sherwood@arm.com>
13397         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13398         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13399         via stack temporaries.  Treat the mode size as polynomial too.
13401 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13402             Alan Hayward  <alan.hayward@arm.com>
13403             David Sherwood  <david.sherwood@arm.com>
13405         * expr.c (expand_expr_real_2): When handling conversions involving
13406         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13407         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13408         as a poly_uint64 too.
13410 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13411             Alan Hayward  <alan.hayward@arm.com>
13412             David Sherwood  <david.sherwood@arm.com>
13414         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13417             Alan Hayward  <alan.hayward@arm.com>
13418             David Sherwood  <david.sherwood@arm.com>
13420         * combine.c (can_change_dest_mode): Handle polynomial
13421         REGMODE_NATURAL_SIZE.
13422         * expmed.c (store_bit_field_1): Likewise.
13423         * expr.c (store_constructor): Likewise.
13424         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13425         and polynomial REGMODE_NATURAL_SIZE.
13426         (gen_lowpart_common): Likewise.
13427         * reginfo.c (record_subregs_of_mode): Likewise.
13428         * rtlanal.c (read_modify_subreg_p): Likewise.
13430 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13431             Alan Hayward  <alan.hayward@arm.com>
13432             David Sherwood  <david.sherwood@arm.com>
13434         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13435         numbers of elements.
13437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13438             Alan Hayward  <alan.hayward@arm.com>
13439             David Sherwood  <david.sherwood@arm.com>
13441         * match.pd: Cope with polynomial numbers of vector elements.
13443 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13444             Alan Hayward  <alan.hayward@arm.com>
13445             David Sherwood  <david.sherwood@arm.com>
13447         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13448         in a POINTER_PLUS_EXPR.
13450 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13451             Alan Hayward  <alan.hayward@arm.com>
13452             David Sherwood  <david.sherwood@arm.com>
13454         * omp-simd-clone.c (simd_clone_subparts): New function.
13455         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13456         (ipa_simd_modify_function_body): Likewise.
13458 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13459             Alan Hayward  <alan.hayward@arm.com>
13460             David Sherwood  <david.sherwood@arm.com>
13462         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13463         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13464         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13465         (expand_vector_condition, vector_element): Likewise.
13466         (subparts_gt): New function.
13467         (get_compute_type): Use subparts_gt.
13468         (count_type_subparts): Delete.
13469         (expand_vector_operations_1): Use subparts_gt instead of
13470         count_type_subparts.
13472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13473             Alan Hayward  <alan.hayward@arm.com>
13474             David Sherwood  <david.sherwood@arm.com>
13476         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13477         (vect_compile_time_alias): ...this new function.  Do the calculation
13478         on poly_ints rather than trees.
13479         (vect_prune_runtime_alias_test_list): Update call accordingly.
13481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13482             Alan Hayward  <alan.hayward@arm.com>
13483             David Sherwood  <david.sherwood@arm.com>
13485         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13486         numbers of units.
13487         (vect_schedule_slp_instance): Likewise.
13489 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13490             Alan Hayward  <alan.hayward@arm.com>
13491             David Sherwood  <david.sherwood@arm.com>
13493         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13494         constant and extern definitions for variable-length vectors.
13495         (vect_get_constant_vectors): Note that the number of units
13496         is known to be constant.
13498 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13499             Alan Hayward  <alan.hayward@arm.com>
13500             David Sherwood  <david.sherwood@arm.com>
13502         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13503         of units as polynomial.  Choose between WIDE and NARROW based
13504         on multiple_p.
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         * tree-vect-stmts.c (simd_clone_subparts): New function.
13511         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13514             Alan Hayward  <alan.hayward@arm.com>
13515             David Sherwood  <david.sherwood@arm.com>
13517         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13518         vectors as polynomial.  Use build_index_vector for
13519         IFN_GOMP_SIMD_LANE.
13521 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13522             Alan Hayward  <alan.hayward@arm.com>
13523             David Sherwood  <david.sherwood@arm.com>
13525         * tree-vect-stmts.c (get_load_store_type): Treat the number of
13526         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13527         for variable-length vectors.
13528         (vectorizable_mask_load_store): Treat the number of units as
13529         polynomial, asserting that it is constant if the condition has
13530         already been enforced.
13531         (vectorizable_store, vectorizable_load): Likewise.
13533 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13534             Alan Hayward  <alan.hayward@arm.com>
13535             David Sherwood  <david.sherwood@arm.com>
13537         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13538         of units as polynomial.  Punt if we can't tell at compile time
13539         which vector contains the final result.
13541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13542             Alan Hayward  <alan.hayward@arm.com>
13543             David Sherwood  <david.sherwood@arm.com>
13545         * tree-vect-loop.c (vectorizable_induction): Treat the number
13546         of units as polynomial.  Punt on SLP inductions.  Use an integer
13547         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
13548         cast of such a series for variable-length floating-point
13549         reductions.
13551 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13552             Alan Hayward  <alan.hayward@arm.com>
13553             David Sherwood  <david.sherwood@arm.com>
13555         * tree.h (build_index_vector): Declare.
13556         * tree.c (build_index_vector): New function.
13557         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
13558         of units as polynomial, forcibly converting it to a constant if
13559         vectorizable_reduction has already enforced the condition.
13560         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
13561         to create a {1,2,3,...} vector.
13562         (vectorizable_reduction): Treat the number of units as polynomial.
13563         Choose vectype_in based on the largest scalar element size rather
13564         than the smallest number of units.  Enforce the restrictions
13565         relied on above.
13567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13568             Alan Hayward  <alan.hayward@arm.com>
13569             David Sherwood  <david.sherwood@arm.com>
13571         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
13572         number of units as polynomial.
13574 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13575             Alan Hayward  <alan.hayward@arm.com>
13576             David Sherwood  <david.sherwood@arm.com>
13578         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
13579         * target.def (autovectorize_vector_sizes): Return the vector sizes
13580         by pointer, using vector_sizes rather than a bitmask.
13581         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
13582         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
13583         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
13584         Likewise.
13585         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
13586         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
13587         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
13588         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
13589         * omp-general.c (omp_max_vf): Likewise.
13590         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13591         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
13592         * tree-vect-loop.c (vect_analyze_loop): Likewise.
13593         * tree-vect-slp.c (vect_slp_bb): Likewise.
13594         * doc/tm.texi: Regenerate.
13595         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
13596         to a poly_uint64.
13597         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13598         the vector size as a poly_uint64 rather than an unsigned int.
13599         (current_vector_size): Change from an unsigned int to a poly_uint64.
13600         (get_vectype_for_scalar_type): Update accordingly.
13601         * tree.h (build_truth_vector_type): Take the size and number of
13602         units as a poly_uint64 rather than an unsigned int.
13603         (build_vector_type): Add a temporary overload that takes
13604         the number of units as a poly_uint64 rather than an unsigned int.
13605         * tree.c (make_vector_type): Likewise.
13606         (build_truth_vector_type): Take the number of units as a poly_uint64
13607         rather than an unsigned int.
13609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13610             Alan Hayward  <alan.hayward@arm.com>
13611             David Sherwood  <david.sherwood@arm.com>
13613         * target.def (get_mask_mode): Take the number of units and length
13614         as poly_uint64s rather than unsigned ints.
13615         * targhooks.h (default_get_mask_mode): Update accordingly.
13616         * targhooks.c (default_get_mask_mode): Likewise.
13617         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13618         * doc/tm.texi: Regenerate.
13620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13621             Alan Hayward  <alan.hayward@arm.com>
13622             David Sherwood  <david.sherwood@arm.com>
13624         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13625         * omp-general.c (omp_max_vf): Likewise.
13626         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13627         (expand_omp_simd): Handle polynomial safelen.
13628         * omp-low.c (omplow_simd_context): Add a default constructor.
13629         (omplow_simd_context::max_vf): Change from int to poly_uint64.
13630         (lower_rec_simd_input_clauses): Update accordingly.
13631         (lower_rec_input_clauses): Likewise.
13633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13634             Alan Hayward  <alan.hayward@arm.com>
13635             David Sherwood  <david.sherwood@arm.com>
13637         * tree-vectorizer.h (vect_nunits_for_cost): New function.
13638         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13639         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13640         (vect_analyze_slp_cost): Likewise.
13641         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13642         (vect_model_load_cost): Likewise.
13644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13645             Alan Hayward  <alan.hayward@arm.com>
13646             David Sherwood  <david.sherwood@arm.com>
13648         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13649         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13650         from an unsigned int * to a poly_uint64_pod *.
13651         (calculate_unrolling_factor): New function.
13652         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
13654 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13655             Alan Hayward  <alan.hayward@arm.com>
13656             David Sherwood  <david.sherwood@arm.com>
13658         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13659         from an unsigned int to a poly_uint64.
13660         (_loop_vec_info::slp_unrolling_factor): Likewise.
13661         (_loop_vec_info::vectorization_factor): Change from an int
13662         to a poly_uint64.
13663         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13664         (vect_get_num_vectors): New function.
13665         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13666         (vect_get_num_copies): Use vect_get_num_vectors.
13667         (vect_analyze_data_ref_dependences): Change max_vf from an int *
13668         to an unsigned int *.
13669         (vect_analyze_data_refs): Change min_vf from an int * to a
13670         poly_uint64 *.
13671         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13672         than an unsigned HOST_WIDE_INT.
13673         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13674         (vect_analyze_data_ref_dependence): Change max_vf from an int *
13675         to an unsigned int *.
13676         (vect_analyze_data_ref_dependences): Likewise.
13677         (vect_compute_data_ref_alignment): Handle polynomial vf.
13678         (vect_enhance_data_refs_alignment): Likewise.
13679         (vect_prune_runtime_alias_test_list): Likewise.
13680         (vect_shift_permute_load_chain): Likewise.
13681         (vect_supportable_dr_alignment): Likewise.
13682         (dependence_distance_ge_vf): Take the vectorization factor as a
13683         poly_uint64 rather than an unsigned HOST_WIDE_INT.
13684         (vect_analyze_data_refs): Change min_vf from an int * to a
13685         poly_uint64 *.
13686         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13687         vfm1 as a poly_uint64 rather than an int.  Make the same change
13688         for the returned bound_scalar.
13689         (vect_gen_vector_loop_niters): Handle polynomial vf.
13690         (vect_do_peeling): Likewise.  Update call to
13691         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13692         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13693         be constant.
13694         * tree-vect-loop.c (vect_determine_vectorization_factor)
13695         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13696         (vect_get_known_peeling_cost): Likewise.
13697         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13698         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13699         (vect_transform_loop): Likewise.  Use the lowest possible VF when
13700         updating the upper bounds of the loop.
13701         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
13702         rather than an int.
13703         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13704         polynomial unroll factors.
13705         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13706         (vect_make_slp_decision): Likewise.
13707         (vect_supported_load_permutation_p): Likewise, and polynomial
13708         vf too.
13709         (vect_analyze_slp_cost): Handle polynomial vf.
13710         (vect_slp_analyze_node_operations): Likewise.
13711         (vect_slp_analyze_bb_1): Likewise.
13712         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13713         than an unsigned HOST_WIDE_INT.
13714         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13715         (vectorizable_load): Handle polynomial vf.
13716         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13717         a poly_uint64.
13718         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13721             Alan Hayward  <alan.hayward@arm.com>
13722             David Sherwood  <david.sherwood@arm.com>
13724         * match.pd: Handle bit operations involving three constants
13725         and try to fold one pair.
13727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13729         * tree-vect-loop-manip.c: Include gimple-fold.h.
13730         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13731         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
13732         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13733         Add a path that uses a step of VF instead of 1, but disable it
13734         for now.
13735         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13736         and niters_no_overflow parameters.  Update calls to
13737         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13738         Create a new SSA name if the latter choses to use a ste other
13739         than zero, and return it via niters_vector_mult_vf_var.
13740         * tree-vect-loop.c (vect_transform_loop): Update calls to
13741         vect_do_peeling, vect_gen_vector_loop_niters and
13742         slpeel_make_loop_iterate_ntimes.
13743         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13744         (vect_gen_vector_loop_niters): Update declarations after above changes.
13746 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
13748         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13749         128-bit round to integer instructions.
13750         (ceil<mode>2): Likewise.
13751         (btrunc<mode>2): Likewise.
13752         (round<mode>2): Likewise.
13754 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13756         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13757         unaligned VSX load/store on P8/P9.
13758         (expand_block_clear): Allow the use of unaligned VSX
13759         load/store on P8/P9.
13761 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13763         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13764         New function.
13765         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13766         swap associated with both a load and a store.
13768 2018-01-02  Andrew Waterman  <andrew@sifive.com>
13770         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13771         * config/riscv/riscv.md (clear_cache): Use it.
13773 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
13775         * web.c: Remove out-of-date comment.
13777 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13779         * expr.c (fixup_args_size_notes): Check that any existing
13780         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13781         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13782         (emit_single_push_insn): ...here.
13784 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13786         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13787         (const_vector_encoded_nelts): New function.
13788         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
13789         (const_vector_int_elt, const_vector_elt): Declare.
13790         * emit-rtl.c (const_vector_int_elt_1): New function.
13791         (const_vector_elt): Likewise.
13792         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
13793         of CONST_VECTOR_ELT.
13795 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13797         * expr.c: Include rtx-vector-builder.h.
13798         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
13799         directly on the tree encoding.
13800         (const_vector_from_tree): Likewise.
13801         * optabs.c: Include rtx-vector-builder.h.
13802         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
13803         sequence of "u" values.
13804         * vec-perm-indices.c: Include rtx-vector-builder.h.
13805         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
13806         directly on the vec_perm_indices encoding.
13808 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13810         * doc/rtl.texi (const_vector): Describe new encoding scheme.
13811         * Makefile.in (OBJS): Add rtx-vector-builder.o.
13812         * rtx-vector-builder.h: New file.
13813         * rtx-vector-builder.c: Likewise.
13814         * rtl.h (rtx_def::u2): Add a const_vector field.
13815         (CONST_VECTOR_NPATTERNS): New macro.
13816         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
13817         (CONST_VECTOR_DUPLICATE_P): Likewise.
13818         (CONST_VECTOR_STEPPED_P): Likewise.
13819         (CONST_VECTOR_ENCODED_ELT): Likewise.
13820         (const_vec_duplicate_p): Check for a duplicated vector encoding.
13821         (unwrap_const_vec_duplicate): Likewise.
13822         (const_vec_series_p): Check for a non-duplicated vector encoding.
13823         Say that the function only returns true for integer vectors.
13824         * emit-rtl.c: Include rtx-vector-builder.h.
13825         (gen_const_vec_duplicate_1): Delete.
13826         (gen_const_vector): Call gen_const_vec_duplicate instead of
13827         gen_const_vec_duplicate_1.
13828         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
13829         (gen_const_vec_duplicate): Use rtx_vector_builder.
13830         (gen_const_vec_series): Likewise.
13831         (gen_rtx_CONST_VECTOR): Likewise.
13832         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
13833         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13834         Build a new vector rather than modifying a CONST_VECTOR in-place.
13835         (handle_special_swappables): Update call accordingly.
13836         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
13837         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13838         Build a new vector rather than modifying a CONST_VECTOR in-place.
13839         (handle_special_swappables): Update call accordingly.
13841 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13843         * simplify-rtx.c (simplify_const_binary_operation): Use
13844         CONST_VECTOR_ELT instead of XVECEXP.
13846 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13848         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
13849         the selector elements to be different from the data elements
13850         if the selector is a VECTOR_CST.
13851         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
13852         ssizetype for the selector.
13854 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13856         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
13857         before testing each element individually.
13858         * tree-vect-generic.c (lower_vec_perm): Likewise.
13860 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13862         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
13863         * selftest-run-tests.c (selftest::run_tests): Call it.
13864         * vector-builder.h (vector_builder::operator ==): New function.
13865         (vector_builder::operator !=): Likewise.
13866         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
13867         (vec_perm_indices::all_from_input_p): New function.
13868         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13869         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
13870         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
13871         instead of reading the VECTOR_CST directly.  Detect whether both
13872         vector inputs are the same before constructing the vec_perm_indices,
13873         and update the number of inputs argument accordingly.  Use the
13874         utility functions added above.  Only construct sel2 if we need to.
13876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13878         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
13879         the broadcast of the low byte.
13880         (expand_mult_highpart): Use an explicit encoding for the permutes.
13881         * optabs-query.c (can_mult_highpart_p): Likewise.
13882         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13883         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13884         (vectorizable_bswap): Likewise.
13885         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
13886         explicit encoding for the power-of-2 permutes.
13887         (vect_permute_store_chain): Likewise.
13888         (vect_grouped_load_supported): Likewise.
13889         (vect_permute_load_chain): Likewise.
13891 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13893         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
13894         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
13895         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
13896         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13897         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
13898         (vect_gen_perm_mask_any): Likewise.
13900 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13902         * int-vector-builder.h: New file.
13903         * vec-perm-indices.h: Include int-vector-builder.h.
13904         (vec_perm_indices): Redefine as an int_vector_builder.
13905         (auto_vec_perm_indices): Delete.
13906         (vec_perm_builder): Redefine as a stand-alone class.
13907         (vec_perm_indices::vec_perm_indices): New function.
13908         (vec_perm_indices::clamp): Likewise.
13909         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
13910         (vec_perm_indices::new_vector): New function.
13911         (vec_perm_indices::new_expanded_vector): Update for new
13912         vec_perm_indices class.
13913         (vec_perm_indices::rotate_inputs): New function.
13914         (vec_perm_indices::all_in_range_p): Operate directly on the
13915         encoded form, without computing elided elements.
13916         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
13917         encoding.  Update for new vec_perm_indices class.
13918         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
13919         the given vec_perm_builder.
13920         (expand_vec_perm_var): Update vec_perm_builder constructor.
13921         (expand_mult_highpart): Use vec_perm_builder instead of
13922         auto_vec_perm_indices.
13923         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
13924         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
13925         or double series encoding as appropriate.
13926         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
13927         vec_perm_indices instead of auto_vec_perm_indices.
13928         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13929         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13930         (vect_permute_store_chain): Likewise.
13931         (vect_grouped_load_supported): Likewise.
13932         (vect_permute_load_chain): Likewise.
13933         (vect_shift_permute_load_chain): Likewise.
13934         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13935         (vect_transform_slp_perm_load): Likewise.
13936         (vect_schedule_slp_instance): Likewise.
13937         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13938         (vectorizable_mask_load_store): Likewise.
13939         (vectorizable_bswap): Likewise.
13940         (vectorizable_store): Likewise.
13941         (vectorizable_load): Likewise.
13942         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
13943         vec_perm_indices instead of auto_vec_perm_indices.  Use
13944         tree_to_vec_perm_builder to read the vector from a tree.
13945         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
13946         vec_perm_builder instead of a vec_perm_indices.
13947         (have_whole_vector_shift): Use vec_perm_builder and
13948         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
13949         truncation to calc_vec_perm_mask_for_shift.
13950         (vect_create_epilog_for_reduction): Likewise.
13951         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
13952         from auto_vec_perm_indices to vec_perm_indices.
13953         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13954         instead of changing individual elements.
13955         (aarch64_vectorize_vec_perm_const): Use new_vector to install
13956         the vector in d.perm.
13957         * config/arm/arm.c (expand_vec_perm_d::perm): Change
13958         from auto_vec_perm_indices to vec_perm_indices.
13959         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13960         instead of changing individual elements.
13961         (arm_vectorize_vec_perm_const): Use new_vector to install
13962         the vector in d.perm.
13963         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
13964         Update vec_perm_builder constructor.
13965         (rs6000_expand_interleave): Likewise.
13966         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
13967         (rs6000_expand_interleave): Likewise.
13969 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13971         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
13972         to qimode could truncate the indices.
13973         * optabs.c (expand_vec_perm_var): Likewise.
13975 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13977         * Makefile.in (OBJS): Add vec-perm-indices.o.
13978         * vec-perm-indices.h: New file.
13979         * vec-perm-indices.c: Likewise.
13980         * target.h (vec_perm_indices): Replace with a forward class
13981         declaration.
13982         (auto_vec_perm_indices): Move to vec-perm-indices.h.
13983         * optabs.h: Include vec-perm-indices.h.
13984         (expand_vec_perm): Delete.
13985         (selector_fits_mode_p, expand_vec_perm_var): Declare.
13986         (expand_vec_perm_const): Declare.
13987         * target.def (vec_perm_const_ok): Replace with...
13988         (vec_perm_const): ...this new hook.
13989         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
13990         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
13991         * doc/tm.texi: Regenerate.
13992         * optabs.def (vec_perm_const): Delete.
13993         * doc/md.texi (vec_perm_const): Likewise.
13994         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
13995         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
13996         expand_vec_perm for constant permutation vectors.  Assert that
13997         the mode of variable permutation vectors is the integer equivalent
13998         of the mode that is being permuted.
13999         * optabs-query.h (selector_fits_mode_p): Declare.
14000         * optabs-query.c: Include vec-perm-indices.h.
14001         (selector_fits_mode_p): New function.
14002         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14003         is defined, instead of checking whether the vec_perm_const_optab
14004         exists.  Use targetm.vectorize.vec_perm_const instead of
14005         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14006         fit in the vector mode before using a variable permute.
14007         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14008         vec_perm_indices instead of an rtx.
14009         (expand_vec_perm): Replace with...
14010         (expand_vec_perm_const): ...this new function.  Take the selector
14011         as a vec_perm_indices rather than an rtx.  Also take the mode of
14012         the selector.  Update call to shift_amt_for_vec_perm_mask.
14013         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14014         Use vec_perm_indices::new_expanded_vector to expand the original
14015         selector into bytes.  Check whether the indices fit in the vector
14016         mode before using a variable permute.
14017         (expand_vec_perm_var): Make global.
14018         (expand_mult_highpart): Use expand_vec_perm_const.
14019         * fold-const.c: Includes vec-perm-indices.h.
14020         * tree-ssa-forwprop.c: Likewise.
14021         * tree-vect-data-refs.c: Likewise.
14022         * tree-vect-generic.c: Likewise.
14023         * tree-vect-loop.c: Likewise.
14024         * tree-vect-slp.c: Likewise.
14025         * tree-vect-stmts.c: Likewise.
14026         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14027         Delete.
14028         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14029         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14030         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14031         (aarch64_vectorize_vec_perm_const): ...this new function.
14032         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14033         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14034         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14035         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14036         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14037         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14038         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14039         into...
14040         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14041         check for NEON modes.
14042         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14043         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14044         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14045         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14046         into...
14047         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14048         the old VEC_PERM_CONST conditions.
14049         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14050         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14051         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14052         (ia64_vectorize_vec_perm_const_ok): Merge into...
14053         (ia64_vectorize_vec_perm_const): ...this new function.
14054         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14055         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14056         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14057         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14058         * config/mips/mips.c (mips_expand_vec_perm_const)
14059         (mips_vectorize_vec_perm_const_ok): Merge into...
14060         (mips_vectorize_vec_perm_const): ...this new function.
14061         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14062         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14063         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14064         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14065         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14066         (rs6000_expand_vec_perm_const): Delete.
14067         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14068         Delete.
14069         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14070         (altivec_expand_vec_perm_const_le): Take each operand individually.
14071         Operate on constant selectors rather than rtxes.
14072         (altivec_expand_vec_perm_const): Likewise.  Update call to
14073         altivec_expand_vec_perm_const_le.
14074         (rs6000_expand_vec_perm_const): Delete.
14075         (rs6000_vectorize_vec_perm_const_ok): Delete.
14076         (rs6000_vectorize_vec_perm_const): New function.
14077         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14078         an element count and rtx array.
14079         (rs6000_expand_extract_even): Update call accordingly.
14080         (rs6000_expand_interleave): Likewise.
14081         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14082         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14083         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14084         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14085         (rs6000_expand_vec_perm_const): Delete.
14086         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14087         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14088         (altivec_expand_vec_perm_const_le): Take each operand individually.
14089         Operate on constant selectors rather than rtxes.
14090         (altivec_expand_vec_perm_const): Likewise.  Update call to
14091         altivec_expand_vec_perm_const_le.
14092         (rs6000_expand_vec_perm_const): Delete.
14093         (rs6000_vectorize_vec_perm_const_ok): Delete.
14094         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14095         reference to the SPE evmerge intructions.
14096         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14097         an element count and rtx array.
14098         (rs6000_expand_extract_even): Update call accordingly.
14099         (rs6000_expand_interleave): Likewise.
14100         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14101         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14102         new function.
14103         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14105 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14107         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14108         vector mode and that that mode matches the mode of the data
14109         being permuted.
14110         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14111         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14112         directly using expand_vec_perm_1 when forcing selectors into
14113         registers.
14114         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14116 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14118         * optabs-query.h (can_vec_perm_p): Delete.
14119         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14120         * optabs-query.c (can_vec_perm_p): Split into...
14121         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14122         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14123         particular selector is valid.
14124         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14125         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14126         (vect_grouped_load_supported): Likewise.
14127         (vect_shift_permute_load_chain): Likewise.
14128         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14129         (vect_transform_slp_perm_load): Likewise.
14130         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14131         (vectorizable_bswap): Likewise.
14132         (vect_gen_perm_mask_checked): Likewise.
14133         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14134         implementations of variable permutation vectors into account
14135         when deciding which selector to use.
14136         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14137         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14138         with a false third argument.
14139         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14140         to test whether the constant selector is valid and can_vec_perm_var_p
14141         to test whether a variable selector is valid.
14143 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14145         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14146         * optabs-query.c (can_vec_perm_p): Likewise.
14147         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14148         instead of vec_perm_indices.
14149         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14150         (vect_gen_perm_mask_checked): Likewise,
14151         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14152         (vect_gen_perm_mask_checked): Likewise,
14154 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14156         * optabs-query.h (qimode_for_vec_perm): Declare.
14157         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14158         (qimode_for_vec_perm): ...this new function.
14159         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14161 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14163         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14164         does not have a conditional at the top.
14166 2018-01-02  Richard Biener  <rguenther@suse.de>
14168         * ipa-inline.c (big_speedup_p): Fix expression.
14170 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14172         PR target/81616
14173         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14174         for generic 4->6.
14176 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14178         PR target/81616
14179         Generic tuning.
14180         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14181         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14182         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14183         cond_taken_branch_cost 3->4.
14185 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14187         PR tree-optimization/83581
14188         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14189         TODO_cleanup_cfg if any changes have been made.
14191         PR middle-end/83608
14192         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14193         convert_modes if target mode has the right side, but different mode
14194         class.
14196         PR middle-end/83609
14197         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14198         last argument when extracting from CONCAT.  If either from_real or
14199         from_imag is NULL, use expansion through memory.  If result is not
14200         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14201         the parts directly to inner mode, if even that fails, use expansion
14202         through memory.
14204         PR middle-end/83623
14205         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14206         check for bswap in mode rather than HImode and use that in expand_unop
14207         too.
14209 Copyright (C) 2018 Free Software Foundation, Inc.
14211 Copying and distribution of this file, with or without modification,
14212 are permitted in any medium without royalty provided the copyright
14213 notice and this notice are preserved.