[AArch64] Add SVE support for integer division
[official-gcc.git] / gcc / ChangeLog
blob0dcece5c219fba08e4cdb27528b6443c60c83547
1 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4         (optab, sve_int_op): Handle div and udiv.
5         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6         for SVE_INT_BINARY_SD.
7         (*<optab><mode>3): New insn for the same.
9 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11         * tree-vect-patterns.c: Include predict.h.
12         (vect_recog_divmod_pattern): Restrict check for division support
13         to when optimizing for size.
15 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
20         (gimple_match_op::set_op): Likewise.
21         (gimple_resimplify4): Declare.
22         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
23         (expr::gen_transform): Likewise.
24         (decision_tree::gen): Generate a simplification routine for 4 operands.
25         * gimple-match-head.c (gimple_simplify): Add an overload for
26         4 operands.  In the top-level function, handle up to 4 call
27         arguments and call gimple_resimplify4.
28         (gimple_resimplify4): New function.
29         (build_call_internal): Pass a fourth operand.
30         (maybe_push_to_seq): Likewise.
31         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
32         Fold VEC_COND_EXPRs of an operation and a default value into
33         an IFN_COND_* function if possible.
34         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
35         New unspecs.
36         (SVE_COND_FP_BINARY): Include them.
37         (optab, sve_fp_op): Handle them.
38         (SVE_INT_BINARY_REV): New code iterator.
39         (SVE_COND_FP_BINARY_REV): New int iterator.
40         (commutative): New int attribute.
41         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
42         Declare.
43         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
44         function.
45         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
46         (*cond_<optab><mode>): New patterns for reversed operands.
48 2018-05-25  Richard Biener  <rguenther@suse.de>
50         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
51         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
52         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
53         (STMT_VINFO_GROUPED_ACCESS): Adjust.
54         * tree-vect-data-refs.c (everywhere): Adjust users.
55         * tree-vect-loop.c (everywhere): Likewise.
56         * tree-vect-slp.c (everywhere): Likewise.
57         * tree-vect-stmts.c (everywhere): Likewise.
58         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
60 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
62         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
63         Rename to...
64         (gcc_cv_as_section_exclude): ... this.
65         Try Solaris as #exclude syntax.
66         * configure: Regenerate.
67         * config.in: Regenerate.
68         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
69         SECTION_EXCLUDE.
70         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
71         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
73         * varasm.c (default_elf_asm_named_section): Don't check if
74         HAVE_GAS_SECTION_EXCLUDE is defined.
76 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
78         * doc/md.texi: Update the documentation of the cond_* optabs
79         to mention the new final operand.  Fix GET_MODE_NUNITS call.
80         Describe the scalar case too.
81         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
82         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
83         instead of 2.
84         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
85         (get_conditional_internal_fn): Update comment.
86         * tree-vect-loop.c (vectorizable_reduction): Pass the original
87         accumulator value as a final argument to conditional functions.
88         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
89         a define_expand and add an "else" operand.  Assert for now that
90         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
91         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
92         (*cond_<optab><mode>): New patterns.
93         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
94         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
95         (UNSPEC_COND_EOR): Delete.
96         (optab): Remove associated mappings.
97         (SVE_INT_BINARY): New code iterator.
98         (sve_int_op): Remove int attribute and add "minus" to the code
99         attribute.
100         (SVE_COND_INT_OP): Delete.
101         (SVE_COND_FP_OP): Rename to...
102         (SVE_COND_FP_BINARY): ...this.
104 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
106         * optabs.c (can_reuse_operands_p): New function.
107         (maybe_legitimize_operands): Try to reuse the results for
108         earlier operands.
110 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
112         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
113         Add {q} suffix to insn mnemonic.
115 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
117         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
118         (msp430_warn_func_return): New.
120 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
122         * fold-const.c (tree_nonzero_bits): New function.
123         * fold-const.h (tree_nonzero_bits): Likewise.
124         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
125         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
127 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
129         PR target/85900
130         PR target/85345
131         * varasm.c (assemble_alias): Check ifunc_resolver only on
132         FUNCTION_DECL.
134 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
136         PR target/85903
137         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
138         when memory input operand is handled.
140 2018-05-24  Luis Machado  <luis.machado@linaro.org>
142         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
143         global.
144         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
146 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
148         * match.pd: Delay FMA folds until after vectorization.
150 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
152         PR target/83009
153         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
154         address check not strict.
156 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
158         * gimple-match.h (gimple_match_op): New class.
159         (mprts_hook): Replace parameters with a gimple_match_op *.
160         (maybe_build_generic_op): Likewise.
161         (gimple_simplified_result_is_gimple_val): Replace parameters with
162         a const gimple_match_op *.
163         (gimple_simplify): Replace code_helper * and tree * parameters with
164         a gimple_match_op * parameter.
165         (gimple_resimplify1): Replace code_helper *, tree and tree *
166         parameters with a gimple_match_op * parameter.
167         (gimple_resimplify2): Likewise.
168         (gimple_resimplify3): Likewise.
169         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
170         parameters with a gimple_match_op * parameter.
171         * gimple-match-head.c (gimple_simplify): Change prototypes of
172         auto-generated functions to take a gimple_match_op * instead of
173         separate code_helper * and tree * parameters.  Make the same
174         change in the top-level overload and update calls to the
175         gimple_resimplify routines.  Update calls to the auto-generated
176         functions and to maybe_push_res_to_seq in the publicly-facing
177         operation-specific gimple_simplify overloads.
178         (gimple_match_op::MAX_NUM_OPS): Define.
179         (gimple_resimplify1): Replace rcode and ops with a single res_op
180         parameter.  Update call to gimple_simplify.
181         (gimple_resimplify2): Likewise.
182         (gimple_resimplify3): Likewise.
183         (mprts_hook): Replace parameters with a gimple_match_op *.
184         (maybe_build_generic_op): Likewise.
185         (build_call_internal): Replace type, nargs and ops with
186         a gimple_match_op *.
187         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
188         with a single gimple_match_op *.  Update calls to mprts_hook,
189         build_call_internal and gimple_simplified_result_is_gimple_val.
190         Factor out code that is common to the tree_code and combined_fn cases.
191         * genmatch.c (expr::gen_transform): Replace tem_code and
192         tem_ops with a gimple_match_op called tem_op.  Update calls
193         to the gimple_resimplify functions and maybe_push_res_to_seq.
194         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
195         res_ops.  Update call to the gimple_resimplify functions.
196         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
197         (decision_tree::gen): Make the functions take a gimple_match_op *
198         called res_op instead of separate res_code and res_ops parameters.
199         Update call accordingly.
200         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
201         and ops with a single res_op parameter.  Update calls to
202         maybe_build_generic_op and maybe_push_res_to_seq.
203         (fold_stmt_1): Update calls to gimple_simplify and
204         replace_stmt_with_simplification.
205         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
206         and gimple_simplified_result_is_gimple_val.
207         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
208         gimple_simplify.
209         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
210         with a gimple_match_op *.
211         (vn_nary_build_or_lookup): Likewise.  Update call to
212         vn_nary_build_or_lookup_1.
213         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
214         gimple_match_op *.  Update calls to the gimple_resimplify routines
215         and to gimple_simplified_result_is_gimple_val.
216         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
217         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
218         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
219         (visit_nary_op): Likewise.
220         (visit_reference_op_load): Likewise.
222 2018-05-23  Luis Machado  <luis.machado@linaro.org>
224         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
225         modifier for printing the step amount.
227 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
229         PR target/78849
230         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
231         types.
233 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
235         * doc/sourcebuild.texi (Endianness): New subsubsection.
237 2018-05-23  Luis Machado  <luis.machado@linaro.org>
239         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
240         <prefetch_dynamic_strides>: New const bool field.
241         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
242         prefetch_dynamic_strides.
243         (exynosm1_prefetch_tune): Likewise.
244         (thunderxt88_prefetch_tune): Likewise.
245         (thunderx_prefetch_tune): Likewise.
246         (thunderx2t99_prefetch_tune): Likewise.
247         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
248         false.
249         (aarch64_override_options_internal): Update to set
250         PARAM_PREFETCH_DYNAMIC_STRIDES.
251         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
252         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
253         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
254         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
255         prefetch-dynamic-strides setting.
257 2018-05-23  Luis Machado  <luis.machado@linaro.org>
259         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
260         <minimum_stride>: New const int field.
261         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
262         minimum_stride field defaulting to -1.
263         (exynosm1_prefetch_tune): Likewise.
264         (thunderxt88_prefetch_tune): Likewise.
265         (thunderx_prefetch_tune): Likewise.
266         (thunderx2t99_prefetch_tune): Likewise.
267         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
268         <default_opt_level>: Set to 3.
269         (aarch64_override_options_internal): Update to set
270         PARAM_PREFETCH_MINIMUM_STRIDE.
271         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
272         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
273         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
274         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
275         stride is constant and is below the minimum stride threshold.
277 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
279         * config/arm/arm-cpus.in (mode26): Delete.
280         (armv4): Delete mode26 reference.
281         * config/arm/arm.c (arm_configure_build_target): Delete use of
282         isa_bit_mode26.
284 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
286         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
287         New insn pattern.
288         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
289         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
290         for non-SSE modes.
291         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
292         (floatunsdidf2): Ditto.
294 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
296         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
297         (fixuns_trunc<mode>si2_avx512f): Ditto.
298         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
299         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
300         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
302 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
304         PR rtl-optimization/79985
305         * df-scan.c (df_insn_refs_collect): Remove special case for
306         global registers and asm statements.
308 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
310         * extend.texi (Global Register Variables): Rewrite the bullet list.
311         Note that the register is available for allocation. Note that access
312         via inline asm must use constraints. Add note about async-signal
313         handlers. Remove paragraph about automagic register selection.
315 2018-05-23  Richard Biener  <rguenther@suse.de>
317         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
318         of fixed offset from memset VN.
320 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
322         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
323         first_interp field.
324         (alloc_cand_and_find_basis): Initialize first_interp field.
325         (slsr_process_mul): Modify first_interp field.
326         (slsr_process_add): Likewise.
327         (slsr_process_cast): Modify first_interp field for each new
328         interpretation.
329         (slsr_process_copy): Likewise.
330         (dump_candidate): Dump first_interp field.
331         (replace_mult_candidate): Process all interpretations, not just
332         subsequent ones.
333         (replace_rhs_if_not_dup): Likewise.
334         (replace_one_candidate): Likewise.
336 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
338         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
339         Add new boolean.
340         (aarch64_needs_frame_chain): New function.
341         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
343 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
345         PR target/84882
346         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
347         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
348         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
349         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
350         as true for strict-align.
351         (aarch64_can_inline_p): Perform checks even when callee has no
352         attributes to check for strict alignment.
353         * doc/extend.texi (AArch64 Function Attributes): Document
354         no-strict-align.
355         * doc/invoke.texi: (AArch64 Options): Likewise.
357 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
359         PR tree-optimization/85853
360         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
361         the handling of the root of the node to...
362         (vect_slp_analyze_node_operations_1): ...this new function,
363         and run the whole thing with the child nodes' def types
364         set according to their SLP node's def type.
366 2018-05-23  Richard Biener  <rguenther@suse.de>
368         PR middle-end/85874
369         * tree-data-ref.c (create_runtime_alias_checks): Defer
370         and ignore overflow warnings.
372 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
374         PR tree-optimization/85822
375         * tree-vrp.c (is_masked_range_test): Fix handling of negative
376         constants.
378 2018-05-23  Richard Biener  <rguenther@suse.de>
380         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
381         memset constants via native_interpret_expr.
383 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
385         PR target/85345
386         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
387         attribute.
388         (cgraph_node::create_alias): Likewise.
389         (cgraph_node::get_availability): Check ifunc_resolver instead
390         of looking up ifunc attribute.
391         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
392         * varasm.c (do_assemble_alias): Likewise.
393         (assemble_alias): Likewise.
394         (default_binds_local_p_3): Likewise.
395         * cgraph.h (cgraph_node): Add ifunc_resolver.
396         (cgraph_node::only_called_directly_or_aliased_p): Return false
397         for IFUNC resolver.
398         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
399         attribute.
400         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
401         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
402         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
403         instead of looking up ifunc attribute.
405 2018-05-22  Luis Machado  <luis.machado@linaro.org>
407         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
409 2018-05-22  Martin Sebor  <msebor@redhat.com>
411         PR middle-end/85359
412         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
413         only when expasion succeeds.
414         (expand_builtin_strcmp): Same.
415         (expand_builtin_strncmp): Same.
417 2018-05-22  Martin Sebor  <msebor@redhat.com>
419         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
421 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
422             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
424         * config/aarch64/aarch64-ldpstp.md: Replace uses of
425         aarch64_mem_pair_operand with memory_operand and delete operand swapping
426         code.
427         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
428         Add check for legitimate_address.
429         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
430         (aarch64_swap_ldrstr_operands): New.
431         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
432         Define prototype.
434 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
435             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
437         * config/aarch64/aarch64.md: New patterns to generate stp
438         and ldp.
439         (store_pair_sw, store_pair_dw): New patterns to generate stp for
440         single words and double words.
441         (load_pair_sw, load_pair_dw): Likewise.
442         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
443         Delete.
444         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
445         Delete.
446         * config/aarch64/aarch64-ldpstp.md: Modify peephole
447         for different mode ldpstp and add peephole for merged zero stores.
448         Likewise for loads.
449         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
450         Add size check.
451         (aarch64_gen_store_pair): Rename calls to match new patterns.
452         (aarch64_gen_load_pair): Rename calls to match new patterns.
453         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
454         (load_pair<DREG:mode><DREG2:mode>): ... This.
455         (store_pair<mode>): Rename to...
456         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
457         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
458         New mode iterators.
459         (V_INT_EQUIV): Handle SImode.
460         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
461         New predicate.
463 2018-05-22  Martin Sebor  <msebor@redhat.com>
465         PR c/85623
466         * calls.c (maybe_warn_nonstring_arg): Use string length to set
467         or ajust the presumed bound on an operation to avoid unnecessary
468         warnings.
470 2018-05-22  Martin Sebor  <msebor@redhat.com>
472         PR tree-optimization/85826
473         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
474         assuming that a DECL necesarily has a constant size.
476 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
478         PR middle-end/85862
479         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
481 2018-05-22  Richard Biener  <rguenther@suse.de>
483         PR tree-optimization/85834
484         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
485         non-constant and non-zero memset arguments.
487 2018-05-22  Martin Liska  <mliska@suse.cz>
489         PR ipa/85607
490         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
492 2018-05-22  Richard Biener  <rguenther@suse.de>
494         PR tree-optimization/85863
495         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
496         comparisons when vectype is specified.
497         (vectorizable_condition): Do not specify vectype for
498         vect_is_simple_cond when SLP vectorizing.
500 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
502         PR target/85657
503         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
504         define __ibm128 as long double.
505         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
506         as a distinct type when IEEE 128-bit support is enabled.
507         (init_float128_ieee): Fix up conversions between IFmode and IEEE
508         128-bit types to use the correct functions.
509         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
510         convert between 128-bit floating point types that have different
511         modes but the same representation, instead of using gen_lowpart to
512         makean alias.
513         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
514         KFmode.
515         (IFKF_reg): New attributes to give the register constraints for
516         IFmode and KFmode.
517         (extend<mode>tf2_internal): New insns to mark an explicit
518         conversion between 128-bit floating point types that have a
519         different mode but share the same representation.
521 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
523         PR tree-optimization/85814
524         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
525         a null return from get_strinfo when unsharing the next
526         strinfo in the chain.
528 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
530         PR gcc/84923
531         * varasm.c (weak_finish): Clean up weak_decls.
533 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
535         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
536         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
537         UNSPEC_UADALP values.
538         * config/aarch64/iterators.md (ABAL): New int iterator.
539         (ABDL2): Likewise.
540         (ADALP): Likewise.
541         (sur): Add mappings for the above.
542         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
543         New define_insn.
544         (aarch64_<sur>abal<mode>_4): Likewise.
545         (aarch64_<sur>adalp<mode>_3): Likewise.
546         (<sur>sadv16qi): New define_expand.
548 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
550         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
551         (*movdf_internal): Ditto.
552         (*rcpsf2_sse): Ditto.
553         (*rsqrtsf2_sse): Ditto.
554         (*sqrt<mode>2_sse): Ditto.
556 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
558         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
559         eor3q<mode>4.
560         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
561         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
562         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
563         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
564         vbcaxq_s64): New.
565         * config/aarch64/arm_neon.h: Likewise.
566         * config/aarch64/iterators.md (VQ_I): New.
568 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
570         * config.gcc: Add arc/t-multilib-linux to tmake_file for
571         arc*-*-linux*.
572         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
573         MULTILIB_DIRNAMES
575 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
577         * config/nds32/constraints.md (S): New constraint.
578         * config/nds32/nds32.md (call_internal): Use constraint S.
579         (call_value_internal): Likewise.
580         (sibcall_internal): Likewise.
581         (sibcall_value_internal): Likewise.
583 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
584             Chung-Ju Wu  <jasonwucj@gmail.com>
586         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
587         into consideration.
589 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
590             Chung-Ju Wu  <jasonwucj@gmail.com>
592         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
593         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
594         (nds32_rtx_costs_impl): Simplify.
595         (nds32_address_cost_impl): Simplify.
596         (nds32_init_rtx_costs): New function.
597         (nds32_rtx_costs_speed_prefer): Likewise.
598         (nds32_rtx_costs_size_prefer): Likewise.
599         (nds32_address_cost_speed_prefer): Likewise.
600         (nds32_address_cost_speed_fwprop): Likewise.
601         (nds32_address_cost_size_prefer): Likewise.
602         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
603         * config/nds32/nds32.c (nds32_option_override): Use
604         nds32_init_rtx_costs function.
606 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
608         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
609         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
610         (TARGET_PIPELINE_N8): Likewise.
611         (TARGET_PIPELINE_N10): Likewise.
612         (TARGET_PIPELINE_N13): Likewise.
613         (TARGET_PIPELINE_GRAYWOLF): Likewise.
615 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
617         * config/nds32/nds32-fpu.md: Update copyright year.
619 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
621         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
623 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
625         * config/nds32/nds32.c
626         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
627         * config/nds32/nds32.opt (minline-asm-r15): New option.
629 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
631         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
632         MASK_HW_ABS.
633         * config/nds32/nds32.md (abssi2): New pattern.
635 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
637         * config/i386/i386.md (rex64namesuffix): New mode attribute.
638         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
639         Merge insn pattern from sse_cvtsi2ss<round_name> and
640         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
641         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
642         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
643         using SWI48 mode iterator.
644         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
645         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
646         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
647         pattern from sse_cvttss2si<round_saeonly_name>
648         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
649         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
650         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
651         using SWI48 mode iterator.
652         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
653         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
654         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
655         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
656         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
657         using SWI48 mode iterator.
658         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
659         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
660         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
661         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
662         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
663         SWI48 mode iterator.
664         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
665         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
666         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
667         pattern from sse_cvttsd2si<round_saeonly_name>
668         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
670 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
672         * config/nds32/nds32-md-auxiliary.c
673         (nds32_valid_smw_lwm_base_p): Refine.
674         (nds32_output_smw_single_word): Refine.
675         (nds32_output_smw_double_word): New.
676         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
678 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
680         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
681         (nds32_output_stack_pop): Refine.
682         (nds32_expand_unaligned_load): Refine.
683         (nds32_expand_unaligned_store): Refine.
685 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
686             Chung-Ju Wu  <jasonwucj@gmail.com>
688         * config/nds32/constants.md: Add TP_REGNUM constant.
689         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
690         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
691         UNSPEC_ADD32.
692         * config/nds32/nds32-doubleword.md: Consider flag_pic.
693         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
694         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
695         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
696         and PIC code generation.
697         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
698         code generation.
699         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
700         optimization.
701         * config/nds32/nds32.md: Support TLS and PIC.
702         * config/nds32/nds32.c: Support TLS and PIC.
703         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
704         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
705         predicate.
707 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
709         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
710         mode with E_ prefix.
712 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
713             Chung-Ju Wu  <jasonwucj@gmail.com>
715         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
716         * config/nds32/nds32-md-auxiliary.c
717         (symbolic_reference_mentioned_p): New.
718         (nds32_legitimize_ict_address): New.
719         (nds32_expand_ict_move): New.
720         (nds32_indirect_call_referenced_p): New.
721         (nds32_symbol_binds_local_p): Delete.
722         (nds32_long_call_p): Modify.
723         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
724         * config/nds32/nds32-protos.h
725         (symbolic_reference_mentioned_p): Declare.
726         (nds32_legitimize_ict_address): Declare.
727         (nds32_expand_ict_move): Declare.
728         (nds32_indirect_call_referenced_p): Declare.
729         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
730         (nds32_relax_group): Use nds32_ict_const_p as condition.
731         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
732         (nds32_asm_file_start): Output ict_model directive in asm code.
733         (nds32_legitimate_address_p): Consider indirect call.
734         (nds32_print_operand): Consider indirect call.
735         (nds32_print_operand_address): Consider indirect call.
736         (nds32_insert_attributes): Handle "indirect_call" attribute.
737         (TARGET_LEGITIMATE_ADDRESS_P): Define.
738         (TARGET_LEGITIMATE_CONSTANT_P): Define.
739         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
740         (TARGET_DELEGITIMIZE_ADDRESS): Define.
741         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
742         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
743         (TARGET_ICT_MODEL_SMALL): Define.
744         (TARGET_ICT_MODEL_LARGE): Define.
745         * config/nds32/nds32.md (movsi): Consider ict model.
746         (call, call_value): Consider ict model.
747         (sibcall, sibcall_value): Consider ict model.
748         * config/nds32/nds32.opt (mict-model): New option.
749         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
750         model.
752 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
753             Monk Chiang  <sh.chiang04@gmail.com>
754             Jim Wilson <jimw@sifive.com>
756         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
757         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
758         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
759         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
760         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
761         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
762         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
763         compute save_libcall_adjustment properly.
764         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
765         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
766         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
767         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
768         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
769         (ABI_SPEC): Handle mabi=ilp32e.
770         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
771         (RVE): Add RVE mask.
772         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
773         <-march>: Add rv32e as an example.
775 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
777         PR c++/82899
778         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
779         (intra_create_variable_infos): Handle C++ constructors.
781 2018-05-18  Martin Liska  <mliska@suse.cz>
783         * passes.def: Remove a redundant pass.
785 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
787         PR bootstrap/85838
788         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
790 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
792         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
793         (ARMv4): Update.
794         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
795         (ARMv6m): Update.
796         (armv2, armv2a, armv3, armv3m): Delete architectures.
797         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
798         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
799         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
800         Delete cpus.
801         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
802         (*mulsidi3adddi): Likewise.
803         (mulsidi3): Likewise.
804         (*mulsidi3_nov6): Likewise.
805         (umulsidi3): Likewise.
806         (umulsidi3_nov6): Likewise.
807         (umaddsidi4): Likewise.
808         (*umulsidi3adddi): Likewise.
809         (smulsi3_highpart): Likewise.
810         (*smulsi3_highpart_nov6): Likewise.
811         (umulsi3_highpart): Likewise.
812         (*umulsi3_highpart_nov6): Likewise.
813         * config/arm/arm.h (arm_arch3m): Delete.
814         * config/arm/arm.c (arm_arch3m): Delete.
815         (arm_option_override_internal): Update armv3-related comment.
816         (arm_configure_build_target): Delete use of isa_bit_mode32.
817         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
818         (arm_rtx_costs_internal): Delete check of arm_arch3m.
819         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
820         (mulsa3): Likewise.
821         (mulusa3): Likewise.
822         * config/arm/arm-protos.h (arm_arch3m): Delete.
823         * config/arm/arm-tables.opt: Regenerate.
824         * config/arm/arm-tune.md: Likewise.
825         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
826         deleted architectures.
828 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
830         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
831         (armv5t, armv5te): New features.
832         (ARMv5, ARMv5e): Delete fgroups.
833         (ARMv5t, ARMv5te): Adjust for above changes.
834         (ARMv6m): Likewise.
835         (armv5, armv5e): Delete arches.
836         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
837         arm_arch5.
838         (*call_reg_arm): Likewise.
839         (*call_value_reg_armv5): Likewise.
840         (*call_value_reg_arm): Likewise.
841         (*call_symbol): Likewise.
842         (*call_value_symbol): Likewise.
843         (*sibcall_insn): Likewise.
844         (*sibcall_value_insn): Likewise.
845         (clzsi2): Likewise.
846         (prefetch): Likewise.
847         (define_split and define_peephole2 dependent on arm_arch5):
848         Likewise.
849         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
850         arm_arch5e.
851         (TARGET_ARM_QBIT): Likewise.
852         (TARGET_DSP_MULTIPLY): Likewise.
853         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
854         (arm_arch5, arm_arch5e): Delete.
855         (arm_arch5t, arm_arch5te): Declare.
856         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
857         (arm_arch5t): Declare.
858         (arm_option_reconfigure_globals): Update for the above.
859         (arm_options_perform_arch_sanity_checks): Update comment, replace
860         use of arm_arch5 with arm_arch5t.
861         (use_return_insn): Likewise.
862         (arm_emit_call_insn): Likewise.
863         (output_return_instruction): Likewise.
864         (arm_final_prescan_insn): Likewise.
865         (arm_coproc_builtin_available): Likewise.
866         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
867         arm_arch5e with arm_arch5t and arm_arch5te.
868         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
869         (arm_arch5t, arm_arch5te): Declare.
870         * config/arm/arm-tables.opt: Regenerate.
871         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
872         * config/arm/t-multilib: Likewise.
873         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
874         instead of arm_arch5.
875         (*call_reg_thumb1): Likewise.
876         (*call_value_reg_thumb1_v5): Likewise.
877         (*call_value_reg_thumb1): Likewise.
878         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
879         unreachable path.
880         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
882 2018-05-18  Martin Liska  <mliska@suse.cz>
884         PR gcov-profile/84846
885         * doc/gcov.texi: Document -t option of gcov tool.
887 2018-05-18  Martin Liska  <mliska@suse.cz>
889         PR gcov-profile/84846
890         * gcov.c (print_usage): Add new -t option.
891         (process_args): Handle the option.
892         (generate_results): Use stdout as output when requested by
893         the option.
895 2018-05-18  Martin Liska  <mliska@suse.cz>
897         PR gcov-profile/84846
898         * coverage.c (coverage_init): Write PWD to .gcno file.
899         * doc/gcov.texi: Document how working directory is printed.
900         * gcov-dump.c (dump_gcov_file): Print PWD.
901         * gcov.c (output_intermediate_file): Likewise.
902         (read_graph_file): Read PWD string.
903         (output_lines): Print PWD.
905 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
907         PR middle-end/85817
908         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
909         for retval and return false if all args to phi are zero.        
911 2018-05-18  Richard Biener  <rguenther@suse.de>
913         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
914         method.
915         (evrp_dom_walker::before_dom_children): Call it.
917 2018-05-18  Richard Biener  <rguenther@suse.de>
919         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
920         results when processing array refs with variable index.
922 2018-05-18  Toon Moene  <toon@moene.org>
924         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
925         directly after that of -floop-interchange. Indicate that both
926         options are enabled by default when specifying -O3. 
928 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
930         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
931         iterator.  Delete separate integer-mode vec_set<mode> expander.
932         (aarch64_simd_vec_setv2di): Delete.
933         (vec_setv2di): Delete.
934         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
935         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
936         the "w, r" alternative.
938 2018-05-18  Martin Liska  <mliska@suse.cz>
940         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
941         * tree-pass.h (make_pass_lower_switch_O0): New function.
942         * tree-switch-conversion.c (node_has_low_bound): Remove.
943         (node_has_high_bound): Likewise.
944         (node_is_bounded): Likewise.
945         (class pass_lower_switch): Make it a template type and create
946         two instances.
947         (pass_lower_switch::execute): Add template argument.
948         (make_pass_lower_switch): New function.
949         (make_pass_lower_switch_O0): New function.
950         (do_jump_if_equal): Remove.
951         (emit_case_nodes): Simplify to just handle all 3 cases and leave
952         all the hard work to tree optimization passes.
954 2018-05-18  Martin Liska  <mliska@suse.cz>
956         * dbgcnt.c (limit_low): Renamed from limit.
957         (limit_high): New variable.
958         (dbg_cnt_is_enabled): Check for upper limit.
959         (dbg_cnt): Adjust dumping.
960         (dbg_cnt_set_limit_by_index): Add new argument for high
961         value.
962         (dbg_cnt_set_limit_by_name): Likewise.
963         (dbg_cnt_process_single_pair): Parse new format.
964         (dbg_cnt_process_opt): Use strtok.
965         (dbg_cnt_list_all_counters): Remove 'value' and add
966         'limit_high'.
967         * doc/invoke.texi: Document changes.
969 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
971         * doc/sourcebuild.texi (scalar_all_fma): Document.
972         * tree.def (FMA_EXPR): Delete.
973         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
974         * internal-fn.c (ternary_direct): New macro.
975         (expand_ternary_optab_fn): Likewise.
976         (direct_ternary_optab_supported_p): Likewise.
977         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
978         * builtins.c (fold_builtin_fma): Delete.
979         (fold_builtin_3): Don't call it.
980         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
981         * expr.c (expand_expr_real_2): Likewise.
982         * fold-const.c (operand_equal_p): Likewise.
983         (fold_ternary_loc): Likewise.
984         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
985         * gimple.c (DEFTREECODE): Likewise.
986         * gimplify.c (gimplify_expr): Likewise.
987         * optabs-tree.c (optab_for_tree_code): Likewise.
988         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
989         * tree-eh.c (operation_could_trap_p): Likewise.
990         (stmt_could_throw_1_p): Likewise.
991         * tree-inline.c (estimate_operator_cost): Likewise.
992         * tree-pretty-print.c (dump_generic_node): Likewise.
993         (op_code_prio): Likewise.
994         * tree-ssa-loop-im.c (stmt_cost): Likewise.
995         * tree-ssa-operands.c (get_expr_operands): Likewise.
996         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
997         * fold-const-call.h (fold_fma): Delete.
998         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
999         CFN_FNMA and CFN_FNMS.
1000         (fold_fma): Delete.
1001         * genmatch.c (combined_fn): New enum.
1002         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1003         (commutative_op): New function.
1004         (commutate): Use it.  Handle more than 2 operands.
1005         (dt_operand::gen_gimple_expr): Use commutative_op.
1006         (parser::parse_expr): Allow :c to be used with non-binary
1007         operators if the commutative operand is known.
1008         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1009         CFN_FMS, CFN_FNMA and CFN_FNMS.
1010         (backprop::process_assign_use): Remove FMA_EXPR handling.
1011         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1012         (gen_hsa_fma): New function.
1013         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1014         IFN_FNMA and IFN_FNMS.
1015         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1016         * gimple-fold.h (follow_all_ssa_edges): Declare.
1017         * gimple-fold.c (follow_all_ssa_edges): New function.
1018         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1019         gimple_build interface and use follow_all_ssa_edges to fold the result.
1020         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1021         instead of checking for optabs directly.
1022         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1023         rather than FMA_EXPRs.
1024         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1025         call to IFN_FMA instead of an FMA_EXPR.
1027 2018-05-17  Jim Wilson  <jimw@sifive.com>
1029         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1030         sign extended promoted subreg, and the range does not have the sign bit
1031         set, then do a sign extend.
1033         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1034         test, check for sign extended subreg and/or constant operands, and
1035         do a sign extend in that case.
1037 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1039         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1040         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1041         Add untyped.
1042         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1043         Change logics_shift_reg to logics_shift_imm.
1044         (thunderx2t99_fp_loadpair_basic): Delete.
1045         (thunderx2t99_fp_storepair_basic): Delete.
1046         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1047         (thunderx2t99_asimd_polynomial): Delete.
1048         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1049         and neon_fp_mul_d_scalar_q.
1050         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1051         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1052         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1053         (thunderx2t99_asimd_lut): Add missing tbl types.
1054         (thunderx2t99_asimd_ext): Delete.
1055         (thunderx2t99_asimd_load1_1_mult): Delete.
1056         (thunderx2t99_asimd_load1_2_mult): Delete.
1057         (thunderx2t99_asimd_load1_ldp): New.
1058         (thunderx2t99_asimd_load1): New.
1059         (thunderx2t99_asimd_load2): Add missing *load2* types.
1060         (thunderx2t99_asimd_load3): New.
1061         (thunderx2t99_asimd_load4): New.
1062         (thunderx2t99_asimd_store1_1_mult): Delete.
1063         (thunderx2t99_asimd_store1_2_mult): Delete.
1064         (thunderx2t99_asimd_store2_mult): Delete.
1065         (thunderx2t99_asimd_store2_onelane): Delete.
1066         (thunderx2t99_asimd_store_stp): New.
1067         (thunderx2t99_asimd_store1): New.
1068         (thunderx2t99_asimd_store2): New.
1069         (thunderx2t99_asimd_store3): New.
1070         (thunderx2t99_asimd_store4): New.
1072 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1074         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1075         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1077 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1078             Segher Boessenkool  <segher@kernel.crashing.org>
1080         PR target/85698
1081         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1082         operand.
1084 2018-05-17  Richard Biener  <rguenther@suse.de>
1086         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1087         for pruning loop and prune defs feeding only already visited PHIs.
1089 2018-05-17  Richard Biener  <rguenther@suse.de>
1091         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1093 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1094             Richard Biener  <rguenther@suse.de>
1096         PR tree-optimization/85793
1097         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1098         for VMAT_ELEMENTWISE.
1100 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1102         * internal-fn.h (lookup_internal_fn): Declare
1103         * internal-fn.c (lookup_internal_fn): New function.
1104         * gimple.c (gimple_build_call_from_tree): Handle calls to
1105         internal functions.
1106         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1107         internal function names.
1108         * tree-pretty-print.c (dump_generic_node): Likewise.
1109         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1111 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1113         * gimple-fold.h (gimple_build): Make the function forms take
1114         combined_fn rather than built_in_function.
1115         (gimple_simplify): Likewise.
1116         * gimple-match-head.c (gimple_simplify): Likewise.
1117         * gimple-fold.c (gimple_build): Likewise.
1118         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1119         rather than gimple_build_call_internal.
1120         (get_initial_defs_for_reduction): Likewise.
1121         (vect_create_epilog_for_reduction): Likewise.
1122         (vectorizable_live_operation): Likewise.
1124 2018-05-17  Martin Liska  <mliska@suse.cz>
1126         * gimple-ssa-sprintf.c (format_directive): Do not use
1127         space in between 'G_' and '('.
1129 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1131         PR target/85323
1132         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1133         even if the mask is not all ones.
1135         PR target/85323
1136         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1137         vector.
1138         (ix86_gimple_fold_builtin): Likewise.
1140         PR target/85323
1141         * config/i386/i386.c: Include tree-vector-builder.h.
1142         (ix86_vector_shift_count): New function.
1143         (ix86_fold_builtin): Fold shift builtins by scalar count.
1144         (ix86_gimple_fold_builtin): Likewise.
1146         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1147         _mm512_setzero): New intrinsics.
1149 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1150             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1152         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1153         code generation for cases where splatting a value is not useful.
1154         * simplify-rtx.c (simplify_ternary_operation): Simplify
1155         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1156         mode to a vec_concat.
1158 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1160         * config.gcc: Support "goldmont-plus".
1161         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1162         "goldmont-plus".
1163         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1164         PROCESSOR_GOLDMONT_PLUS.
1165         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1166         (processor_target_table): Add "goldmont-plus".
1167         (PTA_GOLDMONT_PLUS): Define.
1168         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1169         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1170         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1171         (fold_builtin_cpu): Add "goldmont-plus".
1172         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1173         (ix86_option_override_internal): Add "goldmont-plus".
1174         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1175         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1176         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1177         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1179 2018-05-17  Richard Biener  <rguenther@suse.de>
1181         PR tree-optimization/85757
1182         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1183         remove defs that only feed that PHI from further processing.
1185 2018-05-16  Jim Wilson  <jimw@sifive.com>
1187         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1188         asterisk to name.
1189         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1191 2018-05-16  Mark Wielaard  <mark@klomp.org>
1193         * dwarf2out.c (count_index_strings): New function.
1194         (output_indirect_strings): Call count_index_strings and generate
1195         header for dwarf_version >= 5.
1197 2018-05-16  Mark Wielaard  <mark@klomp.org>
1199         * dwarf2out.c (dwarf_FORM): New function.
1200         (set_indirect_string): Use dwarf_FORM.
1201         (reset_indirect_string): Likewise.
1202         (size_of_die): Likewise.
1203         (value_format): Likewise.
1204         (output_die): Likewise.
1205         (add_skeleton_AT_string): Likewise.
1206         (output_macinfo_op): Likewise.
1207         (index_string): Likewise.
1208         (output_index_string_offset): Likewise.
1209         (output_index_string): Likewise.
1210         (count_index_strings): Likewise.
1212 2018-05-16  Carl Love  <cel@us.ibm.com>
1214         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1215         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1217 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1219         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1220         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1222 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1224         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1225         (fnma<mode>4): Likewise.
1226         (fms<mode>4): Likewise.
1227         (fnms<mode>4): Likewise.
1228         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1229         (aarch64_fnma<mode>4): Likewise.
1230         (aarch64_fms<mode>4): Likewise.
1231         (aarch64_fnms<mode>4): Likewise.
1232         (aarch64_fnmadd<mode>4): Likewise.
1234 2018-05-16  Jason Merrill  <jason@redhat.com>
1236         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1238 2018-05-16  Richard Biener  <rguenther@suse.de>
1240         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1241         (dump_stmt_cost): Declare.
1242         (add_stmt_cost): Dump cost we add.
1243         (add_stmt_costs): New function.
1244         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1245         No longer exported.
1246         (vect_analyze_stmt): Adjust prototype.
1247         (vectorizable_condition): Likewise.
1248         (vectorizable_live_operation): Likewise.
1249         (vectorizable_reduction): Likewise.
1250         (vectorizable_induction): Likewise.
1251         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1252         cost vector to pass to vectorizable_ and record afterwards.
1253         (vect_model_reduction_cost): Take cost vector argument and adjust.
1254         (vect_model_induction_cost): Likewise.
1255         (vectorizable_reduction): Likewise.
1256         (vectorizable_induction): Likewise.
1257         (vectorizable_live_operation): Likewise.
1258         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1259         SLP_TREE_NUMBER_OF_VEC_STMTS.
1260         (vect_analyze_slp_cost_1): Remove.
1261         (vect_analyze_slp_cost): Likewise.
1262         (vect_slp_analyze_node_operations): Take visited args and
1263         a target cost vector.  Avoid processing already visited stmt sets.
1264         (vect_slp_analyze_operations): Use a local cost vector to gather
1265         costs and register those of non-discarded instances.
1266         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1267         (vect_schedule_slp_instance): Remove copying of
1268         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1269         zero.
1270         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1271         adding cost.  Record cost entry location.
1272         (vect_prologue_cost_for_slp_op): Function to compute cost of
1273         a constant or invariant generated for SLP vect in the prologue,
1274         split out from vect_analyze_slp_cost_1.
1275         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1276         (vect_model_promotion_demotion_cost): Likewise.
1277         (vect_model_store_cost): Likewise, make static.
1278         (vect_model_load_cost): Likewise.
1279         (vectorizable_bswap): Add cost vector arg and adjust.
1280         (vectorizable_call): Likewise.
1281         (vectorizable_simd_clone_call): Likewise.
1282         (vectorizable_conversion): Likewise.
1283         (vectorizable_assignment): Likewise.
1284         (vectorizable_shift): Likewise.
1285         (vectorizable_operation): Likewise.
1286         (vectorizable_store): Likewise.
1287         (vectorizable_load): Likewise.
1288         (vectorizable_condition): Likewise.
1289         (vectorizable_comparison): Likewise.
1290         (can_vectorize_live_stmts): Likewise.
1291         (vect_analyze_stmt): Likewise.
1292         (vect_transform_stmt): Adjust calls to vectorizable_*.
1293         * tree-vectorizer.c: Include gimple-pretty-print.h.
1294         (dump_stmt_cost): New function.
1296 2018-05-16  Richard Biener  <rguenther@suse.de>
1298         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1299         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1300         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1301         (check_name): New callback.
1302         (dse_classify_store): Track cycles via a visited bitmap of PHI
1303         defs and simplify handling of in-loop and across loop dead stores
1304         and properly fail for loop-variant refs.  Handle byte-tracking with
1305         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1306         limiting the walk.
1308 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1310         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1311         (vect_get_mask_type_for_stmt): Likewise.
1312         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1313         split out from...
1314         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1315         to determine the statement's vector type and the vector type that
1316         should be used for calculating nunits.  Deal with cases in which
1317         the type has to be deferred.
1318         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1319         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1320         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1321         (vect_determine_vf_for_stmt): New functions, split out from...
1322         (vect_determine_vectorization_factor): ...here.
1323         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1324         (vect_get_mask_type_for_stmt): New functions, split out from
1325         vect_determine_vectorization_factor.
1327 2018-05-16  Richard Biener  <rguenther@suse.de>
1329         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1330         verify the [VEC_]COND_EXPR embedded comparison.
1332 2018-05-15  Martin Sebor  <msebor@redhat.com>
1334         PR tree-optimization/85753
1335         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1336         RECORD_TYPE in addition to ARRAY_TYPE.
1338 2018-05-15  Martin Sebor  <msebor@redhat.com>
1340         PR middle-end/85643
1341         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1343 2018-05-15  Richard Biener  <rguenther@suse.de>
1345         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1346         add by_clobber_p one.  Change algorithm to collect all defs
1347         representing uses we need to walk and try reducing them to
1348         a single one before failing.
1349         (dse_dom_walker::dse_optimize_stmt): Adjust.
1351 2018-05-13  Mark Wielaard  <mark@klomp.org>
1353         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1354         (size_of_loc_descr): Likewise.
1355         (output_loc_operands): Likewise.
1356         (output_loc_operands_raw): Likewise.
1357         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1358         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1359         (hash_loc_operands): Likewise.
1360         (compare_loc_operands): Likewise.
1362 2018-05-14  Mark Wielaard  <mark@klomp.org>
1364         * dwarf2out.c (count_index_addrs): New function.
1365         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1367 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1369         PR tree-optimization/83648
1370         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1371         return value as malloc candidate.
1373 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1375         PR ipa/85734
1376         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1377         as true in call to suggest_attribute.
1379 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1381         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1382         -mreadonly-in-sdata.
1384 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1386         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1387         New pattern.
1388         (aarch64_crypto_aesd_fused): Likewise.
1390 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1392         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1393         (movsi_aarch64): Likewise.
1394         (load_pairsi): Likewise.
1395         (load_pairdi): Likewise.
1396         (store_pairsi): Likewise.
1397         (store_pairdi): Likewise.
1398         (load_pairsf): Likewise.
1399         (load_pairdf): Likewise.
1400         (store_pairsf): Likewise.
1401         (store_pairdf): Likewise.
1402         (zero_extend): Likewise.
1403         (trunc): Swap alternatives.
1404         (fcvt_target): Add '?' to prefer w over r.
1406 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1408         PR target/85756
1409         * config/i386/i386.md: Disallow non-commutative arithmetics in
1410         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1411         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1412         in the peephole2 before it.
1414 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1416         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1417         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1418         (ix86_handle_option): Handle -mcldemote.
1419         * config.gcc: New header.
1420         * config/i386/cldemoteintrin.h: New file.
1421         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1422         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1423         -mcldemote.
1424         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1425         OPTION_MASK_ISA_CLDEMOTE.
1426         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1427         (ix86_valid_target_attribute_inner_p): Ditto.
1428         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1429         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1430         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1431         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1432         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1433         (cldemote): New.
1434         * config/i386/i386.opt: Add -mcldemote.
1435         * config/i386/x86intrin.h: New header.
1436         * doc/invoke.texi: Add -mcldemote.
1438 2018-05-14  Richard Biener  <rguenther@suse.de>
1440         * doc/match-and-simplify.texi: Adjust :s documentation.
1442 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1444         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1445         intended memcpy size.
1446         (REORDER_45): Likewise.
1448 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1450         * sort.cc: New file.
1451         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1452         * vec.c (qsort_chk): Use gcc_qsort.
1453         * Makefile.in (OBJS-libcommon): Add sort.o.
1454         (build/sort.o): New target.  Use it...
1455         (BUILD_RTL): ... here, and...
1456         (build/gencfn-macros): ... here, and...
1457         (build/genmatch): ... here.
1459 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1460             Chung-Ju Wu  <jasonwucj@gmail.com>
1462         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1463         * config/nds32/nds32-graywolf.md: New file.
1464         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1465         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1466         pipeline.
1467         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1468         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1469         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1470         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1471         * config/nds32/pipelines.md: Include n15 settings.
1473 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1474             Chung-Ju Wu  <jasonwucj@gmail.com>
1476         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1477         * config/nds32/nds32-n13.md: New file.
1478         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1479         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1480         pipeline.
1481         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1482         * config/nds32/nds32.md (pipeline_model): Add n13.
1483         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1484         * config/nds32/pipelines.md: Include n13 settings.
1486 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1487             Chung-Ju Wu  <jasonwucj@gmail.com>
1489         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1490         * config/nds32/nds32-n10.md: New file.
1491         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1492         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1493         pipeline.
1494         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1495         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1496         * config/nds32/nds32.md (pipeline_model): Add n10.
1497         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1498         * config/nds32/pipelines.md: Include n10 settings.
1500 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1501             Kito Cheng  <kito.cheng@gmail.com>
1502             Chung-Ju Wu  <jasonwucj@gmail.com>
1504         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1505         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1506         Add enum values for DSP extension instructions.
1507         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1508         New constraints.
1509         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1510         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1511         New code iterators.
1512         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1513         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1514         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1515         * config/nds32/nds32-intrinsic.md: Likewise.
1516         * config/nds32/nds32_intrinsic.h: Likewise.
1517         * config/nds32/nds32-md-auxiliary.c: Likewise.
1518         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1519         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1520         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1521         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1522         * config/nds32/nds32-protos.h: New declarations for DSP extension.
1523         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1524         TYPE_DMAC in switch statement.
1525         * config/nds32/nds32.c: New checking and implementation for DSP
1526         extension instructions.
1527         * config/nds32/nds32.h: Likewise.
1528         * config/nds32/nds32.md: Likewise.
1529         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
1530         * config/nds32/predicates.md: Implement new predicates for DSP
1531         extension.
1533 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1535         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
1536         Reformat alternatives and attributes so it is easier to identify
1537         which constraints/attributes go with which instruction.
1538         (mov<mode>_hardfloat32, FMOVE64): Likewise.
1539         (mov<mode>_softfloat32, FMOVE64): Likewise.
1540         (mov<mode>_hardfloat64, FMOVE64): Likewise.
1541         (mov<mode>_softfloat64, FMOVE64): Likewise.
1543 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1545         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1546         subsection.
1547         (Basic PowerPC Built-in Functions): The new name of the
1548         subsection previously known as "PowerPC Built-in Functions".
1549         (Basic PowerPC Built-in Functions Available on all Configurations):
1550         New subsubsection.
1551         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
1552         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
1553         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
1554         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
1556 2018-05-11  Martin Jambor  <mjambor@suse.cz>
1558         PR ipa/85655
1559         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
1560         single const.
1562 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1564         PR target/85733
1565         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
1567 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
1569         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
1570         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
1571         (ix86_handle_option): Handle -mwaitpkg.
1572         * config.gcc: New header.
1573         * config/i386/cpuid.h (bit_WAITPKG): New bit.
1574         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
1575         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
1576         function type.
1577         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1578         OPTION_MASK_ISA_WAITPKG.
1579         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
1580         (ix86_option_override_internal): Add PTA_WAITPKG.
1581         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
1582         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
1583         IX86_BUILTIN_TPAUSE.
1584         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
1585         __builtin_ia32_umwait and __builtin_ia32_tpause.
1586         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
1587         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
1588         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
1589         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
1590         UNSPECV_TPAUSE): New.
1591         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
1592         * config/i386/i386.opt: Add -mwaitpkg.
1593         * config/i386/waitpkgintrin.h: New file.
1594         * config/i386/x86intrin.h: New header.
1595         * doc/invoke.texi: Add -mwaitpkg.
1597 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
1599         PR target/85606
1600         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
1601         equivalent.
1602         (cortex-m0): Use armv6s-m isa.
1603         (cortex-m0plus): Likewise.
1604         (cortex-m1): Likewise.
1605         (cortex-m0.small-multiply): Likewise.
1606         (cortex-m0plus.small-multiply): Likewise.
1607         (cortex-m1.small-multiply): Likewise.
1609 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
1610             Jakub Jelinek  <jakub@redhat.com>
1612         PR tree-optimization/85692
1613         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
1614         source permute as well.
1616 2018-05-11  Martin Liska  <mliska@suse.cz>
1618         PR sanitizer/85556
1619         * doc/extend.texi: Document LLVM style format for no_sanitize
1620         attribute.
1622 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1624         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
1625         mode_supports_vsx_dform_quad to mode_supports_dq_form.
1626         (mode_supports_vsx_dform_quad): Likewise.
1627         (mode_supports_vmx_dform): Move these functions to be next to the
1628         other mode_supports functions.
1629         (mode_supports_dq_form): Likewise.
1630         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
1631         mode_supports_dq_form.
1632         (reg_offset_addressing_ok_p): Likewise.
1633         (offsettable_ok_by_alignment): Likewise.
1634         (rs6000_legitimate_offset_address_p): Likewise.
1635         (legitimate_lo_sum_address_p): Likewise.
1636         (rs6000_legitimize_address): Likewise.
1637         (rs6000_legitimize_reload_address): Likewise.
1638         (rs6000_secondary_reload_inner): Likewise.
1639         (rs6000_preferred_reload_class): Likewise.
1640         (rs6000_output_move_128bit): Likewise.
1642 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1644         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
1645         Generate SImode target register for null target.
1646         <case IX86_BUILTIN_XGETBV>: Ditto.
1647         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
1648         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
1650 2018-05-10  Carl Love  <cel@us.ibm.com>
1652         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1653         dcbtt and dcbtstt if operands[2] is 0.
1655 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
1657         PR target/85693
1658         * config/i386/sse.md (usadv64qi): New expander.
1660 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
1662         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
1663         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
1664         -maltivec=be support.
1665         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
1666         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
1667         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
1668         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
1669         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
1670         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
1671         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
1672         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
1673         altivec_vsumsws): Adjust.
1674         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
1675         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
1676         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
1677         support.
1678         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
1679         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
1680         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
1681         (altivec_lve<VI_char>x): Delete expand.
1682         (*altivec_lve<VI_char>x_internal): Rename to...
1683         (altivec_lve<VI_char>x): ... this.
1684         (altivec_lvxl_<mode>): Delete expand.
1685         (*altivec_lvxl_<mode>_internal): Rename to ...
1686         (altivec_lvxl_<mode>): ... this.
1687         (altivec_stvxl_<mode>): Delete expand.
1688         (*altivec_stvxl_<mode>_internal): Rename to ...
1689         (altivec_stvxl_<mode>): ... this.
1690         (altivec_stve<VI_char>x): Delete expand.
1691         (*altivec_stve<VI_char>x_internal): Rename to ...
1692         (altivec_stve<VI_char>x): ... this.
1693         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
1694         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
1695         reduc_plus_scal_<mode>): Adjust.
1696         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
1697         comment.
1698         (rs6000_cpu_cpp_builtins): Adjust.
1699         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
1700         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
1701         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
1702         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
1703         -maltivec=be support.
1704         (rs6000_split_vec_extract_var): Adjust.
1705         (rs6000_split_v4si_init): Adjust.
1706         (swap_selector_for_mode): Delete.
1707         (altivec_expand_lvx_be, altivec_expand_stvx_be,
1708         altivec_expand_stvex_be): Delete.
1709         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
1710         -maltivec=be support.
1711         (rs6000_gimple_fold_builtin): Ditto.
1712         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
1713         Adjust.
1714         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
1715         (TARGET_DIRECT_MOVE_64BIT): Adjust.
1716         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
1717         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
1718         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
1719         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
1720         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
1721         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
1722         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
1723         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
1724         anonymous split): Adjust.
1725         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
1726         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
1728 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
1730         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
1731         when --with-gxx-include-dir is also specified.
1732         * configure: Regenerate.
1734 2018-05-09  Jim Wilson  <jimw@sifive.com>
1736         PR target/84797
1737         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
1738         * config/riscv/t-withmultilib: New.
1739         * config/riscv/withmultilib.h: New.
1740         * doc/install.texi: Document RISC-V --with-multilib-list support.
1742 2018-05-09  Richard Biener  <rguenther@suse.de>
1744         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
1745         vector.
1746         (vect_bb_vectorization_profitable_p): Adjust.  Compute
1747         actual scalar cost using the cost vector and the add_stmt_cost
1748         machinery.
1750 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1752         PR rtl-optimization/85645
1753         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
1754         in the REG_CFA_REGISTER note for LR, don't leave it empty.
1756 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1758         PR rtl-optimization/85645
1759         * shrink-wrap.c (spread_components): Return a boolean saying if
1760         anything was changed.
1761         (try_shrink_wrapping_separate): Iterate spread_components until
1762         nothing changes anymore.
1764 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1766         PR rtl-optimization/85645
1767         * regrename.c (build_def_use): Also kill the chains that include the
1768         destination of a REG_CFA_REGISTER note.
1770 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
1772         PR rtl-optimization/85645
1773         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
1774         insn that has a REG_CFA_REGISTER note.
1776 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
1778         * cfgexpand.c (expand_clobber): New function.
1779         (expand_gimple_stmt_1): Use it.
1780         * tree-vect-stmts.c (vect_clobber_variable): New function,
1781         split out from...
1782         (vectorizable_simd_clone_call): ...here.
1783         (vectorizable_store): Emit a clobber either side of an
1784         IFN_STORE_LANES sequence.
1785         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
1787 2018-05-09  Tom de Vries  <tom@codesourcery.com>
1789         PR target/85626
1790         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
1791         (define_insn "trap_if_false"): Add exit after trap.
1793 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
1795         PR rtl-optimization/85638
1796         * bb-reorder.c: Include common/common-target.h.
1797         (create_forwarder_block): New function extracted from...
1798         (fix_up_crossing_landing_pad): ...here.  Rename into...
1799         (dw2_fix_up_crossing_landing_pad): ...this.
1800         (sjlj_fix_up_crossing_landing_pad): New function.
1801         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
1802         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
1803         from both partitions and exit the loop after one iteration.
1805 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1807         Revert:
1808         * doc/extend.texi (PowerPC Built-in Functions): Rename this
1809         subsection.
1810         (Basic PowerPC Built-in Functions): The new name of the
1811         subsection previously known as "PowerPC Built-in Functions".
1812         (Basic PowerPC Built-in Functions Available on all Configurations):
1813         New subsubsection.
1814         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
1815         subsubsection.
1816         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
1817         subsubsection.
1818         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
1819         subsubsection.
1820         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
1821         subsubsection.
1823 2018-05-08  Jim Wilson  <jimw@sifive.com>
1825         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
1826         (LD_EMUL_SUFFIX): New.
1827         (LINK_SPEC): Use it.
1829 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
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  Jakub Jelinek  <jakub@redhat.com>
1848         PR target/85683
1849         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
1850         after cmpelim optimization.
1852 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
1854         * config.gcc: Support "goldmont".
1855         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
1856         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1857         PROCESSOR_GOLDMONT.
1858         * config/i386/i386.c (m_GOLDMONT): Define.
1859         (processor_target_table): Add "goldmont".
1860         (PTA_GOLDMONT): Define.
1861         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
1862         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
1863         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
1864         (fold_builtin_cpu): Add "goldmont".
1865         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
1866         (ix86_option_override_internal): Add "goldmont".
1867         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
1868         (processor_type): Add PROCESSOR_GOLDMONT.
1869         * config/i386/i386.md: Add CPU "glm".
1870         * config/i386/glm.md: New file.
1871         * config/i386/x86-tune.def: Add m_GOLDMONT.
1872         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
1874 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
1876         PR target/85572
1877         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
1878         E_V4DImode.
1879         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
1880         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
1881         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
1883         PR target/85317
1884         * config/i386/i386.c (ix86_fold_builtin): Handle
1885         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
1887         PR target/85480
1888         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
1889         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
1891 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
1893         PR target/85658
1894         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
1895         (check_arch): Likewise.
1896         (check_fpu): Return the result rather than printing it.
1897         (end arch): Fix operator precedence.
1898         (end cpu): Likewise.
1899         (END): Print the result from check_fpu.
1901 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
1902             Alan Hayward  <alan.hayward@arm.com>
1903             David Sherwood  <david.sherwood@arm.com>
1905         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
1906         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
1907         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
1908         (*fcmuo<mode>_and): New patterns.
1910 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
1912         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
1913         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
1914         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
1915         (cmp_op, sve_imm_con): New code attributes.
1916         (SVE_COND_INT_CMP, imm_con): Delete.
1917         (cmp_op): Remove above unspecs from int attribute.
1918         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
1919         to...
1920         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
1921         comparison-specific unspecs.
1922         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
1923         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
1924         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
1925         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
1926         (*vec_fcm<cmp_op><mode>): Rename to...
1927         (*fcm<cmp_op><mode>): ...this and adjust likewise.
1928         (*vec_fcmuo<mode>): Rename to...
1929         (*fcmuo<mode>): ...this and adjust likewise.
1930         (*pred_fcm<cmp_op><mode>): New pattern.
1931         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
1932         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
1933         functions.
1934         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
1935         and UNORDERED.
1936         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
1937         (aarch64_emit_sve_predicated_cond): New function.
1938         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
1939         (aarch64_emit_unspec_cond_or): Replace with...
1940         (aarch64_emit_sve_or_conds): ...this new function.  Use
1941         aarch64_emit_sve_ptrue_op for the individual comparisons and
1942         aarch64_emit_binop to OR them together.
1943         (aarch64_emit_inverted_unspec_cond): Replace with...
1944         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
1945         aarch64_emit_sve_ptrue_op for the comparison and
1946         aarch64_emit_unop to invert the result.
1947         (aarch64_expand_sve_vec_cmp_float): Update after the above
1948         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
1950 2018-05-07  Nathan Sidwell  <nathan@acm.org>
1952         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
1953         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
1954         (Backwards Compatibility): Likewise.
1956 2018-05-07  Luis Machado  <luis.machado@linaro.org>
1958         PR bootstrap/85681
1959         Revert:
1960         2018-05-07  Luis Machado  <luis.machado@linaro.org>
1962         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1963         <prefetch_dynamic_strides>: New const bool field.
1964         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1965         prefetch_dynamic_strides.
1966         (exynosm1_prefetch_tune): Likewise.
1967         (thunderxt88_prefetch_tune): Likewise.
1968         (thunderx_prefetch_tune): Likewise.
1969         (thunderx2t99_prefetch_tune): Likewise.
1970         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1971         (aarch64_override_options_internal): Update to set
1972         PARAM_PREFETCH_DYNAMIC_STRIDES.
1973         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1974         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1975         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1976         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1977         prefetch-dynamic-strides setting.
1979         2018-05-07  Luis Machado  <luis.machado@linaro.org>
1981         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1982         <minimum_stride>: New const int field.
1983         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1984         minimum_stride field.
1985         (exynosm1_prefetch_tune): Likewise.
1986         (thunderxt88_prefetch_tune): Likewise.
1987         (thunderx_prefetch_tune): Likewise.
1988         (thunderx2t99_prefetch_tune): Likewise.
1989         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1990         (aarch64_override_options_internal): Update to set
1991         PARAM_PREFETCH_MINIMUM_STRIDE.
1992         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1993         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1994         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1995         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1996         stride is constant and is below the minimum stride threshold.
1998 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2000         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2001         to 512.
2003 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2005         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2006         <prefetch_dynamic_strides>: New const bool field.
2007         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2008         prefetch_dynamic_strides.
2009         (exynosm1_prefetch_tune): Likewise.
2010         (thunderxt88_prefetch_tune): Likewise.
2011         (thunderx_prefetch_tune): Likewise.
2012         (thunderx2t99_prefetch_tune): Likewise.
2013         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2014         (aarch64_override_options_internal): Update to set
2015         PARAM_PREFETCH_DYNAMIC_STRIDES.
2016         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2017         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2018         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2019         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2020         prefetch-dynamic-strides setting.
2022 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2024         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2025         <minimum_stride>: New const int field.
2026         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2027         minimum_stride field.
2028         (exynosm1_prefetch_tune): Likewise.
2029         (thunderxt88_prefetch_tune): Likewise.
2030         (thunderx_prefetch_tune): Likewise.
2031         (thunderx2t99_prefetch_tune): Likewise.
2032         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2033         (aarch64_override_options_internal): Update to set
2034         PARAM_PREFETCH_MINIMUM_STRIDE.
2035         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2036         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2037         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2038         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2039         stride is constant and is below the minimum stride threshold.
2041 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2043         PR c++/85659
2044         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2045         the type is addressable.  Don't force op into register if it has
2046         BLKmode.
2048 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2050         PR other/77609
2051         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2052         any section for which we don't know a specific type it should have,
2053         regardless of name.  Previously this was done only for the exact
2054         names ".init_array", ".fini_array", and ".preinit_array".
2055         (default_elf_asm_named_section): Add comment about
2056         relationship with default_section_type_flags and SECTION_NOTYPE.
2057         (get_section): Don't consider it a type conflict if one side has
2058         SECTION_NOTYPE and the other doesn't, as long as neither has the
2059         SECTION_BSS et al used in the default_section_type_flags logic.
2061 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2063         PR target/85653
2064         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2065         (workaround_barsyncs): New function.
2066         (nvptx_reorg): Use workaround_barsyncs.
2067         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2068         (define_expand "nvptx_membar_cta"): New define_expand.
2069         (define_insn "*nvptx_membar_cta"): New insn.
2071 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2073         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2074         To improve optimization opportunities.
2075         * builtin-types.def: The new needed builtin types for the above.
2077 2018-05-04  Richard Biener  <rguenther@suse.de>
2079         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2080         * gimple-ssa-store-merging.c
2081         (imm_store_chain_info::output_merged_store): Remove redundant create,
2082         release split_store vector contents on failure.
2083         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2084         scalar stmt vector on cache hit.
2086 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2088         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2089         Xilinx FP support.
2090         * config.gcc (powerpc-xilinx-eabi*): Remove.
2091         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2092         support.
2093         (fusion_addis_mem_combo_load): Ditto.
2094         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2095         FP support.
2096         (rs6000_cpu_cpp_builtins): Ditto.
2097         * config/rs6000/rs6000-linux.c
2098         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2099         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2100         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2101         support.
2102         (rs6000_setup_reg_addr_masks): Ditto.
2103         (rs6000_init_hard_regno_mode_ok): Ditto.
2104         (rs6000_option_override_internal): Ditto.
2105         (legitimate_lo_sum_address_p): Ditto.
2106         (rs6000_legitimize_address): Ditto.
2107         (rs6000_legitimize_reload_address): Ditto.
2108         (rs6000_legitimate_address_p): Ditto.
2109         (abi_v4_pass_in_fpr): Ditto.
2110         (setup_incoming_varargs): Ditto.
2111         (rs6000_gimplify_va_arg): Ditto.
2112         (rs6000_split_multireg_move): Ditto.
2113         (rs6000_savres_strategy): Ditto.
2114         (rs6000_emit_prologue_components): Ditto.
2115         (rs6000_emit_epilogue_components): Ditto.
2116         (rs6000_emit_prologue): Ditto.
2117         (rs6000_emit_epilogue): Ditto.
2118         (rs6000_elf_file_end): Ditto.
2119         (rs6000_function_value): Ditto.
2120         (rs6000_libcall_value): Ditto.
2121         * config/rs6000/rs6000.h: Ditto.
2122         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2123         (TARGET_MINMAX): ... this.  New.
2124         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2125         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2126         (*movsi_internal1_single): Delete.
2127         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2128         mfpu=, mxilinx-fpu): Delete.
2129         * config/rs6000/singlefp.h: Delete.
2130         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2131         * config/rs6000/t-rs6000: Ditto.
2132         * config/rs6000/t-xilinx: Delete.
2133         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2134         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2135         (VStype_simple): Delete.
2136         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2137         * config/rs6000/xfpu.h: Delete.
2138         * config/rs6000/xfpu.md: Delete.
2139         * config/rs6000/xilinx.h: Delete.
2140         * config/rs6000/xilinx.opt: Delete.
2141         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2142         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2144 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2146         PR libgomp/85639
2147         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2148         if ignore == 0.
2150 2018-05-04  Richard Biener  <rguenther@suse.de>
2152         PR middle-end/85627
2153         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2154         (expand_complex_div_wide): Likewise.
2155         (expand_complex_operations_1): Likewise.
2156         (expand_complex_libcall): Preserve EH info of the original stmt.
2157         (tree_lower_complex): Handle removed blocks.
2158         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2159         on complex multiplication and division libcall builtins.
2161 2018-05-04  Richard Biener  <rguenther@suse.de>
2163         PR middle-end/85574
2164         * fold-const.c (negate_expr_p): Restrict negation of operand
2165         zero of a division to when we know that can happen without
2166         overflow.
2167         (fold_negate_expr_1): Likewise.
2169 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2171         PR libstdc++/85466
2172         * real.h (real_nextafter): Declare.
2173         * real.c (real_nextafter): New function.
2174         * fold-const-call.c (fold_const_nextafter): New function.
2175         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2176         CASE_CFN_NEXTTOWARD.
2177         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2178         even when arg1_mode is different from arg0_mode.
2180 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2182         * doc/extend.texi (Deprecated Features): Remove
2183         -ffriend-injection.
2184         (Backwards Compatibility): Likewise.
2185         * doc/invoke.texi (C++ Language Options): Likewise.
2186         (C++ Dialect Options): Likewise.
2188 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2190         PR target/85530
2191         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2192         _mm512_mask_mullox_epi64): New intrinsics.
2194 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2196         PR testsuite/85106
2197         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2198         dump files): Add offload-tree.
2200 2018-05-03  Richard Biener  <rguenther@suse.de>
2202         PR tree-optimization/85615
2203         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2204         to loops not nested in BBs loop father to avoid creating multi-entry
2205         loops.
2207 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2209         PR tree-optimization/70291
2210         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2211         arguments.  Change return type to tree.  Emit libcall as a new
2212         statement rather than replacing existing one when inplace_p is true.
2213         (expand_complex_multiplication_components): New function.
2214         (expand_complex_multiplication): Expand floating-point complex
2215         multiplication using the above.
2216         (expand_complex_division): Rename inner_type parameter to type.
2217         Update expand_complex_libcall call-site.
2218         (expand_complex_operations_1): Update expand_complex_multiplication
2219         and expand_complex_division call-sites.
2221 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2223         PR target/85582
2224         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2225         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2226         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2227         the highest significant bit of the shift count mask is clear.  In
2228         check whether and[sq]i3 is needed verify that all significant bits
2229         of the shift count other than the highest are set.
2231 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2233         PR libgomp/82428
2234         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2235         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2236         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2237         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2238         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2239         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2240         __builtin_goacc_parlevel_size.
2242 2018-05-02  Richard Biener  <rguenther@suse.de>
2244         PR tree-optimization/85597
2245         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2246         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2247         directly.
2249 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2251         PR testsuite/85106
2252         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2253         dump files): Add ltrans-tree.
2255 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2257         PR testsuite/85106
2258         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2259         dump files): Add wpa-ipa.
2261 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2263         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2264         powerpc*-*-linux*paired* target.
2265         * config/rs6000/750cl.h: Delete.
2266         * config/rs6000/paired.h: Delete.
2267         * config/rs6000/paired.md: Delete.
2268         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2269         float support.
2270         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2271         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2272         comment.  Remove paired float support.
2273         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2274         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2275         VECTOR_PAIRED.
2276         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2277         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2278         declarations.
2279         * config/rs6000/rs6000.c: Remove paired float support.
2280         (paired_expand_vector_init, paired_expand_vector_move,
2281         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2282         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2283         paired_expand_builtin, paired_expand_predicate_builtin,
2284         paired_init_builtins): Delete.
2285         * config/rs6000/rs6000.h: Remove paired float support.
2286         * config/rs6000/rs6000.md: Remove paired float support.
2287         (move_from_CR_ov_bit): Delete.
2288         * config/rs6000/rs6000.opt (mpaired): Delete.
2289         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2290         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2292 2018-05-02  Richard Biener  <rguenther@suse.de>
2294         PR middle-end/85567
2295         * gimplify.c (gimplify_save_expr): When in SSA form allow
2296         SAVE_EXPRs to compute to SSA vars.
2298 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2300         PR target/85582
2301         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2302         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2303         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2304         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2306 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2308         PR tree-optimization/85586
2309         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2310         exit early for statements in the same group if the accesses are
2311         not strided.
2313 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2315         PR lto/85451
2316         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2317         error message.
2319 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2321         PR tree-optimization/85143
2322         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2324 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2326         PR lto/85451
2327         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2328         not found" error message.
2330 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2332         PR other/83786
2333         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2334         * vec.c (test_ordered_remove_if): New function.
2335         (vec_c_tests): Call test_ordered_remove_if.
2336         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2337         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2338         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2339         VEC_ORDERED_REMOVE_IF.
2341 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2343         PR tree-optimization/82665
2344         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2345         pointer subtraction where arguments come from a memchr call.
2347 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2349         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2350         --push-state --as-needed and --pop-state instead of --as-needed and
2351         --no-as-needed if ld supports it.
2352         * configure: Regenerated.
2354         PR web/85578
2355         * doc/install.texi2html: Replace _002d with - and _002a with * in
2356         generated html files using sed.
2358 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2360         PR c++/85523
2361         * gcc-rich-location.c (blank_line_before_p): New function.
2362         (use_new_line): New function.
2363         (gcc_rich_location::add_fixit_insert_formatted): New function.
2364         * gcc-rich-location.h
2365         (gcc_rich_location::add_fixit_insert_formatted): New function.
2367 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2369         * selftest.c (assert_streq): Rename "expected" and "actual" to
2370         "val1" and "val2".  Extend NULL-handling to cover both inputs
2371         symmetrically, while still requiring both to be non-NULL for a pass.
2372         * selftest.h (assert_streq): Rename "expected" and "actual" to
2373         "val1" and "val2".
2374         (ASSERT_EQ): Likewise.
2375         (ASSERT_EQ_AT): Likewise.
2376         (ASSERT_KNOWN_EQ): Likewise.
2377         (ASSERT_KNOWN_EQ_AT): Likewise.
2378         (ASSERT_NE): Likewise.
2379         (ASSERT_MAYBE_NE): Likewise.
2380         (ASSERT_MAYBE_NE_AT): Likewise.
2381         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2382         the assertion to pass.
2383         (ASSERT_STREQ_AT): Likewise.
2385 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2387         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2388         interaction with -pie.
2390 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2392         * selftest.h: Fix alphabetization of per-source-file selftest
2393         declarations.
2395 2018-04-30  Jason Merrill  <jason@redhat.com>
2397         PR c++/61982 - dead stores to destroyed objects.
2398         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2399         of clobber.
2401 2018-04-30  Jason Merrill  <jason@redhat.com>
2403         * tree.c (build_clobber): New.
2404         * tree.h: Declare it.
2405         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2407 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2409         * diagnostic-show-locus.c (layout::layout): Update for
2410         location_get_source_line returning a char_span.
2411         (struct char_span): Move to input.h.
2412         (struct correction): Update for fields in char_span becoming
2413         private.
2414         (struct source_line): Update for location_get_source_line
2415         returning a char_span.
2416         (layout::print_line): Likewise.
2417         * edit-context.c (edited_file::print_content): Likewise.
2418         (edited_file::print_diff_hunk): Likewise.
2419         (edited_file::print_run_of_changed_lines): Likewise.
2420         (edited_file::get_num_lines): Likewise.
2421         (edited_line::edited_line): Likewise.
2422         * final.c (asm_show_source): Likewise.
2423         * input.c (location_get_source_line): Convert return type
2424         from const char * to char_span, losing the final "line_len"
2425         param.
2426         (dump_location_info): Update for the above.
2427         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2428         when handling the literal within the line.
2429         (test_reading_source_line): Update for location_get_source_line
2430         returning a char_span.
2431         * input.h (class char_span): Move here from
2432         diagnostic-show-locus.c, converting from a struct to a class.
2433         Make data members private.
2434         (char_span::operator bool): New.
2435         (char_span::length): New.
2436         (char_span::get_buffer): New.
2437         (char_span::operator[]): New.
2438         (char_span::subspan): Make const.
2439         (char_span::xstrdup): New.
2440         (location_get_source_line): Convert return type from const char *
2441         to char_span, losing the final "line_size" param.
2443 2018-04-30  Jan Hubicka  <jh@suse.cz>
2445         * lto-wrapper.c (ltrans_priorities): New static var.
2446         (cmp_priority): New.
2447         (run_gcc): Read priorities and if doing parallel build order
2448         the Makefile by them.
2450 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2452         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2454 2018-04-30  Richard Biener  <rguenther@suse.de>
2456         * tree-cfg.c (verify_address): Remove base argument, add
2457         flag whether to check TREE_ADDRESSABLE and do that.
2458         (verify_expr): Remove.
2459         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2460         (verify_gimple_assign_single): Likewise.
2461         (verify_gimple_switch): Likewise.
2462         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2463         piece from verify_expr.
2464         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2466 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2468         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2470 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2472         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2473         (small_data_pattern): Likewise.
2474         (arc_rewrite_small_data): Likewise.
2475         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2476         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2477         (get_symbol_alignment): New function.
2478         (legitimate_small_data_address_p): Likewise.
2479         (legitimate_scaled_address): Update, call
2480         legitimate_small_data_address_p.
2481         (output_sdata): New static variable.
2482         (arc_print_operand): Update how we handle small data operands.
2483         (arc_print_operand_address): Likewise.
2484         (arc_legitimate_address_p): Update, use
2485         legitimate_small_data_address_p.
2486         (arc_rewrite_small_data_p): Remove.
2487         (arc_rewrite_small_data_1): Likewise.
2488         (arc_rewrite_small_data): Likewise.
2489         (small_data_pattern): Likewise.
2490         (compact_sda_memory_operand): Update to use
2491         legitimate_small_data_address_p and get_symbol_alignment.
2492         (prepare_move_operands): Don't rewite sdata pattern.
2493         (prepare_extend_operands): Remove.
2494         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2495         pattern.
2496         (zero_extendqisi2): Likewise.
2497         (zero_extendhisi2): Likewise.
2498         (extendqihi2): Likewise.
2499         (extendqisi2): Likewise.
2500         (extendhisi2): Likewise.
2501         (addsi3): Likewise.
2502         (subsi3): Likewise.
2503         (andsi3): Likewise.
2504         * config/arc/constraints.md (Usd): Change it to memory constraint.
2506 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2508         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2509         as source of std instructions.
2510         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2511         allow 6-bit constants as source for store instructions.
2512         (movdi_insn): Update instruction pattern to allow 6-bit constants
2513         as source for store instructions.
2515 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2517         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2519 2018-04-30  Nathan Sidwell  <nathan@acm.org>
2520             Sandra Loosemore <sandra@codesourcery.com>
2522         * dumpfile.c (dump_open): Allow '-' for stdout.
2523         * doc/invoke.texi (Developer Options): Document dump filename
2524         determination early.  Document stdin/stdout selection.
2526 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
2528         Microblaze Target: PIC data text relative
2530         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
2531         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
2532         Add declaration.
2533         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
2534         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
2535         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
2536         New addressing mode for data-text relative position indepenedent code.
2537         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
2538         'ADDRESS_SYMBOLIC_TXT_REL'.
2539         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
2540         (microblaze_legitimate_pic_operand): Exclude function calls from
2541         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
2542         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
2543         addresses cases.
2544         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2545         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
2546         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
2547         for 'address + offset'.
2548         (microblaze_expand_prologue): Add new function prologue call for
2549         'r20' assignation.
2550         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
2551         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
2552         table in case of TARGET_PIC_DATA_TEXT_REL.
2553         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
2554         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
2555         Add new macros 'UNSPEC_TEXT',
2556         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
2557         + exclude function calls from 'UNSPEC_PLT' in case of data text
2558         relative mode.
2559         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2560         new target hook for generating address diff vector tables in case of
2561         flag_pic.
2562         * doc/tm.texi : Regenerate.
2563         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
2564         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
2565         of addr diff vector generation.
2566         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
2567         target hook definition.
2568         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
2569         Add default function for generate_pic_addr_diff_vec -> flag_pic.
2570         * doc/invoke.texi (Add new pic option): Add new microblaze pic
2571         option for data text relative.
2573 2018-04-30  Richard Biener  <rguenther@suse.de>
2575         * tree-chrec.h (evolution_function_is_constant_p): Remove
2576         redundant check.
2577         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2579 2018-04-30  Richard Biener  <rguenther@suse.de>
2581         PR bootstrap/85571
2582         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2584 2018-04-30  Richard Biener  <rguenther@suse.de>
2586         PR tree-optimization/28364
2587         PR tree-optimization/85275
2588         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
2589         copying first exit test.
2591 2018-04-28  Mark Wielaard  <mark@klomp.org>
2593         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
2594         dwarf_version >= 5.
2595         (dwarf_AT): Handle DW_AT_addr_base.
2596         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2598 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
2600         PR target/84431
2601         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
2602         (*ashl<dwi>3_doubleword_mask_1): Ditto.
2603         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
2604         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2606 2018-04-28  Richard Biener  <rguenther@suse.de>
2608         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
2609         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
2610         to reflect use.  Only add interesting stmts.
2612 2018-04-27  Martin Jambor  <mjambor@suse.cz>
2614         PR ipa/85549
2615         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
2616         the jump function allows for passing through aggregate values.
2618 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
2620         * input.h (in_system_header_at): Convert from macro to inline
2621         function.
2622         (from_macro_expansion_at): Likewise.
2623         (from_macro_definition_at): Likewise.
2625 2018-04-27  Jeff Law  <law@redhat.com>
2627         * config.gcc: Mark tile* targets as deprecated/obsolete.
2629 2018-04-27  Richard Biener  <rguenther@suse.de>
2631         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
2632         fix for ILP32.
2634 2018-04-27  Richard Biener  <rguenther@suse.de>
2636         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2638 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
2640         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
2641         with Yd constraint. Set "preferred_for_speed" attribute from
2642         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
2643         with Yd constraint.
2644         (*movdi_internal): Ditto.
2645         (movti_interunit splitters): Remove
2646         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
2647         (movdi_interunit splitters): Ditto.
2648         * config/i386/constraints.md (Ye): Remove.
2649         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2651 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2653         PR target/85512
2654         * config/aarch64/constraints.md (Usg): Limit to 31.
2655         (Usj): Limit to 63.
2657 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
2659         PR tree-optimization/85529
2660         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
2661         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
2662         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
2663         zero extension or masking of the MSB bit.
2664         (optimize_range_tests): Add FIRST_BB argument, pass it through
2665         to optimize_range_tests_var_bound.
2666         (maybe_optimize_range_tests, reassociate_bb): Adjust
2667         optimize_range_tests callers.
2669 2018-04-26  Richard Biener  <rguenther@suse.de>
2670             Jakub Jelinek  <jakub@redhat.com>
2672         * cgraph.h (symbol_table): Just declare debug method here.
2673         * symtab.c (symbol_table::debug): Define.
2675 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
2677         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2679 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
2681         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
2682         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
2683         (*movdi_internal): Substitute Yi and Yj constraint with x
2684         and Ym and Yn constraint with y constraint.  Update "isa"
2685         attribute and set "preferred_for_speed" attribute from
2686         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
2687         (*movsi_internal): Ditto.
2688         (*movdf_internal): Ditto.
2689         (*movsf_internal): Ditto.
2690         (*zero_extendsidi2): Ditto.
2691         * config/i386/sse.md (vec_set<mode>_0): Ditto.
2692         (sse2_loadld): Ditto.
2693         (*vec_extract<ssevecmodelower>_0): Ditto.
2694         (*vec_extractv4si_0_zext_sse4): Ditto.
2695         (vec_concatv2di): Ditto.
2696         (*vec_dup<mode>): Ditto.
2697         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
2698         * config/i386/constraints.md (Yi): Remove.
2699         (Yj): Remove.
2700         (Ym): Remove.
2701         (Yn): Remove.
2703 2018-04-26  Nathan Sidwell  <nathan@acm.org>
2705         * dumpfile.c (dump_open): New.
2706         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
2707         (dump_finish): Detect stdio/stderr by value not name.
2709 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
2711         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
2713 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2715         PR target/84952
2716         * config/nvptx/nvptx.c (verify_neutering_jumps)
2717         (verify_neutering_labels): New function
2718         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2720 2018-04-26  Tom de Vries  <tom@codesourcery.com>
2722         PR target/84025
2723         * config/nvptx/nvptx.c (needs_neutering_p): New function.
2724         (nvptx_single): Use needs_neutering_p to skip over insns that do not
2725         need neutering.
2727 2018-04-26  Richard Biener <rguenther@suse.de>
2728             Tom de Vries  <tom@codesourcery.com>
2730         PR lto/85422
2731         * lto-streamer-out.c (output_function): Fixup loops if required to match
2732         discovery done in the reader.
2734 2018-04-26  Richard Biener  <rguenther@suse.de>
2736         PR tree-optimization/85116
2737         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
2738         have a loop exit from the single latch predecessor.  Remove
2739         case of header with just condition.
2740         (ch_base::copy_headers): Exclude infinite loops from any
2741         processing.
2742         (pass_ch::execute): Record exits.
2744 2018-04-26  Richard Biener  <rguenther@suse.de>
2746         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
2747         prologue cost vector and pass it to vect_get_load_cost.
2748         (vect_get_peeling_costs_all_drs): Likewise.
2749         (vect_peeling_hash_get_lowest_cost): Likewise.
2750         (vect_enhance_data_refs_alignment): Likewise.
2752 2018-04-26  Richard Biener  <rguenther@suse.de>
2754         PR middle-end/85450
2755         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
2756         checking of integer<->pointer conversions.
2757         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
2758         sign-/zero-extending pointer types.
2759         (expand_omp_for_static_chunk): Likewise.
2761 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
2762             Jean Lee  <xiaoyur347@gmail.com>
2764         * config/mips/mips.c (mips_asan_shadow_offset): New function.
2765         (TARGET_ASAN_SHADOW_OFFSET): Define.
2766         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
2767         true for -fsanitize=address.
2769 2018-04-25  Mark Wielaard  <mark@klomp.org>
2771         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
2772         shorter ones.
2774 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2776         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
2777         than "alu", remove explicit "memory" and "imm_disp" attributes.
2778         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
2780         PR middle-end/85414
2781         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
2782         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
2783         gen_lowpart_no_emit.
2785 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
2787         PR target/85473
2788         * config/i386/i386.c (ix86_expand_builtin): Change memory
2789         operand to XI, extend p0 to Pmode.
2790         * config/i386/i386.md: Change unspec volatile and operand
2791         1 mode to XI, change operand 0 mode to P.
2793 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2795         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
2796         GET_MODE_MASK before any checking.
2797         (nds32_can_use_bset_p): Likewise.
2798         (nds32_can_use_btgl_p): Likewise.
2800 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2802         * config/nds32/nds32-doubleword.md: New define_split pattern for
2803         illegal register number.
2805 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2807         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
2809 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
2811         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
2813 2018-04-25  Richard Biener  <rguenther@suse.de>
2815         * lto-streamer.h (LTO_major_version): Bump to 8.
2817 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
2819         * BASE-VER: Set to 9.0.0.
2821 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
2823         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
2824         in __abskf2 and __powikf2.
2826 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2828         PR target/85512
2829         * config/aarch64/constraints.md (Usg, Usj): New constraints.
2830         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
2831         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
2832         Use the above on operand 2.  Reindent.
2833         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
2835 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
2837         PR target/85485
2838         * common/config/i386/i386-common.c (ix86_handle_option): Don't
2839         handle OPT_mcet.
2840         * config/i386/i386.opt (mcet): Removed.
2841         * doc/install.texi: Remove -mcet documentation.
2842         * doc/invoke.texi: Likewise.
2844 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
2846         PR target/85485
2847         * doc/install.texi: Remove -mcet from bootstrap-cet.
2849 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2851         PR target/85511
2852         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
2853         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
2854         if TARGET_64BIT.
2856         PR target/85503
2857         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
2858         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
2859         containing a CONST_VECTOR.
2861 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
2863         * doc/install.texi: Update newlib dependency for nvptx.
2865 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2867         PR target/85508
2868         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
2869         instead of INTVAL when shifting x left.
2871 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
2873         PR tree-optimization/85478
2874         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
2875         vect_grouped_store_supported for single element vectors.
2877 2018-04-24  Richard Biener  <rguenther@suse.de>
2879         PR target/85491
2880         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
2881         load cost increase to the case of non-constant step.
2883 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
2885         PR target/84828
2886         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
2887         destination if any_malformed_asm.
2889 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
2891         PR middle-end/85496
2892         * expr.c (store_field): In the bitfield case, if the value comes from
2893         a function call and is returned in registers by means of a PARALLEL,
2894         do not change the mode of the temporary unless BLKmode and VOIDmode.
2896 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
2898         PR rtl-optimization/85423
2899         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
2900         dependencies to debug insns when the previous insn is non-debug.
2902 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
2904         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
2905         enums into a single definition.
2906         (fls): Fix predicates and printing.
2907         (seti): Likewise.
2909 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
2911         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
2912         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
2913         and short u6 immediate.
2914         (check_if_valid_sleep_operand): Remove.
2915         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
2917 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2919         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
2920         flag_always_save_lp condition.
2921         * config/nds32/nds32.opt (malways-save-lp): New option.
2923 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
2925         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
2926         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
2927         * config/nds32/nds32.h
2928         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
2929         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2931 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
2933         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
2934         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
2936 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
2937             Chung-Ju Wu  <jasonwucj@gmail.com>
2939         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
2940         Declare.
2941         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
2942         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2944 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2946         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2948 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2950         * config/nds32/nds32-protos.h (nds32_data_alignment,
2951         nds32_local_alignment): Declare.
2952         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
2953         nds32_local_alignment): New functions.
2954         (TARGET_CONSTANT_ALIGNMENT): Define.
2955         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2957 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2959         * config/nds32/nds32.c
2960         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
2961         (TARGET_MODES_TIEABLE_P): Likewise.
2963 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2965         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
2966         level Ofast and Og.
2968 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
2969             Chung-Ju Wu  <jasonwucj@gmail.com>
2971         * config/nds32/constants.md (unspec_volatile_element): Add enum values
2972         for unaligned access.
2973         * config/nds32/nds32-intrinsic.c: Implementation of expanding
2974         unaligned access.
2975         * config/nds32/nds32-intrinsic.md: Likewise.
2976         * config/nds32/nds32_intrinsic.h: Likewise.
2977         * config/nds32/nds32.h (nds32_builtins): Likewise.
2978         * config/nds32/nds32.opt (munaligned-access): New option.
2979         * config/nds32/nds32.c (nds32_asm_file_start): Display
2980         flag_unaligned_access status.
2982 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
2984         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
2985         -mno-relax is present.
2986         * config/riscv/linux.h (LINK_SPEC): Ditto.
2988 2018-04-20  Martin Sebor  <msebor@redhat.com>
2990         PR c/85365
2991         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
2992         for null pointers.
2993         (gimple_fold_builtin_stxcpy_chk): Same.
2994         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
2996 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
2998         PR target/85456
2999         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3000         __powikf2 when long double is IEEE 128-bit.
3002 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3004         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3005         step to make sure stack always aligned.
3007 2018-04-20  Carl Love  <cel@us.ibm.com>
3009         PR target/83402
3010         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3011         size check for arg0.
3013 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3014             Tom de Vries  <tom@codesourcery.com>
3016         PR target/85445
3017         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3018         Emit insns for calls too.
3019         (nvptx_find_par): Always look for worker-level predecessor insn.
3020         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3021         calls.
3022         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3023         (nvptx_process_pars): Propagate frames for calls.
3025 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3027         PR target/85469
3028         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3029         Removed.
3030         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3031         (ix86_handle_option): Don't handle OPT_mibt.
3032         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3033         __SHSTK__.
3034         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3035         has_ibt and ibt.
3036         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3037         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3038         (ix86_target_macros): Define __CET__ with flag_cf_protection
3039         for -fcf-protection.
3040         * config/i386/i386.c (isa2_opts): Remove -mibt.
3041         * config/i386/i386.h (TARGET_IBT): Removed.
3042         (TARGET_IBT_P): Likewise.
3043         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3044         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3045         * config/i386/i386.opt (mcet): Update help message.
3046         (mshstk): Likewise.
3047         (mibt): Removed.
3048         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3049         -mcet as an alias for -mshstk.
3051 2018-04-20  Richard Biener <rguenther@suse.de>
3053         PR middle-end/85475
3054         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3055         complexity by forcing a single use of the multiply operand.
3057 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3059         ipa/85449
3060         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3061         recursion dependency to only apply to non-clones.
3063 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3065         ipa/85447
3066         * ipa-cp.c (create_specialized_node): Check that clones of
3067         self-recursive edges exist during IPA-CP.
3069 2018-04-19  Toon Moene  <toon@moene.org>
3071         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3072         by -O3. 
3074 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3076         PR tree-optimization/85467
3077         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3078         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3079         VECTOR_CST element to type.
3081 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3083         PR target/85397
3084         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3085         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3086         (builtin_longjmp): Likewise.
3087         (save_stack_nonlocal): New pattern.
3088         (restore_stack_nonlocal): Likewise.
3090 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3092         PR target/85404
3093         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3094         Replace ASM_OUTPUT_LABEL with fprintf.
3096 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3098         PR target/85417
3099         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3100         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3101         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3102         define __IBT__ and __SHSTK__ for -fcf-protection.
3103         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3104         TARGET_IBT.
3105         (ix86_trampoline_init): Likewise.
3106         (x86_output_mi_thunk): Likewise.
3107         (ix86_notrack_prefixed_insn_p): Likewise.
3108         (ix86_option_override_internal): Don't disallow -fcf-protection.
3109         * config/i386/i386.md (rdssp<mode>): Also enable for
3110         -fcf-protection.
3111         (incssp<mode>): Likewise.
3112         (nop_endbr): Likewise.
3113         * config/i386/i386.opt (mcet): Change help message to built-in
3114         functions only.
3115         (mibt): Likewise.
3116         (mshstk): Likewise.
3117         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3118         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3119         enable CET built-in functions.
3121 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3123         * common/config/i386/i386-common.c 
3124         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3125         OPTION_MASK_ISA_MOVDIRI_UNSET,
3126         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3127         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3128         * config.gcc (movdirintrin.h): New header.
3129         * config/i386/cpuid.h (bit_MOVDIRI,
3130         bit_MOVDIR64B): New bits.
3131         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3132         and -mmvodir64b.
3133         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3134         (VOID, PVOID, PCVOID)): New function types.
3135         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3136         __builtin_ia32_directstoreu_u64,
3137          __builtin_ia32_movdir64b): New builtins.
3138         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3139         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3140         and -mmovdiri.
3141         (ix86_valid_target_attribute_inner_p): Ditto.
3142         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3143         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3144         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3145         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3146         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3147         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3148         (movdiri<mode>, movdir64b_<mode>): New.
3149         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3150         * config/i386/immintrin.h: Include movdirintrin.h.
3151         * config/i386/movdirintrin.h: New file.
3152         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3154 2018-04-19  Richard Biener  <rguenther@suse.de>
3156         PR middle-end/85455
3157         * cfg.c (clear_bb_flags): When loop state says we have
3158         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3160 2018-04-19  Richard Biener  <rguenther@suse.de>
3162         PR tree-optimization/84737
3163         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3164         copying restrict info.
3165         (vect_setup_realignment): Use it.
3166         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3167         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3168         the first DR to all generated stores.
3169         (vectorizable_load): Likewise for loads.
3171 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3173         PR tree-optimization/85446
3174         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3175         the integral and pointer types to have the same precision.
3177         * doc/install.texi: Document --disable-cet being the default and
3178         --enable-cet=auto.
3180 2018-04-18  Martin Liska  <mliska@suse.cz>
3182         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3183         style.
3185 2018-04-18  Martin Liska  <mliska@suse.cz>
3187         Revert
3188         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3190         PR ipa/83983
3191         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3192         arguments if they are comparable.
3194 2018-04-18  Martin Liska  <mliska@suse.cz>
3196         Revert
3197         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3199         PR lto/84805
3200         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3201         incomplete types.
3203 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3205         PR target/85388
3206         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3207         ENDBR after calling __morestack.
3209 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3211         PR jit/85384
3212         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3213         by using gcc_base_ver to generate a gcc_driver_version, and use
3214         it when generating GCC_DRIVER_NAME.
3215         * configure: Regenerate.
3217 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3219         PR target/81084
3220         * config.gcc: Obsolete powerpc*-*-*spe*.
3222 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3224         PR debug/84637
3225         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3226         (stabstr_D): Change type of unum from unsigned int to
3227         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3228         type.
3230 2018-04-17  Jim Wilson  <jimw@sifive.com>
3232         PR 84856
3233         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3234         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3235         Set arg_pointer_offset after using pretend_args_size.
3237 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3239         PR rtl-optimization/85431
3240         * dse.c (record_store): Ignore zero width stores.
3242         PR sanitizer/85230
3243         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3244         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3245         __builtin_stack_restore rather than after it.
3246         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3247         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3248         argument instead of virtual_dynamic_stack_rtx.
3250 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3252         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3253         New prototype.
3254         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3255         Add note to error message to explain internal mapping of overloaded
3256         built-in function name to non-overloaded built-in function name.
3257         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3258         function.
3260 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3262         PR target/85424
3263         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3264         where the inputs overlap with the output.
3266 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3268         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3269         (=v, v) alternative and explicit "memory" attribute.
3270         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3271         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3272         attributes.
3273         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3274         "sselog1" type instead of "sselog".
3275         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3276         "sselog".  Remove explicit "memory" attribute.
3277         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3278         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3279         attributes.
3280         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3281         "sselog1" type instead of "sselog".  Remove explicit "memory"
3282         attribute.
3283         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3284         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3285         attribute.
3286         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3287         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3288         attributes.
3289         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3290         "sselog1" type instead of "sselog".  Remove explicit "memory"
3291         attribute.
3292         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3293         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3294         attribute.
3296         PR target/85430
3297         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3299         PR middle-end/85414
3300         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3301         on a SUBREG.
3303 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3305         PR ipa/85421
3306         * ipa-cp.c (create_specialized_node): Call
3307         expand_all_artificial_thunks if necessary.
3309 2018-04-17  Martin Liska  <mliska@suse.cz>
3311         PR lto/85405
3312         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3313         in message, remote space in between '_G' and '('.
3315 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3317         PR target/85281
3318         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3319         avx512f_vmcmp<mode>3<round_saeonly_name>,
3320         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3321         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3322         avx512f_rndscale<mode><round_saeonly_name>,
3323         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3324         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3325         Use %<iptr>2 instead of %2 for -masm=intel.
3326         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3327         avx512f_vcvttss2usi<round_saeonly_name>,
3328         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3329         -masm=intel.
3330         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3331         avx512f_vcvttsd2usi<round_saeonly_name>,
3332         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3333         Use %q1 instead of %1 for -masm=intel.
3334         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3335         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3336         of %3 for -masm=intel.
3337         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3338         -masm=intel.
3339         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3340         -masm=intel.
3341         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3342         -masm=intel.
3343         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3344         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3345         %g1.
3346         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3347         -masm=intel.
3348         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3349         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3350         %g1 and one with %0 and %1.
3351         (avx512er_vmrcp28<mode><round_saeonly_name>,
3352         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3353         %1 for -masm=intel.
3354         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3355         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3356         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3357         of %0 and %{%4%} for -masm=intel.
3358         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3359         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3360         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3361         order of %0 and %{%5%}%{z%} for -masm=intel.
3363 2018-04-17  Jan Hubicka  <jh@suse.cz>
3365         PR lto/85405
3366         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3368 2018-04-17  Martin Liska  <mliska@suse.cz>
3370         PR ipa/85329
3371         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3372         for target_clone error message.  Make default implementation
3373         clone to be a local declaration.
3374         (separate_attrs): Add new argument and check for an empty
3375         string.
3376         (expand_target_clones): Handle it.
3377         (ipa_target_clone): Make redirection just for target_clones
3378         functions.
3380 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3381             Tom de Vries  <tom@codesourcery.com>
3383         PR middle-end/84955
3384         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3385         tiled basic blocks without omp continue statements.
3387 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3389         PR target/83660
3390         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3391         vec_extract expression as having side effects to make sure it gets
3392         a cleanup point.
3394 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3396         PR target/85403
3397         * config/i386/i386.c (get_builtin_code_for_version): Check
3398         error_mark_node.
3400 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3402         PR target/84331
3403         * gcc/config.gcc: Support "skylake".
3404         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3405         PROCESSOR_SKYLAKE.
3406         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3407         (processor_target_table): Add "skylake".
3408         (ix86_option_override_internal): Add "skylake".
3409         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3410         PROCESSOR_CANNONLAKE.
3411         (get_builtin_code_for_version): Fix priority for
3412         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3413         PROCESSOR_SKYLAKE-AVX512.
3414         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3415         (processor_type): Add PROCESSOR_SKYLAKE.
3417 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3418             Jason Merrill  <jason@redhat.com>
3420         PR c++/85112
3421         * convert.c (convert_to_integer_1): Use direct recursion for
3422         enumeral types and types with a precision less than the number
3423         of bits in their mode.
3425 2018-04-16  Julia Koval  <julia.koval@intel.com>
3427         PR target/84413
3428         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3429         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3431 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3433         PR target/85293
3434         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3435         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3436         and -mno-direct-move.
3438 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3440         PR target/83402
3441         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3442         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3443         Ensure negative shifts result in {0}.
3445 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3447         PR rtl-optimization/79916
3448         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3449         regs (if any) to define how to gnerate SD moves when LRA is in
3450         progress.
3452 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3454         PR rtl-optimization/85393
3455         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3456         * except.c (expand_dw2_landing_pad_for_region): Make static.
3457         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3458         a label and unconditional jump to old_bb, rather than
3459         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3460         basic block.
3462         PR rtl-optimization/85376
3463         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3464         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3465         instead of a specific value.
3467 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3468             Bin Cheng  <bin.cheng@arm.com>
3470         PR tree-optimization/82965
3471         PR tree-optimization/83991
3472         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3473         by_profile_only parameter.
3474         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3475         information if the loop was predicted to iterate too many times.
3476         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3478 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3480         PR lto/71991
3481         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3482         always inline.
3484 2018-04-13  Martin Liska  <mliska@suse.cz>
3485             Jakub Jelinek  <jakub@redhat.com>
3487         PR middle-end/81657
3488         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3489         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3490         * builtins.c (expand_builtin_memory_copy_args): Use
3491         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3492         handle dest_addr == pc_rtx.
3494 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3496         PR target/85291
3497         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3498         asked to not generate direct moves.
3499         (fix_trunc<mode>si2_stfiwx): Similar.
3500         (fix_trunc<mode>si2_internal): Similar.
3502 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3504         PR debug/83157
3505         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3506         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3507         lookup if dest in some wider mode is known to be const0_rtx and
3508         if so, record permanent equivalence for it to be ZERO_EXTEND of
3509         the narrower mode destination.
3511 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3513         * lto-streamer-out.c (output_function): Revert 259346.
3514         * omp-expand.c (expand_oacc_for): Likewise.
3516 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
3518         PR rtl-optimization/85354
3519         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3520         * sel-sched.c (sel_global_init): ... here.
3522 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
3524         PR target/85238
3525         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3526         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3527         mode for PE-COFF targets.
3528         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
3529         (i386_pe_asm_lto_end): Likewise.
3530         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
3531         (TARGET_ASM_LTO_END): Likewise.
3532         * config/i386/winnt.c (saved_debug_info_level): New static variable.
3533         (i386_pe_asm_lto_start): New function.
3534         (i386_pe_asm_lto_end): Likewise.
3536 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3537             Richard Biener  <rguenther@suse.de>
3539         PR middle-end/84955
3540         * lto-streamer-out.c (output_function): Fix CFG loop state before
3541         streaming out.
3542         * omp-expand.c (expand_oacc_for): Handle calls to internal
3543         functions like regular functions.
3545 2018-04-12  Richard Biener  <rguenther@suse.de>
3547         PR lto/85371
3548         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
3549         for the early LTO debug to properly generate references to it
3550         during DIE emission.  Do not re-use that for the skeleton for
3551         split-dwarf.
3552         (dwarf2out_early_finish): Likewise.
3554 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3556         PR target/85328
3557         * config/i386/sse.md
3558         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
3559         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
3560         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
3561         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
3562         and output is a reg, avoid creating invalid lowpart subreg, but
3563         instead split into a 512-bit move.  Don't split if not AVX512VL,
3564         input is xmm16+ reg and output is a mem.
3565         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
3566         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
3567         xmm16+ reg and output is a mem.
3569 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3571         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
3572         also for flag_dwarf2_cfi_asm.
3574 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3576         PR rtl-optimization/85342
3577         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
3578         a bool scalar var inside of the loop instead.  Don't try to update
3579         recog_data.operand after failed apply_change_group.
3581 2018-04-12  Tom de Vries  <tom@codesourcery.com>
3583         PR target/85296
3584         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
3585         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
3586         array with flexible array member as array without given dimension.
3587         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
3588         argument for undefined param to true.
3590 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
3592         PR target/85321
3593         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3594         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
3595         from PowerPC section.
3596         * config/rs6000/sysv4.opt (mcall-): Improve help text.
3597         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
3598         help text that is too long.
3599         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
3600         help text that is too long.
3601         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
3602         help text that is too long.
3604 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
3606         * config/alpha/alpha.md (stack_probe_internal): Rename
3607         from "probe_stack".  Update all callers.
3609 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3611         PR rtl-optimization/84566
3612         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
3613         sched_macro_fuse_insns.
3615 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3617         PR target/84301
3618         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
3619         (compute_block_dependences): ... from here.
3621 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3623         PR tree-optimization/85331
3624         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
3625         from int to HOST_WIDE_INT.
3627 2018-04-11  Martin Jambor  <mjambor@suse.cz>
3629         PR ipa/84149
3630         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
3631         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
3632         not the same as the source val.
3633         (cgraph_edge_brings_value_p): New parameter.
3634         (gather_edges_for_value): Pass destination value to
3635         cgraph_edge_brings_value_p.
3636         (perhaps_add_new_callers): Likewise.
3637         (get_info_about_necessary_edges): Likewise and exclude values brought
3638         only by self-recursive edges.
3639         (create_specialized_node): Redirect only clones of self-calling edges.
3640         (+self_recursive_pass_through_p): New function.
3641         (find_more_scalar_values_for_callers_subset): Use it.
3642         (find_aggregate_values_for_callers_subset): Likewise.
3643         (known_aggs_to_agg_replacement_list): Removed.
3644         (decide_whether_version_node): Re-calculate known constants for all
3645         remaining context clones.
3647 2018-04-11  Richard Biener  <rguenther@suse.de>
3649         PR lto/85339
3650         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
3651         from early DWARF output.
3652         (dwarf2out_early_finish): Output line info unconditionally into
3653         early DWARF and add reference to it.
3655 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3657         PR target/85281
3658         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
3659         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
3660         other than V2DFmode using iptr mode attribute.
3661         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
3663 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
3665         PR rtl-optimization/84659
3666         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
3668 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
3670         PR debug/85302
3671         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
3672         SIZEP is NULL.
3673         (output_loc_list): Pass address of a dummy size variable even in the
3674         locview handling loop.
3675         (index_location_lists): Add comment on why skip_loc_list_entry can't
3676         call size_of_locs.
3678 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3680         PR target/85261
3681         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
3682         into register.
3684 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
3686         PR target/85321
3687         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
3688         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
3689         and -mstring-compare-inline-limit.
3691 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3693         PR target/85287
3694         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
3695         for stack clash protection in a register whenever we need it to be in
3696         a register.
3698 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3700         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
3701         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
3703 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
3705         PR target/85321
3706         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
3707         the help text.
3708         (mlong-double-): Ditto.
3709         * config/rs6000/sysv4.opt (msdata=): Ditto.
3710         (mtls-size=): Ditto.
3712 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3714         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3715         erroneous entries for
3716         "vector int vec_ldl (int, long int *)", and
3717         "vector unsigned int vec_ldl (int, unsigned long int *)".
3718         Add comments and entries for
3719         "vector bool char vec_ldl (int, bool char *)",
3720         "vector bool short vec_ldl (int, bool short *)",
3721         "vector bool int vec_ldl (int, bool int *)",
3722         "vector bool long long vec_ldl (int, bool long long *)",
3723         "vector pixel vec_ldl (int, pixel *)",
3724         "vector long long vec_ldl (int, long long *)",
3725         "vector unsigned long long vec_ldl (int, unsigned long long *)".
3726         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
3727         type tree bool_long_long_type_node and correct definition of
3728         bool_V2DI_type_node to make reference to this new type tree.
3729         (rs6000_mangle_type): Replace erroneous reference to
3730         bool_long_type_node with bool_long_long_type_node.
3731         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
3732         comments to emphasize sign distinctions for char and int types and
3733         replace RS6000_BTI_bool_long constant with
3734         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
3735         use of RS6000_BTI_pixel.
3736         (bool_long_type_node): Remove this macro definition.
3737         (bool_long_long_type_node): New macro definition
3739 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3741         PR rtl-optimization/85300
3742         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
3743         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
3744         simplify_unary_operation fails.
3746 2018-04-10  Martin Liska  <mliska@suse.cz>
3748         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
3749         cgraph_edge and ipa_ref.
3751 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
3753         PR target/85177
3754         PR target/85255
3755         * config/i386/sse.md
3756         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
3757         computation of the VEC_MERGE selector from mask.
3758         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
3759         Fix decoding of the VEC_MERGE selector into mask.
3761 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3763         PR tree-optimization/85286
3764         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
3766 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
3768         * final.c (final_1): Set insn_last_address as well as
3769         insn_current_address.
3771 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3773         PR target/85173
3774         * explow.c (emit_stack_probe): Call validize_mem on memory location
3775         before passing it to gen_probe_stack.  Create address operand and
3776         legitimize it for the probe_stack_address case.
3778 2018-04-09  Jan Hubicka  <jh@suse.cz>
3780         PR lto/85078
3781         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
3782         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
3783         * tree.c (free_lang_data_in_type): Fix handling of binfos;
3784         walk basetypes.
3785         (free_lang_data): Rebuild type inheritance graph.
3787 2018-04-09  Martin Sebor  <msebor@redhat.com>
3789         * invoke.texi (-finline-small-functions): Mention other optimization
3790         options.
3791         (-findirect-inlining, -fpartial-inlining): Same.
3792         (-finline-functions-called-once): Same.
3793         (-freorder-blocks-and-partition): Same.
3795 2018-04-09  Jan Hubicka  <jh@suse.cz>
3797         PR rtl/84058
3798         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
3799         jumps; choose last target that matches the criteria (i.e.
3800         no partition changes for non-crossing jumps).
3801         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
3802         support for redirecting crossing jumps to non-crossing.
3804 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
3806         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
3807         also for naked functions.
3809 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
3811         * config/arc/arc.md (add_shift): New pattern.
3812         (add_shift2): Likewise.
3813         (sub_shift): Likewise.
3814         (sub_shift_cmp0_noout): Likewise.
3815         (compare_si_ashiftsi): Likewise.
3816         (xbfu_cmp0_noout): New combine pattern.
3817         (xbfu_cmp0"): Likewise.
3818         (movsi_set_cc_insn): Place the predicable variant first.
3819         (commutative_binary_cmp0_noout): Remove clobber.
3820         (commutative_binary_cmp0): New pattern.
3821         (noncommutative_binary_cmp0): Likewise.
3822         (noncommutative_binary_cmp0_noout): Likewise.
3823         (noncommutative_binary_comparison_result_used): Removed.
3824         (rsub_cmp0): New pattern.
3825         (rsub_cmp0_noout): Likewise.
3826         (extzvsi): Changed, keep only meaningful variants.
3827         (SQH, SEZ): New iterators.
3828         (SQH_postfix): New mode attribute.
3829         (SEZ_prefix): New code attribute.
3830         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
3831         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
3832         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
3833         of numerical value.
3834         (noncommutative_operator): Check the availability of barrel
3835         shifter option.
3837 2018-04-09  Richard Biener  <rguenther@suse.de>
3839         PR tree-optimization/85284
3840         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
3841         Only use the niter constraining form of simple_iv when the exit
3842         is always executed.
3844 2018-04-09  Tom de Vries  <tom@codesourcery.com>
3846         PR target/84041
3847         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
3848         (define_expand "*memory_barrier"): New define_expand.
3849         (define_insn "memory_barrier"): New insn.
3851 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3853         PR rtl-optimization/80463
3854         PR rtl-optimization/83972
3855         PR rtl-optimization/83480
3857         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
3858         correct producer for the insn.
3859         (tidy_control_flow): Fixup seqnos in case of debug insns.
3861 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3863         PR rtl-optimization/83913
3865         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
3866         different sched-times when merging exprs.
3868 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3870         PR rtl-optimization/83962
3872         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
3873         tidy_fallthru_edge and tidy_control_flow.
3875 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
3877         PR rtl-optimization/83530
3879         * sel-sched.c (force_next_insn): New global variable.
3880         (remove_insn_for_debug): When force_next_insn is true, also leave only
3881         next insn in the ready list.
3882         (sel_sched_region): When the region wasn't scheduled, make another pass
3883         over it with force_next_insn set to 1.
3885 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
3887         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
3888         into tm_file.
3889         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3890         for interrupt control.
3891         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3892         functions for interrupt control.
3893         * config/nds32/nds32-intrinsic.md: Likewise.
3894         * config/nds32/nds32_intrinsic.h: Likewise.
3895         * config/nds32/nds32.h (nds32_builtins): Likewise.
3897 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
3899         * config/nds32/nds32.c (nds32_init_machine_status,
3900         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
3901         strict_aligned_p field.
3902         (nds32_expand_to_rtl_hook): New function.
3903         (TARGET_EXPAND_TO_RTL_HOOK): Define.
3904         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
3906 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3907             Chung-Ju Wu  <jasonwucj@gmail.com>
3909         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
3910         * config/nds32/nds32-n7.md: New file.
3911         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
3912         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
3913         pipeline.
3914         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
3915         * config/nds32/nds32.md (pipeline_model): Add n7.
3916         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
3917         * config/nds32/pipelines.md: Include n7 settings.
3919 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3920             Chung-Ju Wu  <jasonwucj@gmail.com>
3922         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
3923         * config/nds32/nds32-e8.md: New file.
3924         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
3925         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
3926         pipeline.
3927         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
3928         * config/nds32/nds32.md (pipeline_model): Add e8.
3929         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
3930         * config/nds32/pipelines.md: Include e8 settings.
3932 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3933             Chung-Ju Wu  <jasonwucj@gmail.com>
3935         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
3936         * config/nds32/nds32-n8.md: New file.
3937         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
3938         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
3939         pipeline.
3940         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
3941         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
3942         * config/nds32/nds32.md (pipeline_model): Add n8.
3943         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
3944         * config/nds32/pipelines.md: Include n8 settings.
3946 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
3947             Chung-Ju Wu  <jasonwucj@gmail.com>
3949         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
3950         * config/nds32/nds32-n9-2r1w.md: New file.
3951         * config/nds32/nds32-n9-3r2w.md: New file.
3952         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
3953         nds32_register_ports): New or modify for cpu n9.
3954         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
3955         pipeline.
3956         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
3957         * config/nds32/nds32-utils.c: New file.
3958         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
3959         TARGET_MUL_SLOW): Define.
3960         * config/nds32/nds32.md (pipeline_model): New attribute.
3961         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
3962         New options that support cpu n9.
3963         * config/nds32/pipelines.md: Include n9 settings.
3964         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
3966 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
3968         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
3969         information if necessary.
3970         (output_cond_branch_compare_zero): Likewise.
3971         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
3972         (nds32_target_alignment): Refine for alignment.
3973         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
3974         (FUNCTION_BOUNDARY): Modify.
3975         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
3976         align case.
3977         * config/nds32/nds32.opt (malways-align, malign-functions): New.
3979 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
3981         * config/nds32/constants.md (unspec_volatile_element): Add values for
3982         TLB operation and data prefetch.
3983         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3984         functions for TLB operation and data prefetch.
3985         * config/nds32/nds32-intrinsic.md: Likewise.
3986         * config/nds32/nds32_intrinsic.h: Likewise.
3987         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
3988         (nds32_print_operand): Likewise.
3989         * config/nds32/nds32.h (nds32_builtins): Likewise.
3991 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
3992         Andrew Pinski <pinsika@gcc.gnu.org>
3994         PR middle-end/82976
3995         * match.pd: Use constant_boolean_node of correct type instead of
3996         boolean_true_node or boolean_false_node for simplifying
3997         pointer comparisons to zero.
3999 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4001         PR tree-optimization/80021
4002         * tree.c (verify_type_variant): Make error call in verify_variant_match
4003         translatable and remove final full stop.
4005 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4007         * config/nds32/constants.md (unspec_volatile_element): Add
4008         UNSPEC_VOLATILE_EH_RETURN.
4009         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4010         nds32_output_stack_pop): Support dwarf exception handling process.
4011         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4012         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4013         exception handling process.
4014         (nds32_compute_stack_frame): Likewise.
4015         (nds32_return_addr_rtx): Likewise.
4016         (nds32_initial_elimination_offset): Likewise.
4017         (nds32_expand_prologue): Likewise.
4018         (nds32_expand_epilogue): Likewise.
4019         (nds32_dynamic_chain_address): New function.
4020         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4021         exception handling.
4022         (DYNAMIC_CHAIN_ADDRESS): Define.
4023         (EH_RETURN_DATA_REGNO): Define.
4024         (EH_RETURN_STACKADJ_RTX): Define.
4025         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4026         patterns for dwarf exception handling.
4028 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4030         * config/nds32/nds32.h: Clean up obsolete macros.
4032 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4034         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4035         Add enum values for particular instructions.
4036         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4037         particular intrinsic functions.
4038         * config/nds32/nds32-intrinsic.md: Likewise.
4039         * config/nds32/nds32_intrinsic.h: Likewise.
4040         * config/nds32/nds32.h (nds32_builtins): Likewise.
4041         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4042         (btst, ave): New patterns for particular instructions.
4044 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4046         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4047         Add enum values for atomic load/store and memory sync.
4048         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4049         and memory sync.
4050         * config/nds32/nds32-intrinsic.md: Likewise.
4051         * config/nds32/nds32_intrinsic.h: Likewise.
4052         * config/nds32/nds32.h (nds32_builtins): Likewise.
4054 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4056         PR tree-optimization/85257
4057         * fold-const.c (native_encode_vector): If not all elts could fit
4058         and off is -1, return 0 rather than offset.
4059         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4060         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4061         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4062         adjust buffer in native_interpret_expr call.
4064 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4066         * config/nds32/constants.md (unspec_volatile_element): Add cache
4067         control enum values.
4068         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4069         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4070         * config/nds32/nds32.c (nds32_cctl_names): New.
4071         (nds32_print_operand): Handle cache control register names.
4072         * config/nds32/nds32.h (nds32_builtins): New enum values.
4073         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4074         macros.
4075         * config/nds32/nds32.md (type): Add mmu.
4076         * config/nds32/pipelines.md (simple_insn): Add mmu.
4078 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4080         * config/nds32/nds32.md (type): Remove call.
4081         * config/nds32/pipelines.md (simple_insn): Likewise.
4083 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4085         * config/nds32/constants.md (unspec_volatile_element): Add
4086         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4087         UNSPEC_VOLATILE_FMFCFG.
4088         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4089         description for fmfcfg and fmfcsr.
4090         (bdesc_1arg): Add fmtcsr.
4091         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4092         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4093         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4094         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4095         unspec_fmfcfg): New patterns.
4096         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4097         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4098         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4099         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4100         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4101         __nds32__fmfcfg): Define.
4103 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4105         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4106         intrinsic register names.
4107         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4108         intrinsic register enum values and macros.
4110 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4112         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4113         for load/store addressing form.
4114         (nds32_print_operand_address): Likewise.
4116 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4118         PR target/85196
4119         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4120         based on LABEL_REF.  Remove useless assertion.
4121         (pic_address_needs_scratch): Fix formatting.
4122         (sparc_legitimize_pic_address): Minor tweaks.
4123         (sparc_delegitimize_address): Adjust assertion accordingly.
4124         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4125         into symbolic_operand.
4126         (movsi_high_pic_label_ref): Likewise.
4127         (movsi_lo_sum_pic_label_ref): Likewise.
4128         (movdi_pic_label_ref): Likewise.
4129         (movdi_high_pic_label_ref): Likewise.
4130         (movdi_lo_sum_pic_label_ref): Likewise.
4132 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4134         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4135         custom LIB_SPEC setup.
4137 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4138             Kito Cheng  <kito.cheng@gmail.com>
4140         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4141         * config/riscv/freebsd.h: New.
4143 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4145         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4146         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4147         file.
4149 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4150             Kito Cheng  <kito.cheng@gmail.com>
4152         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4153         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4154         * config/nds32/nds32-protos.h (nds32_output_call,
4155         nds32_output_return): Declare.
4156         * config/nds32/nds32.md: Refine all the call and return patterns.
4158 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4160         PR debug/85252
4161         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4162         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4164         PR rtl-optimization/84872
4165         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4166         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4167         EDGE_CROSSING edge.
4169 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4171         * expr.c (copy_blkmode_to_reg): Revert 254862.
4172         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4174 2018-04-06  Richard Biener  <rguenther@suse.de>
4176         PR middle-end/85244
4177         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4178         after seeing a component reference with an adjacent field.  Treat
4179         refs to arrays at struct end of external decls similar to
4180         refs to unconstrained commons.
4182 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4184         PR sanitizer/85213
4185         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4186         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4187         recursive calls.
4188         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4189         save_p here.
4191 2018-04-06  Richard Biener  <rguenther@suse.de>
4193         PR middle-end/85180
4194         * alias.c (find_base_term): New wrapper around find_base_term
4195         unwinding CSELIB_VAL_PTR changes.
4196         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4197         recursion.
4199 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4201         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4202         instructions.
4203         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4204         constant definitions.
4205         ("nop"): lr 0,0 -> nopr r0
4206         ("nop_lr0", "nop_lr1"): New insn definitions.
4208 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4210         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4211         NDS32_V3PUSH_AVAILABLE_P macro.
4213 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4214             Chung-Ju Wu  <jasonwucj@gmail.com>
4216         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4217         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4218         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4219         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4220         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4221         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4222         * config/nds32/constraints.md: New constraints and checking for hard
4223         float configuration.
4224         * config/nds32/iterators.md: New mode iterator and attribute for hard
4225         float configuration.
4226         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4227         patterns.
4228         * config/nds32/nds32-fpu.md: New file.
4229         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4230         deal with hard float code generation.
4231         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4232         ARCH_V3S.
4233         (abi_type, float_reg_number): New enum type.
4234         * config/nds32/nds32-predicates.c: New predicates for hard float.
4235         * config/nds32/nds32-protos.h: Declare functions for hard float.
4236         * config/nds32/nds32.c: Implementation for hard float configuration.
4237         * config/nds32/nds32.h: Definitions for hard float configuration.
4238         * config/nds32/nds32.md: Include hard float machine description and
4239         modify patterns for hard float configuration.
4240         * config/nds32/nds32.opt: New options for hard float configuration.
4241         * config/nds32/predicates.md: New predicates for hard float
4242         configuration.
4244 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4246         * common/config/nds32/nds32-common.c
4247         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4249 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4251         PR middle-end/85195
4252         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4253         CONSTRUCTOR_ELT (ctor, ...)->value.
4255 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4257         PR target/85193
4258         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4260 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4262         PR target/85204
4263         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4264         cond jump.
4266 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4267             Kito Cheng  <kito.cheng@gmail.com>
4269         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4270         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4271         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4272         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4274 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4275             Kito Cheng  <kito.cheng@gmail.com>
4277         * config/nds32/constraints.md (Ufe): New memory constraint.
4278         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4279         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4280         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4281         operands.
4282         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4283         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4285 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4287         * config/nds32/nds32.md: Use optimize_size in the condition for
4288         alu-shift instructions.
4290 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4292         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4294 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4296         * config/nds32/nds32.md (negsi2): Refine pattern.
4298 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4299             Chung-Ju Wu  <jasonwucj@gmail.com>
4301         * config/nds32/iterators.md (shift_rotate): New code iterator.
4302         (shift): New code attribute.
4303         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4304         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4305         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4306         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4307         bit-wise operations.
4308         (andsi3, *andsi3): Ditto.
4309         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4310         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4311         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4312         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4313         nds32_ior_operand, nds32_xor_operand): New predicates.
4315 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4317         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4318         (addsi3, subsi3): ... this.
4320 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4322         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4324 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4326         * config/nds32/nds32.md: Adjust indention.
4328 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4330         * config/nds32/nds32.md (feature): New attribute.
4332 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4334         * config/nds32/nds32.md (subtype): New attribute.
4336 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4338         PR target/85203
4339         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4340         expansion to perform a bitwise AND of the argument followed by a
4341         boolean negation of the result.
4343 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4345         PR rtl-optimization/84878
4346         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4347         the basic block.  Assert the use reference is not artificial and that
4348         it has an associated insn.
4350 2018-04-04  Michael Matz  <matz@suse.de>
4352         * builtins.c (compute_objsize): Pass correct operand
4353         to array_at_struct_end_p.
4355 2018-04-04  Richard Biener  <rguenther@suse.de>
4357         PR lto/85176
4358         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4359         from contexts for DINFO_LEVEL_TERSE and below.
4361 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4363         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4364         resiter_operand condition.
4365         * config/nds32/nds32.md (*move<mode>): Ditto.
4367 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4368             Monk Chiang  <sh.chiang04@gmail.com>
4370         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4372 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4374         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4376 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4377             Kito Cheng  <kito.cheng@gmail.com>
4379         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4380         nds32_cond_code_str, output_cond_branch,
4381         output_cond_branch_compare_zero, nds32_expand_cbranch,
4382         nds32_expand_cstore, nds32_expand_movcc,
4383         nds32_output_cbranchsi4_equality_zero,
4384         nds32_output_cbranchsi4_equality_reg,
4385         nds32_output_cbranchsi4_equality_reg_or_const_int,
4386         nds32_output_cbranchsi4_greater_less_zero: New functions.
4387         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4388         nds32_expand_cstore, nds32_expand_movcc,
4389         nds32_output_cbranchsi4_equality_zero,
4390         nds32_output_cbranchsi4_equality_reg,
4391         nds32_output_cbranchsi4_equality_reg_or_const_int,
4392         nds32_output_cbranchsi4_greater_less_zero): Declare.
4393         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4394         nds32_rimm11s_operand): New predicates.
4395         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4396         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4397         patterns.
4399 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4401         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4402         * config/nds32/nds32.md: Ditto.
4403         * config/nds32/pipelines.md: Ditto.
4405 2018-04-04  Richard Biener  <rguenther@suse.de>
4407         PR tree-optimization/85168
4408         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4409         propagating abnormals.
4411 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4413         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4415 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4416             Kito Cheng  <kito.cheng@gmail.com>
4418         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4419         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4420         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4421         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4422         * config/nds32/nds32.md (sibcall_internal): New.
4423         (sibcall_register): Remove.
4424         (sibcall_immediate): Remove.
4425         (sibcall_value_internal): New.
4426         (sibcall_value_register): Remove.
4427         (sibcall_value_immediate): Remove.
4428         * config/nds32/predicates.md (nds32_general_register_operand): New.
4429         (nds32_call_address_operand): New.
4431 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4433         PR rtl-optimization/85167
4434         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4435         bb_defs if *split_p, instead preinitialize it to NULL.
4437         PR tree-optimization/85156
4438         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4439         evaluating the argument multiple times.
4441 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4443         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4444         than vector.
4445         (_mm_cvtpd_ps): Likewise.
4446         (_mm_cvttpd_epi32): Likewise.
4447         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4448         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4449         vector, pixel, and bool following altivec.h include.
4451 2018-04-03  Martin Sebor  <msebor@redhat.com>
4453         * doc/extend.texi (Common Function Attributes): Clarify.
4454         (const attribute): Likewise.
4455         (pure attribute): Likewise.
4457 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4459         PR target/85169
4460         * config/i386/i386.c (ix86_expand_vector_set): Use
4461         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4463 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4465         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4466         instructions when changing rounding bits to preserve precision bits
4467         in the x87 control word.
4469 2018-04-03  Martin Liska  <mliska@suse.cz>
4471         PR tree-optimization/82491
4472         * rtl.h (strip_offset_and_add): Replace += suboffset with
4473         poly_uint64 () + suboffset.
4475 2018-03-29  Martin Liska  <mliska@suse.cz>
4476             Martin Jambor  <mjambor@suse.cz>
4478         PR ipa/84947
4479         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4480         param_type is not an integral or pointer type.
4482 2018-04-03  Richard Biener  <rguenther@suse.de>
4484         * sese.h (recompute_all_dominators): Remove.
4486 2018-04-02  Martin Sebor  <msebor@redhat.com>
4488         * doc/invoke.texi (-Wrestrict): Fix typos.
4490 2018-04-02  Jim Wilson  <jimw@sifive.com>
4492         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4493         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4494         (<optab>di3, <optab>si3_extend): Likewise.
4495         (<optab>si3_mask, <optab>si3_mask_1): New.
4496         (<optab>di3_mask, <optab>di3_mask_1): New.
4497         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4498         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4499         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4501 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4503         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4504         example.
4506 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4508         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4509         (nds32_canonicalize_comparison): New function.
4511 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4512             Kito Cheng  <kito.cheng@gmail.com>
4513             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4515         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4516         * config/nds32/constants.md (unspec_volatile_element): Add
4517         UNSPEC_VOLATILE_RELAX_GROUP.
4518         * config/nds32/nds32-relax-opt.c: New file.
4519         * config/nds32/nds32-predicates.c
4520         (nds32_symbol_load_store_p): New function.
4521         * config/nds32/nds32-protos.h
4522         (nds32_symbol_load_store_p): Declare function.
4523         (make_pass_nds32_relax_opt): Declare new rtl pass function.
4524         * config/nds32/nds32.c
4525         (nds32_register_pass): New function to register pass.
4526         (nds32_register_passes): New function to register passes.
4527         * config/nds32/nds32.md (relax_group): New pattern.
4528         * config/nds32/nds32.opt (mrelax-hint): New option.
4529         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
4531 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
4533         * config/nds32/t-nds32: Modify files dependency.
4535 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4537         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
4538         (PROFILE_HOOK): Define its implementation.
4540 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4542         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
4543         type and 32-bit size.
4545 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
4547         PR middle-end/85090
4548         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
4549         (V_128_256): New mode iterator.
4550         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
4551         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
4552         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
4553         of V.
4554         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
4555         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
4557 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
4559         PR target/83315
4560         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
4561         NaN inputs correctly.
4563 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
4565         PR target/80546
4566         * config/rs6000/vsx.md (??r): New mode attribute.
4567         (*vsx_mov<mode>_64bit): Use it.
4568         (*vsx_mov<mode>_32bit): Likewise.
4570 2018-03-30  Martin Sebor  <msebor@redhat.com>
4572         PR tree-optimization/84818
4573         * builtins.c (check_access): Use warning_n.
4575 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
4577         PR target/83822
4578         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
4579         condition.
4580         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
4581         condition.
4583 2018-03-30  Julia Koval  <julia.koval@intel.com>
4585         PR target/84413
4586         * x86-tune.def (movx, partial_reg_dependency): Enable for
4587         m_SKYLAKE_AVX512.
4589 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
4591         PR inline-asm/84985
4592         * lra-constraints.c (process_alt_operands): Move setting
4593         this_alternative_matches below.
4595 2018-03-29  Martin Liska  <mliska@suse.cz>
4597         PR lto/84995.
4598         * doc/invoke.texi: Document how LTO works with debug info.
4599         Describe auto-load support of binutils.  Mention 'x86-64'
4600         as valid option value of -march option.
4602 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
4604         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
4606         PR c/85094
4607         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
4608         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
4609         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
4610         checking.
4612 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4614         PR target/84912
4615         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
4616         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
4617         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
4618         for RS6000_BTM_POWERPC64.
4619         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
4620         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
4621         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
4622         definition.
4623         (DIVDE): Use it.
4624         (DIVDEU): Likewise.
4626 2018-03-28 Carl Love  <cel@us.ibm.com>
4628         Revert
4629         2017-09-27  Carl Love  <cel@us.ibm.com>
4631         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4632         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4633         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4634         fctiw instruction.
4636 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4638         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
4639         instead of __vector bool.
4640         (_mm_max_pu8): Likewise.
4641         (_mm_min_pi16): Likewise.
4643 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
4645         PR target/84912
4646         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
4647         (DIVWEUO): Likewise.
4648         (DIVDEO): Likewise.
4649         (DIVDEUO): Likewise.
4650         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
4651         DIVWEUO and DIVDEUO.
4652         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
4653         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
4654         (div_extend): Likewise.
4655         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
4656         builtin function.
4657         (__builtin_divweuo): Likewise.
4658         (__builtin_divdeo): Likewise.
4659         (__builtin_divdeuo): Likewise.
4661 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4663         PR target/85095
4664         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
4665         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
4667         PR tree-optimization/82004
4668         * gimple-match-head.c (optimize_pow_to_exp): New function.
4669         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
4670         Don't fold to exp if optimize_pow_to_exp is false.
4672 2018-03-28  Martin Liska  <mliska@suse.cz>
4674         PR other/84819
4675         * calls.c (initialize_argument_information): Fix trailing space.
4676         * common.opt: Fix typo and provide better explanation for
4677         -fsanitize-coverage option.
4678         * config/i386/i386.opt: Fix typo.
4680 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
4681             Martin Liska  <mliska@suse.cz>
4683         PR sanitizer/85081
4684         * gimplify.c (asan_poison_variable): Don't do the check for
4685         gimplify_omp_ctxp here.
4686         (gimplify_decl_expr): Do it here.
4687         (gimplify_target_expr): Likewise.
4689 2018-03-28  Martin Liska  <mliska@suse.cz>
4691         PR target/84988
4692         * config/i386/i386.c (ix86_function_arg_advance): Do not call
4693         chkp_type_bounds_count if MPX is not enabled.
4695 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
4697         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
4699 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4701         PR target/84914
4702         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
4703         function to create the function decl for complex long double
4704         multiply and divide for -mabi=ieeelongdouble.
4705         (init_float128_ieee): Call it.
4707 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
4709         PR target/85044
4710         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
4711         -fcf-protection=branch -mibt.
4712         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
4714 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4716         PR target/81863
4717         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
4719 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
4721         PR target/85056
4722         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
4723         extern array declarations.
4725 2018-03-27  Richard Biener  <rguenther@suse.de>
4727         PR middle-end/84067
4728         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
4729         explicit single_use checks.
4731 2018-03-27  Richard Biener  <rguenther@suse.de>
4733         PR tree-optimization/85082
4734         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
4735         Valueize the VUSE.
4737 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4739         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
4740         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
4741         Turn on fasynchronous-unwind-tables and funwind-tables.
4743 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
4745         PR target/85073
4746         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
4747         (*bmi_blsr_<mode>_ccz): Ditto.
4749 2018-03-26  Tom de Vries  <tom@codesourcery.com>
4751         PR tree-optimization/85063
4752         * omp-general.c (offloading_function_p): New function.  Factor out
4753         of ...
4754         * omp-offload.c (pass_omp_target_link::gate): ... here.
4755         * omp-general.h (offloading_function_p): Declare.
4756         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
4757         with attribute omp declare target for offloading functions.
4759 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
4761         PR tree-optimization/84005
4762         * tree-data-ref.h (get_base_for_alignment): Declare.
4763         * tree-data-ref.c (get_base_for_alignment_1): New function.
4764         (get_base_for_alignment): Likewise.
4765         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
4766         get_base_for_alignment to find a suitable base object, instead
4767         of always using drb->base_address.
4769 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
4771         PR inline-asm/85022
4772         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
4773         known size by default.
4775 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
4777         PR inline-asm/85030
4778         * lra-constraints.c (process_alt_operands): Don't match BLKmode
4779         and non BLKmode operands.
4781 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4783         PR target/85026
4784         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
4785         Clean up attributes.
4787 2018-03-23  Richard Biener  <rguenther@suse.de>
4789         PR debug/85020
4790         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
4791         we are going to emit early debug for LTO.
4793 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
4795         PR inline-asm/85034
4796         * function.c (match_asm_constraints_1): Don't optimize if input
4797         doesn't satisfy general_operand predicate for output's mode.
4799         PR inline-asm/85022
4800         * alias.c (write_dependence_p): Don't require for x_canonicalized
4801         non-VOIDmode if x has VOIDmode.
4803         PR sanitizer/85029
4804         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
4805         just don't try to optimize it rather than assert it never happens.
4807 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4809         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
4810         macro expansions for definition of ST_INTERNAL_<mode> and
4811         LD_INTERNAL_<mode> builtins.
4812         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
4813         Remove prototype.
4814         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
4815         function.
4816         (altivec_expand_st_builtin): Likewise.
4817         (altivec_expand_builtin): Remove calls to deleted functions.
4818         (rs6000_address_for_altivec): Delete this function.
4819         * config/rs6000/vector.md: Remove expands for
4820         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
4822 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
4824         PR target/84826
4825         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
4826         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
4827         re-computing once computed.
4828         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
4829         (arm_init_machine_status): Initialize
4830         machine->static_chain_stack_bytes.
4832 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4834         PR target/84760
4835         * doc/extend.texi: Add four new prototypes for vec_ld.
4836         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
4837         definitions for more logical presentation.
4838         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
4839         entries for V1TI variants of __builtin_altivec_ld builtin.
4840         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
4841         handling of V1TI variant of LVX icode pattern.
4842         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
4843         (rs6000_gimple_fold_builtin): Likewise.
4844         (altivec_init_builtins): Add code to define
4845         __builtin_altivec_lvx_v1ti function.
4847 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
4849         PR inline-asm/84941
4850         * function.c (match_asm_constraints_1): Don't do the optimization
4851         if input isn't a REG, SUBREG, MEM or constant.
4853 2018-03-22  Tom de Vries  <tom@codesourcery.com>
4855         PR tree-optimization/84956
4856         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
4857         bb_has_abnormal_pred.
4859 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
4861         PR sanitizer/85018
4862         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
4863         DECL_INITIAL (decl) to decl at the end.
4864         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
4865         adjust the comment.
4867 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
4869         * doc/extend.texi (__builtin_tgmath): Document when complex
4870         integer types are treated as _Complex _Float64.
4872 2018-03-21  Tom de Vries  <tom@codesourcery.com>
4874         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
4876 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4878         PR tree-optimization/84960
4879         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
4880         if it is ENTRY block, move them into single succ of ENTRY in that case.
4882 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
4884         PR tree-optimization/84811
4885         * poly-int.h (poly_span_traits): Remove the T3 parameter and
4886         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
4887         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
4888         (known_subrange_p): Update accordingly.  Cast each value involved
4889         in the size comparison, rather than casting the result of the
4890         subtraction.
4892 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4894         PR tree-optimization/84982
4895         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
4896         by flipping the least significant bit rather than all bits from
4897         bitpos to bitpos + bitsize - 1.
4899 2018-03-21  Nathan Sidwell  <nathan@acm.org>
4901         * doc/extend.texi (Deprecated Features): Remove mention of
4902         long-deleted deprecations.
4904 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4906         PR jit/84288
4907         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
4908         * configure: Regenerate.
4910 2018-03-21  Tom de Vries  <tom@codesourcery.com>
4912         PR tree-optimization/83126
4913         * tree-parloops.c (num_phis): New function.
4914         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
4916 2018-03-21  Nathan Sidwell  <nathan@acm.org>
4918         * doc/extend.texi (Deprecated Features): Update deprecated flags,
4919         mention anon-struct/union members and trailing attributes.
4921 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
4923         PR tree-optimization/84969
4924         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
4925         builtin memset partitions if they set different rhs values.
4927 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
4929         PR rtl-optimization/84989
4930         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
4931         VEC_DUPLICATE with scalar result mode.
4933 2018-03-21  Martin Liska  <mliska@suse.cz>
4935         PR ipa/84963
4936         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
4937         not intended return statement.
4939 2018-03-21  Martin Liska  <mliska@suse.cz>
4941         PR target/84988
4942         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
4943         (chkp_find_bound_slots_1): Limit number of iterations.
4945 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
4947         PR target/84838
4948         * Minor grammar fixes for x86 options.
4950 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
4952         PR debug/84875
4953         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
4954         holding REG_CFA_RESTORE notes, instead turn them into a USE.
4956 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
4958         PR target/83789
4959         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
4960         (altivec_lvx_<mode>_1op): Likewise.
4961         (altivec_stvx_<mode>_2op): Likewise.
4962         (altivec_stvx_<mode>_1op): Likewise.
4963         (altivec_lvx_<VM2:mode>): New define_expand.
4964         (altivec_stvx_<VM2:mode>): Likewise.
4965         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
4966         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4967         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
4968         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4969         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
4970         (rs6000_gen_lvx): Likewise.
4971         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
4972         (altivec_expand_stv_builtin): Likewise.
4973         (altivec_expand_builtin): Likewise.
4974         * config/rs6000/vector.md: Likewise.
4976 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4978         PR target/82518
4979         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
4980         BYTES_BIG_ENDIAN.
4982 2018-03-20  Richard Biener  <rguenther@suse.de>
4984         PR target/84986
4985         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
4986         sign-conversions as zero, fall back to standard scalar_stmt
4987         cost for the rest.
4989 2018-03-20  Martin Liska  <mliska@suse.cz>
4991         PR ipa/84825
4992         * predict.c (rebuild_frequencies): Handle case when we have
4993         PROFILE_ABSENT, but flag_guess_branch_prob is false.
4995 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
4997         PR target/84990
4998         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
4999         flag_section_anchors.
5000         * varasm.c (use_blocks_for_decl_p): Remove hack for
5001         dw2_force_const_mem.
5003         PR target/84845
5004         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5005         to ...
5006         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5007         be created, use lowpart_subreg of operands[0] rather than operands[0]
5008         itself.
5009         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5010         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5011         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5012         and n constraint instead of aarch64_shift_imm_di and Usd.
5013         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5014         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5016 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5018         PR target/82989
5019         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5020         to favor GPR over NEON registers.
5021         (<shift>di3_neon): Likewise.
5023 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5025         PR target/84952
5026         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5027         (nvptx_process_pars): Emit bar.sync asap and alap.
5029 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5031         PR target/84954
5032         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5033         seen_label if seen_label is already set.
5035 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5037         PR target/84945
5038         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5039         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5040         Use 1U instead of 1.  Formatting fixes.
5042         PR c/84953
5043         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5044         instead of TREE_TYPE (s1) for the return value.
5046 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5048         PR tree-optimization/84946
5049         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5050         bitsize + bitsize in poly_uint64 rather than poly_int64.
5052         PR sanitizer/78651
5053         * dwarf2asm.c: Include fold-const.c.
5054         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5055         of decl rather than decl itself.
5057         PR rtl-optimization/84643
5058         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5060 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5062         PR sanitizer/78651
5063         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5064         calling assemble_variable.
5066 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5068         PR target/81647
5069         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5070         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5072 2018-03-19  Jim Wilson  <jimw@sifive.com>
5074         PR bootstrap/84856
5075         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5076         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5077         (riscv_first_stack_step): Likewise.
5078         (riscv_option_override): Use STACK_BOUNDARY instead of
5079         MIN_STACK_BOUNDARY.
5080         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5081         MIN_STACK_BOUNDARY.
5082         (BIGGEST_ALIGNMENT): Set to 128.
5083         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5084         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5085         STACK_BOUNDARY.
5087 2018-03-19  Richard Biener  <rguenther@suse.de>
5089         PR tree-optimization/84933
5090         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5091         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5093 2018-03-19  Richard Biener  <rguenther@suse.de>
5095         PR tree-optimization/84859
5096         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5097         (cond_if_else_store_replacement): Perform sinking operation on
5098         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5099         Generalize what a BB with a single eligible store is.
5101 2018-03-19  Richard Biener  <rguenther@suse.de>
5103         PR tree-optimization/84929
5104         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5105         chrec_is_positive against non-chrec arg.
5107 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5109         PR target/84711
5110         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5112 2018-03-18  Martin Liska  <mliska@suse.cz>
5114         PR rtl-optimization/84635
5115         * regrename.c (build_def_use): Use matches_mode only when
5116         matches >= 0.
5118 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5120         PR tree-optimization/84913
5121         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5122         vectorize chains of COND_EXPRs.
5124 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5126         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5128 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5130         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5132 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5134         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5136 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5137             Kito Cheng  <kito.cheng@gmail.com>
5139         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5140         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5141         (nds32_adjust_reg_alloc_order): New function.
5142         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5144 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5146         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5147         nds32_print_operand, nds32_print_operand_address): Use
5148         HOST_WIDE_INT_PRINT_DEC instead.
5150 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5152         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5154 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5156         PR target/84902
5157         * config/i386/i386.c (initial_ix86_tune_features,
5158         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5159         unsigned long long.
5160         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5161         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5162         rather than 1u << ix86_tune.  Formatting fix.
5163         (ix86_option_override_internal): Change ix86_arch_mask from
5164         unsigned int to unsigned HOST_WIDE_INT, initialize to
5165         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5166         (ix86_function_specific_restore): Likewise.
5168 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5170         PR target/84899
5171         * postreload.c (reload_combine_recognize_pattern): Perform
5172         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5173         truncate_int_for_mode the result for the destination's mode.
5175         PR c/84909
5176         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5177         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5178         Likewise.
5179         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5180         Likewise.
5182 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5184         PR target/84876
5185         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5186         regno_allocno_class_array and sorted_pseudos.
5187         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5188         insns where regno is used.
5190 2018-03-16  Martin Liska  <mliska@suse.cz>
5192         PR ipa/84833
5193         * multiple_target.c (create_dispatcher_calls): Redirect
5194         reference in the symbol table.
5196 2018-03-16  Martin Liska  <mliska@suse.cz>
5198         PR ipa/84722
5199         * multiple_target.c (create_dispatcher_calls): Redirect also
5200         an alias.
5202 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5204         PR c++/79937
5205         PR c++/82410
5206         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5207         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5208         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5210 2018-03-16  Julia Koval  <julia.koval@intel.com>
5212         * doc/invoke.texi (Skylake Server): Add CLWB.
5213         Cannonlake): Remove CLWB.
5215 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5217         PR tree-optimization/84841
5218         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5219         1 << 3.
5220         (FLOAT_ONE_CONST_TYPE): Define.
5221         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5222         (sort_by_operand_rank): Put entries with higher constant_type last
5223         rather than first to match comments.
5225 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5227         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5228         split predicate.
5230 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5232         PR c++/79085
5233         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5234         check and use address of target always.
5236 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5238         PR target/84574
5239         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5240         (indirect_thunk_bnd_needed): Likewise.
5241         (indirect_thunks_used): Likewise.
5242         (indirect_thunks_bnd_used): Likewise.
5243         (indirect_return_needed): New.
5244         (indirect_return_bnd_needed): Likewise.
5245         (output_indirect_thunk_function): Add a bool argument for
5246         function return.
5247         (output_indirect_thunk_function): Don't generate alias for
5248         function return thunk.
5249         (ix86_code_end): Call output_indirect_thunk_function to generate
5250         function return thunks.
5251         (ix86_output_function_return): Set indirect_return_bnd_needed
5252         and indirect_return_needed instead of indirect_thunk_bnd_needed
5253         and indirect_thunk_needed.
5255 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5257         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5258         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5259         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5261 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5262             Paul Hua <paul.hua.gm@gmail.com>
5264         PR c/84852
5265         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5267 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5269         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5270         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5271         resp. SFmode cases.
5273 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5275         PR target/84711
5276         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5277         instead of GET_MODE_SIZE when comparing Units.
5279 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5281         PR target/68256
5282         * varasm.c (hash_section): Return an unchangeble hash value
5283         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5284         Return !aarch64_can_use_per_function_literal_pools_p ().
5286 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5288         PR target/84860
5289         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5290         rather than address of cmode as last argument to prepare_cmp_insn.
5292 2018-03-15  Julia Koval  <julia.koval@intel.com>
5294         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5295         F_AVX512VNNI, F_AVX512BITALG): New.
5297 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5299         PR target/83451
5300         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5301         insn for floating-point loads and stores.
5303 2018-03-14  Carl Love  <cel@us.ibm.com>
5305         * config/rs6000/rs6000-c.c: Add macro definitions for
5306         ALTIVEC_BUILTIN_VEC_PERMXOR.
5307         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5308         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5309         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5310         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5311         UNSPEC_VPERMXOR.
5312         * config/doc/extend.texi: Add prototypes for vec_permxor.
5314 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5316         PR c/84852
5317         * diagnostic-show-locus.c (class layout_point): Convert m_line
5318         from int to linenum_type.
5319         (line_span::comparator): Use linenum "compare" function when
5320         comparing line numbers.
5321         (test_line_span): New function.
5322         (layout_range::contains_point): Convert param "row" from int to
5323         linenum_type.
5324         (layout_range::intersects_line_p): Likewise.
5325         (layout::will_show_line_p): Likewise.
5326         (layout::print_source_line): Likewise.
5327         (layout::should_print_annotation_line_p): Likewise.
5328         (layout::print_annotation_line): Likewise.
5329         (layout::print_leading_fixits): Likewise.
5330         (layout::annotation_line_showed_range_p): Likewise.
5331         (struct line_corrections): Likewise for field m_row.
5332         (line_corrections::line_corrections): Likewise for param "row".
5333         (layout::print_trailing_fixits): Likewise.
5334         (layout::get_state_at_point): Likewise.
5335         (layout::get_x_bound_for_row): Likewise.
5336         (layout::print_line): Likewise.
5337         (diagnostic_show_locus): Likewise for locals "last_line" and
5338         "row".
5339         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5340         * input.c (selftest::test_linenum_comparisons): New function.
5341         (selftest::input_c_tests): Call it.
5342         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5343         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5344         * selftest.h (ASSERT_GT): New macro.
5345         (ASSERT_GT_AT): New macro.
5346         (ASSERT_LT): New macro.
5347         (ASSERT_LT_AT): New macro.
5349 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5351         PR rtl-optimization/84780
5352         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5354 2018-03-14  Martin Liska  <mliska@suse.cz>
5356         * tree.c (record_node_allocation_statistics): Use
5357         get_stats_node_kind.
5358         (get_stats_node_kind): New function extracted from
5359         record_node_allocation_statistics.
5360         (free_node): Use get_stats_node_kind.
5362 2018-03-14  Richard Biener  <rguenther@suse.de>
5364         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5365         that the value-set of ANTIC_IN doesn't grow.
5367         Revert
5368         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5369         member.
5370         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5371         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5373 2018-03-14  Julia Koval  <julia.koval@intel.com>
5375         * config.gcc (icelake-client, icelake-server): New.
5376         (icelake): Remove.
5377         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5378         (initial_ix86_arch_features): Ditto.
5379         (PTA_SKYLAKE): Add SGX.
5380         (PTA_ICELAKE): Remove.
5381         (PTA_ICELAKE_CLIENT): New.
5382         (PTA_ICELAKE_SERVER): New.
5383         (ix86_option_override_internal): Split up icelake on icelake client and
5384         icelake server.
5385         (get_builtin_code_for_version): Ditto.
5386         (fold_builtin_cpu): Ditto.
5387         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5388         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5389         * config/i386/i386.h (processor_type): Ditto.
5390         * doc/invoke.texi: Ditto.
5392 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5394         PR sanitizer/83392
5395         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5396         INTEGER_CST offset, add it together with bitpos / 8 and
5397         sign extend based on POINTER_SIZE.
5399         PR target/84844
5400         Revert
5401         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5403         PR target/78090
5404         * config/i386/constraints.md (Yc): New register constraint.
5405         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5406         Use Yc constraint for alternative 2 of operand 0.  Remove
5407         preferred_for_speed attribute.
5409 2018-03-14  Richard Biener  <rguenther@suse.de>
5411         PR tree-optimization/84830
5412         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5413         with the old one to avoid oscillations.
5415 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5417         PR target/83712
5418         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5419         pseudos.
5420         (assign_by_spills): Return a flag of reload assignment failure.
5421         Do not process the reload assignment failures.  Do not spill other
5422         reload pseudos if they has the same reg class.  Update n if
5423         necessary.
5424         (lra_assign): Add a return arg.  Set up from the result of
5425         assign_by_spills call.
5426         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5427         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5428         usage_insns if it is not NULL.
5429         (spill_hard_reg_in_range): New function.
5430         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5431         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5432         function prototypes.
5433         (lra_assign): Change prototype.
5434         * lra.c (lra): Add code to deal with fails by splitting hard reg
5435         live ranges.
5437 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5439         * config/riscv/riscv.opt (mrelax): New option.
5440         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5441         "norelax" when riscv_mrelax is disabled.
5442         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5444 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5446         PR target/84743
5447         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5448         reassociation for int modes.
5450 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5452         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5453         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5454         for big-endian.
5455         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5456         * config/aarch64/aarch64-sve.md
5457         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5458         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5459         (*extend<mode><Vwide>2): Rename to...
5460         (aarch64_sve_extend<mode><Vwide>2): ...this.
5461         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5462         renaming the old pattern to...
5463         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5464         unsigned packs.
5465         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5466         define_expand, renaming the old pattern to...
5467         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5468         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5469         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5470         account when deciding which SVE instruction the optab should use.
5471         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5473 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5475         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5476         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5477         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5478         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5479         (tlsdesc_small_<mode>): Turn a define_expand and use
5480         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5481         (tlsdesc_small_advsimd_<mode>): ...this.
5482         (tlsdesc_small_sve_<mode>): New pattern.
5484 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5486         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5487         (UNSPEC_UMUL_HIGHPART): New constants.
5488         (MUL_HIGHPART): New int iteraor.
5489         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5490         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5491         define_expand.
5492         (*<su>mul<mode>3_highpart): New define_insn.
5494 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5496         PR lto/84805
5497         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5498         incomplete types.
5500 2018-03-13  Martin Liska  <mliska@suse.cz>
5502         PR ipa/84658.
5503         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5504         vector.
5505         (sem_item_optimizer::~sem_item_optimizer): Release it.
5506         (sem_item_optimizer::merge_classes): Register variable aliases.
5507         (sem_item_optimizer::fixup_pt_set): New function.
5508         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5509         * ipa-icf.h: Declare new variables and functions.
5511 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5513         PR middle-end/84834
5514         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5515         integer_pow2p@2 and test integer_pow2p in condition.
5516         (A < 0 ? C : 0): Similarly for @1.
5518         PR middle-end/84831
5519         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5520         characters starting at p contain '\0' character, don't look beyond
5521         that.
5523         PR target/84827
5524         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5525         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
5527         PR target/84828
5528         * reg-stack.c (change_stack): Change update_end var from int to
5529         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
5530         also call set_block_for_insn on the newly added insns and rescan.
5532         PR target/84786
5533         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
5534         on the last operand.
5536         PR c++/84704
5537         * tree.c (stabilize_reference_1): Return save_expr (e) for
5538         STATEMENT_LIST even if it doesn't have side-effects.
5540 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
5542         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
5544 2018-03-12  Renlin Li  <renlin.li@arm.com>
5546         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
5547         aarch64_output_scalar_simd_mov_immediate.
5549 2018-03-12  Martin Sebor  <msebor@redhat.com>
5551         PR tree-optimization/83456
5552         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
5553         for perfectly overlapping calls to memcpy.
5554         (gimple_fold_builtin_memory_chk): Same.
5555         (gimple_fold_builtin_strcpy): Handle no-warning.
5556         (gimple_fold_builtin_stxcpy_chk): Same.
5557         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
5559 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5561         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
5562         parameter.  Use it for SFmode.
5563         (rs6000_function_arg_advance_1): Adjust.
5564         (rs6000_function_arg): Adjust.
5565         (rs6000_gimplify_va_arg): Pass false for that new parameter.
5567 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
5569         PR rtl-optimization/84169
5570         PR rtl-optimization/84780
5571         * combine.c (can_combine_p): Check for a 2-insn combination whether
5572         the destination register is used between the two insns, too.
5574 2018-03-12  Richard Biener  <rguenther@suse.de>
5576         PR tree-optimization/84803
5577         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
5578         for refs DR analysis didn't process.
5580 2018-03-12  Richard Biener  <rguenther@suse.de>
5582         PR tree-optimization/84777
5583         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
5584         force-vectorize loops ignore whether we are optimizing for size.
5586 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5588         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
5589         (TARGET_MD_ASM_ADJUST): Define.
5591 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
5592             Kito Cheng  <kito.cheng@gmail.com>
5593             Chung-Ju Wu  <jasonwucj@gmail.com>
5595         * config/nds32/nds32.c (nds32_compute_stack_frame,
5596         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
5597         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
5598         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
5599         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
5600         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
5601         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
5602         * config/nds32/nds32.md (prologue, epilogue): Use macro
5603         NDS32_V3PUSH_AVAILABLE_P to do checking.
5605 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
5607         PR debug/58150
5608         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
5609         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
5610         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
5611         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
5612         addition of most attributes on !orig_type_die or the attribute not
5613         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
5615 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5616             Chung-Ju Wu  <jasonwucj@gmail.com>
5618         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
5619         __NDS32_VH__ macro.
5620         * config/nds32/nds32.opt (mvh): New option.
5622 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5623             Chung-Ju Wu  <jasonwucj@gmail.com>
5625         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
5626         function.
5627         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
5628         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
5629         definition.
5631 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
5632             Chung-Ju Wu  <jasonwucj@gmail.com>
5634         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
5635         function.
5636         * config/nds32/nds32-multiple.md (strlensi): New pattern.
5637         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
5639 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
5640             Kito Cheng  <kito.cheng@gmail.com>
5641             Chung-Ju Wu  <jasonwucj@gmail.com>
5643         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
5644         UNSPEC_FFMISM and UNSPEC_FLMISM.
5645         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
5646         for ffb, ffmism and flmism.
5647         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
5648         (unspec_ffmism): Ditto.
5649         (unspec_flmism): Ditto.
5650         (nds32_expand_builtin_impl): Check if string extension is available.
5651         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
5652         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
5654 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
5656         Reverting patch:
5657         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5659         PR target/83712
5660         * lra-assigns.c (assign_by_spills): Return a flag of reload
5661         assignment failure.  Do not process the reload assignment
5662         failures.  Do not spill other reload pseudos if they has the same
5663         reg class.
5664         (lra_assign): Add a return arg.  Set up from the result of
5665         assign_by_spills call.
5666         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5667         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5668         usage_insns if it is not NULL.
5669         (spill_hard_reg_in_range): New function.
5670         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5671         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5672         function prototypes.
5673         (lra_assign): Change prototype.
5674         * lra.c (lra): Add code to deal with fails by splitting hard reg
5675         live ranges.
5677 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
5679         PR target/84807
5680         * config/i386/i386.opt: Replace Enforcment with Enforcement.
5682 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
5684         PR debug/84620
5685         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
5686         (dw_val_node): Add val_symbolic_view.
5687         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
5688         (symview_upper_bound): New.
5689         (new_line_info_table): Initialize symviews_since_reset.
5690         (dwarf2out_source_line): Count symviews_since_reset and set
5691         symview_upper_bound.
5692         (dw_val_equal_p): Handle symview.
5693         (add_AT_symview): New.
5694         (print_dw_val): Handle symview.
5695         (attr_checksum, attr_checksum_ordered): Likewise.
5696         (same_dw_val_p, size_of_die): Likewise.
5697         (value_format, output_die): Likewise.
5698         (add_high_low_attributes): Use add_AT_symview for entry_view.
5699         (dwarf2out_finish): Reset symview_upper_bound, clear
5700         zero_view_p.
5702 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
5704         PR target/83969
5705         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
5706         Add strict argument and use it.
5707         (rs6000_split_multireg_move): Update for new strict argument.
5708         (mem_operand_gpr): Disallow all non-offsettable addresses.
5709         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
5711 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
5713         PR target/84772
5714         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
5715         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
5716         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
5718         PR c++/84767
5719         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
5720         decl, use remap_type if we want to use the type.
5722 2018-03-09  Martin Sebor  <msebor@redhat.com>
5724         PR tree-optimization/84526
5725         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5726         Remove dead code.
5727         (builtin_access::generic_overlap): Be prepared to handle non-array
5728         base objects.
5730 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
5732         PR rtl-optimization/84682
5733         * lra-constraints.c (process_address_1): Check is_address flag
5734         for address constraints.
5735         (process_alt_operands): Likewise.
5736         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
5737         preprocess_constraints.
5738         * recog.h (preprocess_constraints): Add oploc parameter.
5739         Adjust callers.
5740         * recog.c (preprocess_constraints): Test address_operand for
5741         CT_ADDRESS constraints.
5743 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
5745         PR target/83712
5746         * lra-assigns.c (assign_by_spills): Return a flag of reload
5747         assignment failure.  Do not process the reload assignment
5748         failures.  Do not spill other reload pseudos if they has the same
5749         reg class.
5750         (lra_assign): Add a return arg.  Set up from the result of
5751         assign_by_spills call.
5752         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5753         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5754         usage_insns if it is not NULL.
5755         (spill_hard_reg_in_range): New function.
5756         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5757         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5758         function prototypes.
5759         (lra_assign): Change prototype.
5760         * lra.c (lra): Add code to deal with fails by splitting hard reg
5761         live ranges.
5763 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5765         PR target/83193
5766         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
5767         Accept complain bool parameter.  Only emit errors if it is true.
5768         (arm_parse_cpu_option_name): Likewise.
5769         (arm_target_thumb_only): Adjust callers of the above.
5770         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
5771         prototype to take a default true bool parameter.
5772         (arm_parse_arch_option_name): Likewise.
5774 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
5775             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
5777         PR jit/64089
5778         PR jit/84288
5779         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
5780         * configure: Regenerate.
5781         * configure.ac ("linker --version-script option"): New.
5782         ("linker soname option"): New.
5784 2018-03-09  Richard Biener  <rguenther@suse.de>
5786         PR tree-optimization/84775
5787         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
5788         immediate uses of predicate stmts and mark them modified.
5790         Revert
5791         PR tree-optimization/84178
5792         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5793         to caller.
5794         (version_loop_for_if_conversion): Delay update_ssa call.
5795         (tree_if_conversion): Delay update_ssa until after predicate
5796         insertion.
5798 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
5800         PR target/84763
5801         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
5802         when the function accesses prior frames.
5804 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
5806         PR debug/84456
5807         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
5808         gen_llsym, otherwise call maybe_gen_llsym.
5810         PR inline-asm/84742
5811         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
5812         has ',' character inside of it.
5814 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5816         PR target/84748
5817         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
5818         as clobbering CC_REGNUM.
5820 2018-03-08  Richard Biener  <rguenther@suse.de>
5822         PR middle-end/84552
5823         * tree-scalar-evolution.c: Include tree-into-ssa.h.
5824         (follow_copies_to_constant): Do not follow SSA names registered
5825         for update.
5827 2018-03-08  Richard Biener  <rguenther@suse.de>
5829         PR tree-optimization/84178
5830         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
5831         to caller.
5832         (version_loop_for_if_conversion): Delay update_ssa call.
5833         (tree_if_conversion): Delay update_ssa until after predicate
5834         insertion.
5836 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
5838         PR tree-optimization/84178
5839         * tree-if-conv.c (release_bb_predicate): Remove the
5840         the assertion that the stmts have NULL use_ops.
5841         Discard the statements, asserting that they haven't
5842         yet been added to a BB.
5844 2018-03-08  Richard Biener  <rguenther@suse.de>
5846         PR tree-optimization/84746
5847         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
5848         (phi_translate): Pass in destination ANTIC_OUT set.
5849         (phi_translate_1): Likewise.  For a simplified result lookup
5850         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
5851         (phi_translate_set): Adjust.
5852         (do_pre_regular_insertion): Likewise.
5853         (do_pre_partial_partial_insertion): Likewise.
5855 2018-03-08  Martin Liska  <mliska@suse.cz>
5857         PR gcov-profile/84735
5858         * doc/gcov.texi: Document usage of profile files.
5859         * gcov-io.h: Document changes in the format.
5861 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
5863         PR debug/84404
5864         PR debug/84408
5865         * dwarf2out.c (struct dw_line_info_table): Update comments for
5866         view == -1.
5867         (FORCE_RESET_NEXT_VIEW): New.
5868         (FORCE_RESETTING_VIEW_P): New.
5869         (RESETTING_VIEW_P): Check for -1 too.
5870         (ZERO_VIEW_P): Likewise.
5871         (new_line_info_table): Force-reset next view.
5872         (dwarf2out_begin_function): Likewise.
5873         (dwarf2out_source_line): Simplify zero_view_p initialization.
5874         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
5875         view directly.  Omit view when omitting .loc at line 0.
5877 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
5879         PR tree-optimization/84740
5880         * tree-switch-conversion.c (process_switch): Call build_constructors
5881         only if info.phi_count is non-zero.
5883         PR tree-optimization/84739
5884         * tree-tailcall.c (find_tail_calls): Check call arguments against
5885         DECL_ARGUMENTS (current_function_decl) rather than
5886         DECL_ARGUMENTS (func) when checking for tail recursion.
5888 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
5890         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
5891         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
5892         Volker Reichelt's entry and add entries for people that perform
5893         GCC fuzzy testing and report numerous bugs.
5895 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
5897         PR target/82411
5898         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
5899         readonly data in sdata, if that is disabled.
5900         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
5901         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
5902         -mreadonly-in-sdata option.
5904 2018-03-07  Martin Sebor  <msebor@redhat.com>
5906         PR tree-optimization/84468
5907         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
5908         basic block when looking for nul assignment.
5910 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
5912         PR target/84277
5913         * except.h (output_function_exception_table): Adjust prototype.
5914         * except.c (output_function_exception_table): Remove FNNAME parameter
5915         and add SECTION parameter.  Ouput one part of the table at a time.
5916         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
5917         the first part of the exception table and emit unwind directives.
5918         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
5919         (i386_pe_seh_cold_init): Likewise.
5920         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
5921         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
5922         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
5923         (ix86_output_call_insn): Emit a nop in one more case for SEH.
5924         * config/i386/winnt.c: Include except.h.
5925         (struct seh_frame_state): Add reg_offset, after_prologue and
5926         in_cold_section fields.
5927         (i386_pe_seh_end_prologue): Set seh->after_prologue.
5928         (i386_pe_seh_cold_init): New function.
5929         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
5930         to seh->in_cold_section.
5931         (seh_emit_push): Record the offset of the push.
5932         (seh_emit_save): Record the offet of the save.
5933         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
5934         Test seh->after_prologue to disregard the epilogue.
5935         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
5936         (i386_pe_end_cold_function): New function.
5938 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
5940         PR fortran/84565
5941         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
5942         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
5944         PR c++/84704
5945         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
5946         on tmp_var.
5947         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
5948         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
5950         PR middle-end/84723
5951         * multiple_target.c: Include tree-inline.h and intl.h.
5952         (expand_target_clones): Diagnose and fail if node->definition and
5953         !tree_versionable_function_p (node->decl).
5955 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
5957         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
5958         sprint_ul.
5959         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
5960         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
5961         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
5963 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
5965         PR target/84710
5966         * combine.c (try_combine): Use reg_or_subregno instead of handling
5967         just paradoxical SUBREGs and REGs.
5969 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
5971          * config/arc/arc.c (arc_finalize_pic): Remove function.
5972          (arc_must_save_register): We use single base PIC register, remove
5973          checks to save/restore the PIC register.
5974          (arc_expand_prologue): Likewise.
5975          * config/arc/arc-protos.h (arc_set_default_type_attributes):
5976          Remove.
5977          (arc_verify_short): Likewise.
5978          (arc_attr_type): Likewise.
5979          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
5980          (walk_stores): Likewise.
5981          (arc_address_cost): Make it static.
5982          (arc_verify_short): Likewise.
5983          (branch_dest): Likewise.
5984          (arc_attr_type): Likewise.
5985          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
5986          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
5987          (arc_final_prescan_insn): Remove inserting the nops due to
5988          hardware hazards.  It is done in reorg step.
5989          (insn_length_variant_t): Remove.
5990          (insn_length_parameters_t): Likewise.
5991          (arc_insn_length_parameters): Likewise.
5992          (arc_get_insn_variants): Likewise.
5993          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
5995 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
5997         PR inline-asm/84683
5998         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
5999         assertion failure.
6001         PR tree-optimization/84687
6002         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6003         on new_node->decl.
6004         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6006 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6008         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6009         Rename to ppc_speculation_barrier.
6010         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6011         __builtin_ppc_speculation_barrier.
6013 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6015         PR target/84700
6016         * combine.c (combine_simplify_rtx): Don't try to simplify if
6017         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6018         are equal to x.
6020 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6022         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6023         to 32 bytes when compiling for POWER9.
6025 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6027         PR target/84564
6028         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6029         regparm >= 3 with no arg reg available also for calls with
6030         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6032         PR target/84524
6033         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6034         orig,vex.
6035         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6037 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6039         PR target/84264
6040         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6042 2018-03-05  Richard Biener  <rguenther@suse.de>
6044         PR tree-optimization/84486
6045         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6046         When inserting a __builtin_assume_aligned call set the LHS
6047         SSA name alignment info accordingly.
6049 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6051         PR tree-optimization/84114
6052         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6053         Avoid reassociation of FLOAT_MODE addition.
6055 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6057         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6058         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6059         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6060         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6061         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6062         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6063         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6064         and -mwbnoinvd.
6065         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6066         __builtin_ia32_wbinvd): New builtins.
6067         (SPECIAL_ARGS2): New.
6068         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6069         (SPECIAL_ARGS2): New.
6070         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6071         (ix86_valid_target_attribute_inner_p): Ditto.
6072         (ix86_init_mmx_sse_builtins): Add special_args2.
6073         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6074         TARGET_WBNOINVD_P): New.
6075         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6076         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6077         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6078         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6079         * config/i386/pconfigintrin.h: New file.
6080         * config/i386/wbnoinvdintrin.h: Ditto.
6081         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6082         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6084 2018-03-05  Richard Biener  <rguenther@suse.de>
6086         PR tree-optimization/84670
6087         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6088         member.
6089         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6090         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6091         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6092         doesn't grow if all successors (recursively) were visited at least
6093         once.
6095 2018-03-05  Richard Biener  <rguenther@suse.de>
6097         PR tree-optimization/84650
6098         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6099         if executed in the loop pipeline.
6101 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6103         * doc/configfiles.texi (Configuration Files): Move info about
6104         conditionalizing $target-protos.h to...
6105         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6106         differs from $target-protos.h.
6108 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6109             Chung-Ju Wu  <jasonwucj@gmail.com>
6111         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6112         * config/nds32/nds32-multiple.md (setmemsi): Define.
6113         * config/nds32/nds32-memory-manipulation.c
6114         (nds32_gen_dup_4_byte_to_word_value): New.
6115         (emit_setmem_word_loop): New.
6116         (emit_setmem_byte_loop): New.
6117         (nds32_expand_setmem_loop): New.
6118         (nds32_expand_setmem_loop_v3m): New.
6119         (nds32_expand_setmem_unroll): New.
6120         (nds32_expand_setmem): New.
6122 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6123             Chung-Ju Wu  <jasonwucj@gmail.com>
6125         * config/nds32/nds32-memory-manipulation.c
6126         (nds32_emit_load_store): New.
6127         (nds32_emit_post_inc_load_store): New.
6128         (nds32_emit_mem_move): New.
6129         (nds32_emit_mem_move_block): New.
6130         (nds32_expand_movmemsi_loop_unknown_size): New.
6131         (nds32_expand_movmemsi_loop_known_size): New.
6132         (nds32_expand_movmemsi_loop): New.
6133         (nds32_expand_movmemsi_unroll): New.
6134         (nds32_expand_movmemqi): Rename ...
6135         (nds32_expand_movmemsi): ... to this.
6136         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6137         (movmemsi): ... to this.
6138         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6139         (nds32_expand_movmemsi): ... to this.
6141 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6142             Monk Chiang  <sh.chiang04@gmail.com>
6143             Chung-Ju Wu  <jasonwucj@gmail.com>
6145         * config/nds32/nds32-protos.h
6146         (nds32_expand_load_multiple): New arguments.
6147         (nds32_expand_store_multiple): Ditto.
6148         (nds32_valid_multiple_load_store): Rename ...
6149         (nds32_valid_multiple_load_store_p): ... to this.
6150         * config/nds32/nds32-memory-manipulation.c
6151         (nds32_expand_load_multiple): Refine implementation.
6152         (nds32_expand_store_multiple): Ditto.
6153         * config/nds32/nds32-multiple.md
6154         (load_multiple): Update nds32_expand_load_multiple interface.
6155         (store_multiple): Update nds32_expand_store_multiple interface.
6156         * config/nds32/nds32-predicates.c
6157         (nds32_valid_multiple_load_store): Rename ...
6158         (nds32_valid_multiple_load_store_p): ... to this and refine
6159         implementation.
6160         * config/nds32/predicates.md
6161         (nds32_load_multiple_and_update_address_operation): New predicate.
6162         (nds32_store_multiple_and_update_address_operation): New predicate.
6164 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6165             Chung-Ju Wu  <jasonwucj@gmail.com>
6167         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6168         (combo): New attribute.
6169         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6171 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6173         * config/nds32/nds32.opt: Change -mcmodel= default value.
6175 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6176             Monk Chiang  <sh.chiang04@gmail.com>
6177             Chung-Ju Wu  <jasonwucj@gmail.com>
6179         * config/nds32/constants.md (unspec_element): New enum.
6180         * config/nds32/constraints.md (Umw): New constraint.
6181         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6182         * config/nds32/nds32-intrinsic.md: Likewise.
6183         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6184         (nds32_valid_smw_lwm_base_p): New.
6185         (nds32_output_smw_single_word): New.
6186         (nds32_output_lmw_single_word): New.
6187         (nds32_expand_unaligned_load): New.
6188         (nds32_expand_unaligned_store): New.
6189         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6190         (nds32_output_smw_single_word): Declare.
6191         (nds32_output_lmw_single_word): Declare.
6192         (nds32_expand_unaligned_load): Declare.
6193         (nds32_expand_unaligned_store): Declare.
6194         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6195         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6196         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6197         NDS32_BUILTIN_UASTORE_DW.
6198         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6199         predicate.
6201 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6202             Kito Cheng  <kito.cheng@gmail.com>
6203             Chung-Ju Wu  <jasonwucj@gmail.com>
6205         * config/nds32/nds32-intrinsic.c
6206         (nds32_expand_builtin_null_ftype_reg): Delete.
6207         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6208         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6209         (nds32_read_argument): New.
6210         (nds32_legitimize_target): Ditto.
6211         (nds32_legitimize_argument): Ditto.
6212         (nds32_check_constant_argument): Ditto.
6213         (nds32_expand_unop_builtin): Ditto.
6214         (nds32_expand_unopimm_builtin): Ditto.
6215         (nds32_expand_binop_builtin): Ditto.
6216         (nds32_builtin_decl_impl): Ditto.
6217         (builtin_description): Ditto.
6218         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6219         (nds32_init_builtins_impl): Ditto.
6220         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6221         (nds32_builtin_decl): New.
6222         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6223         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6225 2018-03-02  Jeff Law  <law@redhat.com>
6227         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6228         (redundant_insn, fill_simple_delay_slots): Likewise.
6229         (fill_slots_from_thread): Likewise.
6230         * resource.c (mark_referenced_resources): Likewise.
6231         (mark_set_resources, find_dead_or_set_registers): Likewise.
6233 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6235         * substring-locations.h (format_warning_va): Formatting fix for
6236         ATTRIBUTE_GCC_DIAG.
6237         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6238         argument.
6239         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6240         * substring-locations.c: Include intl.h.
6241         (format_warning_va): Turned into small wrapper around
6242         format_warning_n_va, renamed to ...
6243         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6244         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6245         use ngettext.
6246         (format_warning_at_substring_n): New function.
6247         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6248         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6249         format_warning_at_substring with just a shorter name instead of
6250         const function pointer.
6251         (fmtwarn_n): New function.
6252         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6253         appropriate, get rid of all the fmtstr temporaries, move conditionals
6254         with G_() wrapped string literals directly into fmtwarn arguments,
6255         cast dir.len to (int), formatting fixes.
6257 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6259         * doc/invoke.texi: Remove "Cilk Plus" references.
6261 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6262             Richard Biener  <rguenther@suse.de>
6264         PR ipa/84628
6265         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6266         for error or warning attributes if CALL_FROM_THUNK_P is set.
6267         Formatting fixes.
6269 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6271         PR target/56540
6272         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6273         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6275         PR target/56540
6276         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6277         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6279         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6280         instead of -1U in last predictors element's probability member.
6282 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6284         PR ipa/83983
6285         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6286         arguments if they are comparable.
6288 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6290         PR tree-optimization/84634
6291         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6292         masks and masked_loop_p with a single loop_masks, making sure it's
6293         null for bb vectorization.
6295 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6297         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6298         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6299         loop->force_vectorize to check whether there is no alias.
6301 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6303         PR target/84614
6304         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6305         prototypes.
6306         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6307         comments.
6308         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6309         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6310         instead of a loop around prev_real_insn.
6311         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6312         prev_real_insn.
6314         PR inline-asm/84625
6315         * config/i386/i386.c (ix86_print_operand): Use conditional
6316         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6317         zero vector.
6319 2018-03-02  Richard Biener  <rguenther@suse.de>
6321         PR tree-optimization/84427
6322         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6323         (bitmap_set_subtract_values): Rewrite to handle multiple
6324         exprs per value.
6325         (clean): Likewise.
6326         (prune_clobbered_mems): Likewise.
6327         (phi_translate): Take edge instead of pred/phiblock.
6328         (phi_translate_1): Likewise.
6329         (phi_translate_set): Likewise.  Insert all translated
6330         exprs for a value into the set, keeping possibly multiple
6331         expressions per value.
6332         (compute_antic_aux): Adjust for phi_translate changes.
6333         When intersecting union the expressions and prune those
6334         not in the final value set, keeping possibly multiple
6335         expressions per value.  Do not use value-insertion
6336         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6337         all expressions.  Add verification that the value-sets
6338         only shrink during iteration.
6339         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6340         (do_pre_regular_insertion): Likewise.
6341         (do_pre_partial_partial_insertion): Likewise.
6343 2018-03-02  Richard Biener  <rguenther@suse.de>
6345         PR target/82005
6346         * config/darwin.c (saved_debug_info_level): New static global.
6347         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6348         (darwin_asm_lto_end): Restore debug info generation settings.
6350 2018-03-01  Martin Liska  <mliska@suse.cz>
6352         PR sanitizer/82484
6353         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6354         volatile arguments.
6356 2018-03-01  Richard Biener  <rguenther@suse.de>
6358         PR debug/84645
6359         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6360         type annotation with LTO when debug was disabled at compile-time.
6362 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6364         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6365         XINT with INTVAL.
6366         (mips_final_postscan_insn): Likewise.
6368 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6370         PR rtl-optimization/84528
6371         * alias.c (init_alias_target): Add commentary.
6372         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6373         a unique base value if the frame pointer is not eliminated
6374         to the stack pointer.
6376 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6378         PR rtl-optimization/83327
6379         * lra-int.h (hard_regs_spilled_into): Declare.
6380         * lra.c (hard_regs_spilled_into): Define.
6381         (init_reg_info): Init hard_regs_spilled_into.
6382         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6383         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6384         (process_bb_lives): Handle hard_regs_spilled_into.
6385         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6386         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6388 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6390         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6391         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6392         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6393         * config/rs6000/aix72.h: New file.
6395 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6397         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6398         instead of warning_at with conditional singular and plural messages
6399         where possible.
6401         PR target/52991
6402         * stor-layout.c (update_alignment_for_field): For
6403         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6404         && !DECL_PACKED (field), do the alignment update, just use
6405         only desired_align instead of MAX (type_align, desired_align)
6406         as the alignment.
6407         (place_field): Don't do known_align < desired_align handling
6408         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6409         is non-NULL, instead do it after rli->prev_field handling and
6410         only if not within a bitfield word.  For DECL_PACKED (field)
6411         use type_align of BITS_PER_UNIT.
6413 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6415         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6416         superfluous parentheses and trailing spaces.
6418 2018-02-28  Richard Biener  <rguenther@suse.de>
6420         PR tree-optimization/84584
6421         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6422         SCoPs with fake exit edge.
6424 2018-02-28  Martin Liska  <mliska@suse.cz>
6426         PR testsuite/84597
6427         * timevar.c (timer::print): Fix format to properly print 100%
6428         values.
6430 2018-02-28  Richard Biener  <rguenther@suse.de>
6432         PR middle-end/84607
6433         * genmatch.c (capture_info::walk_match): Do not mark
6434         captured expressions without operands as expr_p given
6435         they act more like predicates and should be subject to
6436         "lost tail" side-effect preserving.
6438 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6440         PR rtl-optimization/81611
6441         * auto-inc-dec.c (attempt_change): Move dead note from
6442         mem_insn if it's the next use of regno
6443         (find_address): Take address use of reg holding
6444         non-incremented value.  Add parm to limit search to the named
6445         reg only.
6446         (merge_in_block): Attempt to use a mem insn that is the next
6447         use of the original regno.
6449 2018-02-27  Martin Sebor  <msebor@redhat.com>
6451         PR c++/83871
6452         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6453         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6455 2018-02-27  Martin Sebor  <msebor@redhat.com>
6457         PR translation/84207
6458         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6459         n argument to unsigned HOST_WIDE_INT.
6460         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6461         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6462         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6463         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6465 2018-02-27  Richard Biener  <rguenther@suse.de>
6467         PR tree-optimization/84512
6468         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6469         Do not use the estimate returned from record_stmt_cost for
6470         the scalar iteration cost but sum properly using add_stmt_cost.
6472 2018-02-27  Richard Biener  <rguenther@suse.de>
6474         PR tree-optimization/84466
6475         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6476         Adjust last change to less strictly validate use operands.
6478 2018-02-27  Martin Liska  <mliska@suse.cz>
6480         PR gcov-profile/84548
6481         * gcov.c (process_file): Allow partial overlap and consider it
6482         also as group functions.
6483         (output_lines): Properly calculate range of lines for a group.
6485 2018-02-27  Martin Liska  <mliska@suse.cz>
6487         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6488         'ggc' suffixes.  Change first column width.
6489         (timer::print): Fix formatting of the column.
6491 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6493         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6494         preserve inline entry blocks for the sake of debug inline
6495         entry point markers alone.
6496         (remove_unused_locals): Suggest in comments a better place to
6497         force the preservation of inline entry blocks that are
6498         otherwise unused, but do not preserve them.
6500 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6502         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6504 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6506         PR target/84039
6507         * config/i386/constraints.md (Bs): Replace
6508         ix86_indirect_branch_register with
6509         TARGET_INDIRECT_BRANCH_REGISTER.
6510         (Bw): Likewise.
6511         * config/i386/i386.md (indirect_jump): Likewise.
6512         (tablejump): Likewise.
6513         (*sibcall_memory): Likewise.
6514         (*sibcall_value_memory): Likewise.
6515         Peepholes of indirect call and jump via memory: Likewise.
6516         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6517         (*sibcall_value_GOT_32): Likewise.
6518         * config/i386/predicates.md (indirect_branch_operand): Likewise.
6519         (GOT_memory_operand): Likewise.
6520         (call_insn_operand): Likewise.
6521         (sibcall_insn_operand): Likewise.
6522         (GOT32_symbol_operand): Likewise.
6523         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6525 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6527         PR rtl-optimization/83496
6528         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
6529         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
6530         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
6531         redundant insn, if any.
6532         (relax_delay_slots): Likewise.
6533         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
6535 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
6537         PR tree-optimization/83965
6538         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
6539         that grouped statements are part of a reduction chain.  Return
6540         true if the statement is not marked as a reduction itself but
6541         is part of a group.
6542         (vect_recog_dot_prod_pattern): Don't check whether the statement
6543         is part of a group here.
6544         (vect_recog_sad_pattern): Likewise.
6545         (vect_recog_widen_sum_pattern): Likewise.
6547 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
6549         PR debug/84545
6550         * final.c (rest_of_clean_state): Also look for calls inside sequences.
6552 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6554         PR target/84530
6555         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
6556         the bool argument.
6557         (ix86_output_indirect_function_return): New prototype.
6558         (ix86_split_simple_return_pop_internal): Likewise.
6559         * config/i386/i386.c (indirect_return_via_cx): New.
6560         (indirect_return_via_cx_bnd): Likewise.
6561         (indirect_thunk_name): Handle return va CX_REG.
6562         (output_indirect_thunk_function): Create alias for
6563         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
6564         (ix86_output_indirect_jmp): Remove the bool argument.
6565         (ix86_output_indirect_function_return): New function.
6566         (ix86_split_simple_return_pop_internal): Likewise.
6567         * config/i386/i386.md (*indirect_jump): Don't pass false
6568         to ix86_output_indirect_jmp.
6569         (*tablejump_1): Likewise.
6570         (simple_return_pop_internal): Change it to define_insn_and_split.
6571         Call ix86_split_simple_return_pop_internal to split it for
6572         -mfunction-return=.
6573         (simple_return_indirect_internal): Call
6574         ix86_output_indirect_function_return instead of
6575         ix86_output_indirect_jmp.
6577 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
6579         PR bootstrap/84405
6580         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
6581         memset and value initialization afterwards.
6583 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
6585         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
6587 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
6589         PR target/84521
6590         * common/config/aarch64/aarch64-common.c
6591         (aarch_option_optimization_table[]): Switch
6592         off fomit-frame-pointer
6594 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6595             Chung-Ju Wu  <jasonwucj@gmail.com>
6597         * config/nds32/nds32-multiple.md (load_multiple): Disallow
6598         volatile memory.
6599         (store_multiple): Ditto.
6601 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
6603         * config.gcc: Add --with-cpu support for nds32 target.
6604         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
6605         * config/nds32/nds32.opt: Add -mcpu= option.
6607 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
6609         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
6610         isel=yes): Warn for these deprecated options.
6612 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
6614         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
6615         ISA_2_5_MASKS_EMBEDDED.
6617 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
6619         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
6620         p->max as pointers rather than using iterative_hash_expr.
6622 2018-02-23  Carl Love  <cel@us.ibm.com>
6624         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
6625         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
6626         BU_P8V_OVERLOAD_2.
6627         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
6628         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
6629         P8V_BUILTIN_VEC_VUNSIGNED2.
6631 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
6633         PR target/81572
6634         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
6635         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
6636         LRA_UNKNOWN_ALT.
6637         * lra-constraints.c (curr_insn_transform): Set up
6638         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
6639         LRA_UNKNOWN_ALT.
6640         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
6641         * lra-eliminations.c (spill_pseudos): Ditto.
6642         (process_insn_for_elimination): Ditto.
6643         * lra-lives.c (reg_early_clobber_p): Use the new macros.
6644         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
6645         LRA_NON_CLOBBERED_ALT.
6647 2018-02-22  Martin Sebor  <msebor@redhat.com>
6649         PR tree-optimization/84480
6650         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
6651         to maybe_diag_stxncpy_trunc.  Call it.
6652         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
6653         from gimple_fold_builtin_strcpy.  Print inlining stack.
6654         (handle_builtin_stxncpy): Print inlining stack.
6655         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
6657 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
6659         PR target/84176
6660         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
6661         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
6662         and -fcheck-pointer-bounds are used together.
6663         (indirect_thunk_prefix): New enum.
6664         (indirect_thunk_need_prefix): New function.
6665         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
6666         "_nt" instead of "_bnd" for NOTRACK prefix.
6667         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
6668         (output_indirect_thunk_function): Likewise.
6669         (): Likewise.
6670         (ix86_code_end): Update output_indirect_thunk_function calls.
6671         (ix86_output_indirect_branch_via_reg): Replace
6672         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
6673         (ix86_output_indirect_branch_via_push): Likewise.
6674         (ix86_output_function_return): Likewise.
6675         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
6676         incompatible with -fcf-protection=branch and
6677         -fcheck-pointer-bounds.
6679 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6681         PR target/83335
6682         * config/aarch64/aarch64.c (aarch64_print_address_internal):
6683         Change gcc_assert call to output_operand_lossage.
6685 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
6687         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
6689 2018-02-22  DJ Delorie  <dj@redhat.com>
6690             Sebastian Perta  <sebastian.perta@renesas.com>
6691             Oleg Endo  <olegendo@gcc.gnu.org>
6693         * config/rx/rx.c (rx_rtx_costs): New function.
6694         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
6696 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6698         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
6700 2018-02-22  Martin Liska  <mliska@suse.cz>
6702         PR driver/83193
6703         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
6704         Add "native" as a possible value.
6706 2018-02-22  Martin Liska  <mliska@suse.cz>
6708         PR driver/83193
6709         * config/i386/i386.c (ix86_option_override_internal):
6710         Add "native" as a possible value for -march and -mtune.
6712 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
6714         PR target/84502
6715         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
6716         to all type variants.
6718         PR tree-optimization/84503
6719         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
6720         width as info->bitpos + info->bitsize - start.
6721         (merged_store_group::merge_overlapping): Simplify width computation.
6722         (check_no_overlap): New function.
6723         (imm_store_chain_info::try_coalesce_bswap): Compute expected
6724         start + width and last_order of the group, fail if check_no_overlap
6725         fails.
6726         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
6727         to group if check_no_overlap fails.
6729 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6731         * config/rs6000/altivec.md: Delete contraint arguments to
6732         define_expand, define_split, and define_peephole2, and in
6733         define_insn_and_split if always unused.
6734         * config/rs6000/darwin.md: Ditto.
6735         * config/rs6000/dfp.md: Ditto.
6736         * config/rs6000/rs6000.md: Ditto.
6737         * config/rs6000/sync.md: Ditto.
6738         * config/rs6000/vector.md: Ditto.
6739         * config/rs6000/vsx.md: Ditto.
6741 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
6743         * config/rs6000/altivec.md: Write output control strings as braced
6744         blocks instead of double-quoted strings.
6745         * config/rs6000/darwin.md: Ditto.
6746         * config/rs6000/rs6000.md: Ditto.
6747         * config/rs6000/vector.md: Ditto.
6748         * config/rs6000/vsx.md: Ditto.
6750 2018-02-21  Jason Merrill  <jason@redhat.com>
6752         PR c++/84314 - ICE with templates and fastcall attribute.
6753         * attribs.c (build_type_attribute_qual_variant): Remove assert.
6755 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6757         * ipa-cp.c (determine_versionability): Fix comment typos.
6759 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
6761         PR c/84229
6762         * ipa-cp.c (determine_versionability): Do not version functions caling
6763         va_arg_pack.
6765 2018-02-21  Martin Liska  <mliska@suse.cz>
6767         PR driver/83193
6768         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
6769         Add "native" as a possible value.
6770         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
6771         the macro when native cpu detection is available.
6773 2018-02-21  Martin Liska  <mliska@suse.cz>
6775         PR driver/83193
6776         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
6777         Add "native" as a possible value.
6778         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
6779         when native cpu detection is available.
6781 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
6782             Martin Sebor  <msebor@redhat.com>
6784         PR tree-optimization/84478
6785         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
6786         false.
6787         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
6788         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
6789         support which is conservatively correct, for 2 only stay conservative
6790         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
6791         argument to the 2 argument get_range_strlen, adjust 6 arg
6792         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
6793         false.
6794         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
6795         (gimple_fold_builtin_strlen): Pass true as last argument to
6796         get_range_strlen.
6798 2018-02-20  Martin Sebor  <msebor@redhat.com>
6800         PR middle-end/84095
6801         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
6802         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
6803         (builtin_memref::builtin_memref): Factor out parts into
6804         set_base_and_offset and call it.
6806 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
6808         PR middle-end/84406
6809         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
6810         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
6811         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
6812         search at the associated MODE_INT.
6814 2018-02-20  Jeff Law  <law@redhat.com>
6816         PR middle-end/82123
6817         PR tree-optimization/81592
6818         PR middle-end/79257
6819         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
6820         for range data rather than using global data.
6821         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
6822         range data rather than using global data.
6823         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
6824         pass it to children as needed.
6825         (struct directive::fmtresult): Similarly.
6826         (struct directive::set_width): Similarly.
6827         (struct directive::set_precision): Similarly.
6828         (format_integer, format_directive, parse_directive): Similarly.
6829         (format_none): Accept unnamed vr_values parameter.
6830         (format_percent, format_floating, format_character): Similarly.
6831         (format_string, format_plain): Similarly.
6832         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
6833         the EVRP range analyzer for range data rather than using global data.
6834         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
6835         gimple-ssa-evrp-analyze.h
6836         (class sprintf_dom_walker): Add after_dom_children member function.
6837         Add evrp_range_analyzer member.
6838         (sprintf_dom_walker::before_dom_children): Call into the EVRP
6839         range analyzer as needed.
6840         (sprintf_dom_walker::after_dom_children): New member function.
6841         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
6842         if not optimizing.
6843         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
6844         (evrp_range_analyzer::pop_to_marker): Likewise.
6846 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
6848         PR tree-optimization/84419
6849         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
6850         with the required type if its current type is compatible but
6851         different.
6853 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
6855         PR middle-end/82004
6856         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
6857         after vectorization.
6859 2018-02-20  Martin Liska  <mliska@suse.cz>
6861         PR driver/83193
6862         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
6863         possible values if we don't have a hint.
6865 2018-02-20  Martin Liska  <mliska@suse.cz>
6867         PR c/84310
6868         PR target/79747
6869         * final.c (shorten_branches): Build align_tab array with one
6870         more element.
6871         * opts.c (finish_options): Add alignment option limit check.
6872         (MAX_CODE_ALIGN): Likewise.
6873         (MAX_CODE_ALIGN_VALUE): Likewise.
6874         * doc/invoke.texi: Document maximum allowed option value for
6875         all -falign-* options.
6877 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
6879         PR target/84146
6880         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
6881         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
6882         * var-tracking.c (emit_note_insn_var_location): Remove all references
6883         to NOTE_INSN_CALL_ARG_LOCATION.
6884         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
6885         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
6886         Use copy_rtx_if_shared.
6887         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
6888         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
6889         (dwarf2out_var_location): Remove handling of
6890         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
6891         on call_insn.
6892         * final.c (final_scan_insn): Remove all references to
6893         NOTE_INSN_CALL_ARG_LOCATION.
6894         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
6895         before dumping final insns.
6896         * except.c (emit_note_eh_region_end): Remove all references to
6897         NOTE_INSN_CALL_ARG_LOCATION.
6898         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
6899         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
6900         * config/arc/arc.c (hwloop_optimize): Likewise.
6901         * config/arm/arm.c (create_fix_barrier): Likewise.
6902         * config/s390/s390.c (s390_chunkify_start): Likewise.
6903         * config/sh/sh.c (find_barrier): Likewise.
6904         * config/i386/i386.c (rest_of_insert_endbranch,
6905         ix86_seh_fixup_eh_fallthru): Likewise.
6906         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
6907         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
6908         * config/frv/frv.c (frv_function_prologue): Likewise.
6909         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
6910         reg note.
6911         (note_outside_basic_block_p): Remove all references to
6912         NOTE_INSN_CALL_ARG_LOCATION.
6913         * gengtype.c (adjust_field_rtx_def): Likewise.
6914         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
6915         Likewise.
6916         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
6917         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
6919         PR c++/84444
6920         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
6921         is ADDR_EXPR.
6923         PR tree-optimization/84452
6924         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
6925         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
6926         is NULL.
6928 2018-02-19  Martin Liska  <mliska@suse.cz>
6930         PR sanitizer/82183
6931         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
6933 2018-02-19  Martin Liska  <mliska@suse.cz>
6934             Richard Sandiford  <richard.sandiford@linaro.org>
6936         PR tree-optimization/82491
6937         * gimple-fold.c (get_base_constructor): Make earlier bail out
6938         to prevent ubsan.
6940 2018-02-19  Carl Love  <cel@us.ibm.com>
6942         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
6943         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
6944         BU_P8V_OVERLOAD_1.
6945         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
6946         P8V_BUILTIN_VEC_NEG.
6948 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
6950         * config/rl78/rl78.md (movdf): New define expand.
6952 2018-02-19  Martin Liska  <mliska@suse.cz>
6954         PR other/80589
6955         * doc/invoke.texi: Fix typo.
6956         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
6958 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
6960         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6961         handle rs6000_single_float and rs6000_double_float specially for
6962         e500 family CPUs.
6964 2018-02-16  Jeff Law  <law@redhat.com>
6966         * config/rx/rx.c (add_pop_cfi_notes): New function.;
6967         (pop_regs): Use it.
6969 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
6971         PR ipa/84425
6972         * ipa-inline.c (inline_small_functions): Fix a typo.
6974 2018-02-16  Nathan Sidwell  <nathan@acm.org>
6976         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
6978 2018-02-16  Carl Love  <cel@us.ibm.com>
6980         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
6981         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
6982         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
6983         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
6984         expansion to P8V_BUILTIN_VEC_FLOAT2.
6986 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
6988         PR rtl-optimization/70023
6989         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
6990         src_regno into account.
6992 2018-02-16  Carl Love  <cel@us.ibm.com>
6994         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
6995         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
6996         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
6997         * config/rs6000/rs6000.c: Remove case statements for
6998         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
6999         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7000         and P9V_BUILTIN_VEC_VINSERT4B.
7001         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7002         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7003         * config/rs6000/vsx.md:
7004         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7005         vec_insert4b.
7007 2018-02-16  Carl Love  <cel@us.ibm.com>
7009         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7010         vec_insert4b.
7011         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7012         definitions.
7013         * config/rs6000/rs6000-c.c: Add the definitions for
7014         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7015         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7016         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7017         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7018         definition for insert4b and define insn *insert3b_internal.
7019         * doc/extend.texi: Add documentation for vec_extract4b.
7021 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7023         * doc/extend.texi (Backwards Compatibility): Mention friend
7024         injection.  Note for-scope is deprecated.
7025         * doc/invoke.texi (-ffriend-injection): Deprecate.
7027 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7029         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7030         that moved to I2, also allow destinations that are a paradoxical
7031         subreg (instead of a normal reg).
7033 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7035         PR target/83831
7036         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7037         to QImode.
7039 2018-02-16  Richard Biener  <rguenther@suse.de>
7041         PR tree-optimization/84037
7042         PR tree-optimization/84016
7043         PR target/82862
7044         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7045         Adjust vec_construct for the fact we need additional higher latency
7046         128bit inserts for AVX256 and AVX512 vector builds.
7047         (ix86_add_stmt_cost): Scale vector construction cost for
7048         elementwise loads.
7050 2018-02-16  Richard Biener  <rguenther@suse.de>
7052         PR tree-optimization/84417
7053         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7054         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7055         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7057 2018-02-16  Martin Liska  <mliska@suse.cz>
7059         PR sanitizer/84307
7060         * internal-fn.def (ASAN_CHECK): Set proper flags.
7061         (ASAN_MARK): Likewise.
7063 2018-02-16  Julia Koval  <julia.koval@intel.com>
7065         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7066         from PTA_CANNONLAKE.
7068 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7070         PR target/84272
7071         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7072         Use ++iter rather than iter++ for std::list iterators.
7073         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7074         defer deleting them until all nodes in the forest are processed.  Do
7075         free even leaf nodes.  Change to_process into auto_vec.
7077         PR bootstrap/84405
7078         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7079         * vec.h (vec_default_construct): Use memset instead of placement new
7080         if BROKEN_VALUE_INITIALIZATION is defined.
7081         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7082         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7083         is defined.
7085         PR rtl-optimization/83723
7086         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7087         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7088         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7089         recursive calls.
7090         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7091         callers.
7092         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7094 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7096         PR rtl-optimization/81443
7097         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7098         from inner REGs to paradoxical SUBREGs.
7100 2018-02-16  Richard Biener  <rguenther@suse.de>
7102         PR tree-optimization/84399
7103         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7104         For operands we can analyze at their definition make sure we can
7105         analyze them at each use as well.
7107 2018-02-16  Richard Biener  <rguenther@suse.de>
7109         PR tree-optimization/84190
7110         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7111         volatile accesses if the decl isn't volatile.
7113 2018-02-15  Jason Merrill  <jason@redhat.com>
7115         PR c++/84314 - ICE with templates and fastcall attribute.
7116         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7117         TYPE_CANONICAL on an existing type.
7119 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7121         PR tree-optimization/84383
7122         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7123         dstoff nor call operand_equal_p if dstbase is NULL.
7125         PR tree-optimization/84334
7126         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7127         also a CONSTANT_CLASS_P, punt.
7129 2018-02-14  Jim Wilson  <jimw@sifive.com>
7131         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7132         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7133         to where locals are set.  Add TARGET_RVC support.
7134         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7136 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7138         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7140 2018-02-14  Martin Sebor  <msebor@redhat.com>
7142         PR tree-optimization/83698
7143         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7144         arrays constrain the offset range to their bounds.
7145         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7146         (builtin_access::overlap): Avoid setting the size of overlap if it's
7147         already been set.
7148         (maybe_diag_overlap): Also consider arrays when deciding what values
7149         of offsets to include in diagnostics.
7151 2018-02-14  Martin Sebor  <msebor@redhat.com>
7153         PR c/84108
7154         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7155         that correspond to the kind of a declaration.
7157 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7159         PR target/83984
7160         * config/pa/pa.md: Load address of PIC label using the linkage table
7161         if the label is nonlocal.
7163 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7165         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7166         warning message if user requests -maltivec=be.
7167         * doc/invoke.texi: Document deprecation of -maltivec=be.
7169 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7171         PR target/84220
7172         * config/rs6000/rs6000-c.c: Update definitions for
7173         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7174         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7176 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7178         PR target/84239
7179         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7180         add _get_ssp intrinsics. Remove argument from
7181         __builtin_ia32_rdssp[d|q].
7182         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7183         * config/i386/i386-builtin.def: Remove argument from
7184         __builtin_ia32_rdssp[d|q].
7185         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7186         ix86_expand_special_args_builtin for _rdssp[d|q].
7187         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7188         Clear register before usage.
7189         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7190         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7192 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7194         PR tree-optimization/84357
7195         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7196         operand 1 of an ARRAY_REF too.
7198 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7200         PR target/83831
7201         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7202         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7203         declarations.
7204         (set_of_reg): New struct.
7205         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7206         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7207         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7208         functions.
7209         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7210         Split into bitclr, bitset, bitinvert patterns if appropriate.
7211         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7212         use rx_fuse_in_memory_bitop.
7213         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7214         to named insn, correct maximum insn length.
7216 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7218         PR target/79242
7219         * machmode.def: Define a complex mode for PARTIAL_INT.
7220         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7221         MODE_PARTIAL_INT.
7222         * doc/rtl.texi: Document CSPImode.
7223         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7224         handling.
7225         (msp430_hard_regno_nregs_with_padding): Likewise.
7227 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7229         PR target/84279
7230         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7232 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7234         PR rtl-optimization/84169
7235         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7236         we generated a parallel as new i3 and we split that to new i2 and i3
7237         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7238         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7239         those to i2, not i1.  Partially rewrite this scan code.
7241 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7243         PR c/82210
7244         * stor-layout.c (place_field): For variable length fields, adjust
7245         offset_align afterwards not just based on the field's alignment,
7246         but also on the size.
7248         PR middle-end/84309
7249         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7250         of exps and logs in the use_exp2 case.
7252 2018-02-13  Jeff Law  <law@redhat.com>
7254         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7255         entry for "vector".
7257         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7258         ARGS as unused.
7260 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7262         PR debug/84342
7263         PR debug/84319
7264         * common.opt (gas-loc-support, gas-locview-support): New.
7265         (ginline-points, ginternal-reset-location-views): New.
7266         * doc/invoke.texi: Document them.  Use @itemx where intended.
7267         (gvariable-location-views): Adjust.
7268         * target.def (reset_location_view): New.
7269         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7270         (TARGET_RESET_LOCATION_VIEW): New.
7271         * doc/tm.texi: Rebuilt.
7272         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7273         (dwarf2out_default_as_locview_support): New.
7274         (output_asm_line_debug_info): Use option variables.
7275         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7276         (output_loc_list): Likewise.
7277         (add_high_low_attributes): Check option variables.
7278         Don't output entry view attribute in strict mode.
7279         (gen_inlined_subroutine_die): Check option variables.
7280         (dwarf2out_inline_entry): Likewise.
7281         (init_sections_and_labels): Likewise.
7282         (dwarf2out_early_finish): Likewise.
7283         (maybe_reset_location_view): New, from...
7284         (dwarf2out_var_location): ... here.  Call it.
7285         * debug.h (dwarf2out_default_as_loc_support): Declare.
7286         (dwarf2out_default_as_locview_support): Declare.
7287         * hooks.c (hook_int_rtx_insn_0): New.
7288         * hooks.h (hook_int_rtx_insn_0): Declare.
7289         * toplev.c (process_options): Take -gas-loc-support and
7290         -gas-locview-support from dwarf2out.  Enable
7291         -gvariable-location-views by default only with locview
7292         assembler support.  Enable -ginternal-reset-location-views by
7293         default only if the target defines the corresponding hook.
7294         Enable -ginline-points by default if location views are
7295         enabled; force it disabled if statement frontiers are
7296         disabled.
7297         * tree-inline.c (expand_call_inline): Check option variables.
7298         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7300 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7302         PR tree-optimization/84321
7303         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7304         handling.  Also check whether the anti-range contains any values
7305         that satisfy the mask; switch to a VR_RANGE if not.
7307 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7309         PR sanitizer/84340
7310         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7312 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7314         PR c++/83990
7315         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7316         of call statements, also set location of a load to a temporary.
7318 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7320         * config/rl78/rl78.c (add_vector_labels): New function.
7321         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7322         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7323         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7324         which checks that no arguments are passed.
7325         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7326         * doc/extend.texi: Documentation for the new attribute.
7328 2018-02-13  Andreas Schwab  <schwab@suse.de>
7330         * config/riscv/linux.h (CPP_SPEC): Define.
7332 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7334         PR target/84335
7335         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7336         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7337         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7338         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7339         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7340         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7341         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7342         temporarily for AES and PCLMUL builtins.
7344         PR tree-optimization/84339
7345         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7346         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7347         Formatting fixes.
7349         PR middle-end/84309
7350         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7351         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7352         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7353         inline function.
7354         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7355         inline function.
7356         * omp-simd-clone.h: New file.
7357         * omp-simd-clone.c: Include omp-simd-clone.h.
7358         (expand_simd_clones): No longer static.
7359         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7360         cgraph.h and omp-simd-clone.h.
7361         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7362         (vect_recog_widen_shift_pattern): Formatting fix.
7363         (vect_pattern_recog_1): Don't check optab for calls.
7365         PR target/84336
7366         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7367         operands[2] into a REG before using gen_lowpart on it.
7369 2018-02-12  Jeff Law  <law@redhat.com>
7371         PR target/83760
7372         * config/sh/sh.c (find_barrier): Consider a sibling call
7373         a barrier as well.
7375         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7376         successfully back substituting a reg.
7378 2018-02-12  Richard Biener  <rguenther@suse.de>
7380         PR tree-optimization/84037
7381         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7382         parameter, move visited init to caller.
7383         (vect_slp_analyze_operations): Separate cost from validity
7384         check, initialize visited once for all instances.
7385         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7386         for all instances.
7387         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7388         out an assert.
7389         (vect_model_promotion_demotion_cost): Likewise.
7390         (vectorizable_bswap): Guard cost modeling with !slp_node
7391         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7392         SLP stmts.
7393         (vectorizable_call): Likewise.
7394         (vectorizable_conversion): Likewise.
7395         (vectorizable_assignment): Likewise.
7396         (vectorizable_shift): Likewise.
7397         (vectorizable_operation): Likewise.
7398         (vectorizable_store): Likewise.
7399         (vectorizable_load): Likewise.
7400         (vectorizable_condition): Likewise.
7401         (vectorizable_comparison): Likewise.
7403 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7405         PR sanitizer/84307
7406         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7407         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7408         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7410 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7412         PR middle-end/83665
7413         * params.def (inline-min-speedup): Increase from 8 to 15.
7414         (max-inline-insns-auto): Decrease from 40 to 30.
7415         * ipa-split.c (consider_split): Add some buffer for function to
7416         be considered inlining candidate.
7417         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7418         default values.
7420 2018-02-12  Richard Biener  <rguenther@suse.de>
7422         PR tree-optimization/84037
7423         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7424         matched stmts if we cannot swap the non-matched ones.
7426 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7428         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7429         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7430         _mm_maskz_scalef_round_ss): New intrinsics.
7431         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7432         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7433         __builtin_ia32_scalefss_round): Remove.
7434         (__builtin_ia32_scalefsd_mask_round,
7435         __builtin_ia32_scalefss_mask_round): New intrinsics.
7436         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7437         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7438         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7439         "<round_constraint>")): Changed to ...
7440         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7441         "<round_scalar_constraint>")): ... this.
7442         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7443         %0, %1, %2<round_op3>}"): Changed to ...
7444         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7445         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7446         %2<round_scalar_mask_op3>}"): ... this.
7447         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7449 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7451         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7452         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7453         (_mm_maskz_sqrt_round_ss): New intrinsics.
7454         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7455         (__builtin_ia32_sqrtsd_mask_round)
7456         (__builtin_ia32_sqrtss_mask_round): New builtins.
7457         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7458         (__builtin_ia32_sqrtss_round): Remove.
7459         (__builtin_ia32_sqrtsd_mask_round)
7460         (__builtin_ia32_sqrtss_mask_round): New builtins.
7461         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7462         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7463         ((match_operand:VF_128 1 "vector_operand"
7464         "xBm,<round_constraint>")): Changed to ...
7465         ((match_operand:VF_128 1 "vector_operand"
7466         "xBm,<round_scalar_constraint>")): ... this.
7467         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7468         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7469         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7470         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7471         %<iptr>1<round_scalar_mask_op3>}): ... this.
7472         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7473         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7475 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7477         PR target/84266
7478         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7479         Cast vec_cmpeq result to correct type.
7480         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7481         Cast vec_cmpgt result to correct type.
7483 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7485         * final.c (final_scan_insn_1): Renamed from...
7486         (final_scan_insn): ... this.  New wrapper, to recover
7487         seen from the outermost call in recursive ones.
7488         * config/sparc/sparc.c (output_return): Drop seen from call.
7489         (output_sibcall): Likewise.
7490         * config/visium/visium.c (output_branch): Likewise.
7492 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7494         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7495         function label.
7497 2018-02-10  Alan Modra  <amodra@gmail.com>
7499         PR target/84300
7500         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7501         Specify LR as an input.
7503 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7505         PR sanitizer/83987
7506         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7507         remove_member_access_dummy_vars): New functions.
7508         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7509         lower_omp_1, execute_lower_omp): Use them.
7511         PR rtl-optimization/84308
7512         * shrink-wrap.c (spread_components): Release todo vector.
7514 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7516         PR rtl-optimization/57193
7517         * ira-color.c (struct allocno_color_data): Add member
7518         conflict_allocno_hard_prefs.
7519         (update_conflict_allocno_hard_prefs): New.
7520         (bucket_allocno_compare_func): Add a preference based on
7521         conflict_allocno_hard_prefs.
7522         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7523         (color_allocnos): Remove a dead code.  Initiate
7524         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
7526 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7528         PR target/84226
7529         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
7530         constraint from =wa to wa.  Avoid a subreg on the output operand,
7531         instead use a pseudo and subreg it in a move.
7532         (p9_xxbrd_<mode>): Changed to ...
7533         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
7534         (p9_xxbrd_v2df): New expander.
7535         (p9_xxbrw_<mode>): Changed to ...
7536         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
7537         (p9_xxbrw_v4sf): New expander.
7539 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7541         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
7543 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
7545         PR target/83926
7546         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
7547         multiply in 32-bit mode.
7548         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
7549         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
7550         mode.
7552 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
7554         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
7555         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
7556         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
7557         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
7559 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
7561         PR lto/84213
7562         * dwarf2out.c (is_trivial_indirect_ref): New function.
7563         (dwarf2out_late_global_decl): Do not generate a location
7564         attribute for variables that have a non-trivial DECL_VALUE_EXPR
7565         and that are not defined in the current unit.
7567 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7569         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
7570         instead of a libcall for UNORDERED.
7572 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
7574         PR target/82641
7575         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
7576         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
7578 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7580         PR target/PR84295
7581         * config/s390/s390.c (s390_set_current_function): Invoke
7582         s390_indirect_branch_settings also if fndecl didn't change.
7584 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7586         * config/rs6000/rs6000.md (blockage): Set length to zero.
7588 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
7590         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
7592 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
7594         PR sanitizer/84285
7595         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
7596         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
7597         -static-lib*san.
7599         PR debug/84252
7600         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
7601         PARALLEL incoming that failed vt_get_decl_and_offset check.
7603         PR middle-end/84237
7604         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
7605         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
7606         TREE_READONLY bit.
7607         (get_variable_section): For decls in named .bss* sections pass true as
7608         second argument to bss_initializer_p.
7610 2018-02-09  Marek Polacek  <polacek@redhat.com>
7611             Jakub Jelinek  <jakub@redhat.com>
7613         PR c++/83659
7614         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
7615         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
7616         Sync some changes from cxx_fold_indirect_ref.
7618 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
7620         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
7621         markers.
7622         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
7623         (BLOCK_INLINE_ENTRY_LABEL): New.
7624         (dwarf2out_var_location): Disregard inline entry markers.
7625         (inline_entry_data): New struct.
7626         (inline_entry_data_hasher): New hashtable type.
7627         (inline_entry_data_hasher::hash): New.
7628         (inline_entry_data_hasher::equal): New.
7629         (inline_entry_data_table): New variable.
7630         (add_high_low_attributes): Add DW_AT_entry_pc and
7631         DW_AT_GNU_entry_view attributes if a pending entry is found
7632         in inline_entry_data_table.  Add old entry_pc attribute only
7633         if debug nonbinding markers are disabled.
7634         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
7635         markers are enabled.
7636         (block_within_block_p, dwarf2out_inline_entry): New.
7637         (dwarf2out_finish): Check that no entries remained in
7638         inline_entry_data_table.
7639         * final.c (reemit_insn_block_notes): Handle inline entry notes.
7640         (final_scan_insn, notice_source_line): Likewise.
7641         (rest_of_clean_state): Skip inline entry markers.
7642         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
7643         markers.
7644         * gimple.c (gimple_build_debug_inline_entry): New.
7645         * gimple.h (enum gimple_debug_subcode): Add
7646         GIMPLE_DEBUG_INLINE_ENTRY.
7647         (gimple_build_debug_inline_entry): Declare.
7648         (gimple_debug_inline_entry_p): New.
7649         (gimple_debug_nonbind_marker_p): Adjust.
7650         * insn-notes.def (INLINE_ENTRY): New.
7651         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
7652         inline entry marker notes.
7653         (print_insn): Likewise.
7654         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
7655         (INSN_DEBUG_MARKER_KIND): Likewise.
7656         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
7657         * tree-inline.c (expand_call_inline): Build and insert
7658         debug_inline_entry stmt.
7659         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
7660         inline entry blocks early, if nonbind markers are enabled.
7661         (dump_scope_block): Dump fragment info.
7662         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
7663         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
7664         (gimple_build_debug_inline_entry): New.
7665         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
7666         Enable/disable inline entry points too.
7667         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
7668         (DEBUG_INSN): Describe inline entry markers.
7670         * common.opt (gvariable-location-views): New.
7671         (gvariable-location-views=incompat5): New.
7672         * config.in: Rebuilt.
7673         * configure: Rebuilt.
7674         * configure.ac: Test assembler for view support.
7675         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
7676         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
7677         * dwarf2out.c (var_loc_view): New typedef.
7678         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
7679         (dwarf2out_locviews_in_attribute): New.
7680         (dwarf2out_locviews_in_loclist): New.
7681         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
7682         (enum dw_line_info_opcode): Add LI_adv_address.
7683         (struct dw_line_info_table): Add view.
7684         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
7685         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
7686         (zero_view_p): New variable.
7687         (ZERO_VIEW_P): New macro.
7688         (output_asm_line_debug_info): New.
7689         (struct var_loc_node): Add view.
7690         (add_AT_view_list, AT_loc_list): New.
7691         (add_var_loc_to_decl): Add view param.  Test it against last.
7692         (new_loc_list): Add view params.  Record them.
7693         (AT_loc_list_ptr): Handle loc and view lists.
7694         (view_list_to_loc_list_val_node): New.
7695         (print_dw_val): Handle dw_val_class_view_list.
7696         (size_of_die): Likewise.
7697         (value_format): Likewise.
7698         (loc_list_has_views): New.
7699         (gen_llsym): Set vl_symbol too.
7700         (maybe_gen_llsym, skip_loc_list_entry): New.
7701         (dwarf2out_maybe_output_loclist_view_pair): New.
7702         (output_loc_list): Output view list or entries too.
7703         (output_view_list_offset): New.
7704         (output_die): Handle dw_val_class_view_list.
7705         (output_dwarf_version): New.
7706         (output_compilation_unit_header): Use it.
7707         (output_skeleton_debug_sections): Likewise.
7708         (output_rnglists, output_line_info): Likewise.
7709         (output_pubnames, output_aranges): Update version comments.
7710         (output_one_line_info_table): Output view numbers in asm comments.
7711         (dw_loc_list): Determine current endview, pass it to new_loc_list.
7712         Call maybe_gen_llsym.
7713         (loc_list_from_tree_1): Adjust.
7714         (add_AT_location_description): Create view list attribute if
7715         needed, check it's absent otherwise.
7716         (convert_cfa_to_fb_loc_list): Adjust.
7717         (maybe_emit_file): Call output_asm_line_debug_info for test.
7718         (dwarf2out_var_location): Reset views as needed.  Precompute
7719         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
7720         attribute.  Set view.
7721         (new_line_info_table): Reset next view.
7722         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
7723         (dwarf2out_source_line): Likewise.  Output view resets and labels to
7724         the assembler, or select appropriate line info opcodes.
7725         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
7726         (optimize_string_length): Catch it.  Adjust.
7727         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
7728         dw_val_class_view_list, and remove it if no longer needed.
7729         (hash_loc_list): Hash view numbers.
7730         (loc_list_hasher::equal): Compare them.
7731         (optimize_location_lists): Check whether a view list symbol is
7732         needed, and whether the locview attribute is present, and
7733         whether they match.  Remove the locview attribute if no longer
7734         needed.
7735         (index_location_lists): Call skip_loc_list_entry for test.
7736         (dwarf2out_finish): Call output_asm_line_debug_info for test.
7737         Use output_dwarf_version.
7738         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
7739         (struct dw_val_node): Add val_view_list.
7740         * final.c (SEEN_NEXT_VIEW): New.
7741         (set_next_view_needed): New.
7742         (clear_next_view_needed): New.
7743         (maybe_output_next_view): New.
7744         (final_start_function): Rename to...
7745         (final_start_function_1): ... this.  Take pointer to FIRST,
7746         add SEEN parameter.  Emit param bindings in the initial view.
7747         (final_start_function): Reintroduce SEEN-less interface.
7748         (final): Rename to...
7749         (final_1): ... this.  Take SEEN parameter.  Output final pending
7750         next view at the end.
7751         (final): Reintroduce seen-less interface.
7752         (final_scan_insn): Output pending next view before switching
7753         sections or ending a block.  Mark the next view as needed when
7754         outputting variable locations.  Notify debug backend of section
7755         changes, and of location view changes.
7756         (rest_of_handle_final): Adjust.
7757         * toplev.c (process_options): Autodetect value for debug variable
7758         location views option.  Warn on incompat5 without -gdwarf-5.
7759         * doc/invoke.texi (gvariable-location-views): New.
7760         (gvariable-location-views=incompat5): New.
7761         (gno-variable-location-views): New.
7763 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
7765         PR tree-optimization/84136
7766         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
7767         that the result of find_edge is non-NULL.
7769 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
7771         PR target/83008
7772         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
7773         storing integer register in SImode.  Fix cost of 256 and 512
7774         byte aligned SSE register store.
7776 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
7778         * config/i386/i386.c (ix86_multiplication_cost): Fix
7779         multiplication cost for TARGET_AVX512DQ.
7781 2018-02-08  Marek Polacek  <polacek@redhat.com>
7783         PR tree-optimization/84238
7784         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
7785         get_range_strlen.
7787 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7789         PR tree-optimization/84265
7790         * tree-vect-stmts.c (vectorizable_store): Don't treat
7791         VMAT_CONTIGUOUS accesses as grouped.
7792         (vectorizable_load): Likewise.
7794 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7796         PR tree-optimization/81635
7797         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
7798         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
7799         (test_round_for_mask): New functions.
7800         (wide_int_cc_tests): Call test_round_for_mask.
7801         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
7802         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
7803         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
7804         range returned by get_range_info.
7806 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7808         PR ipa/81360
7809         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
7810         * symtab.c: Include builtins.h
7811         (symtab_node::output_to_lto_symbol_table_p): Move here
7812         from lto-streamer-out.c:output_symbol_p.
7813         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
7814         (output_symbol_p): Move all logic to symtab.c
7815         (produce_symtab): Update.
7817 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7819         * config/s390/s390-opts.h (enum indirect_branch): Define.
7820         * config/s390/s390-protos.h (s390_return_addr_from_memory)
7821         (s390_indirect_branch_via_thunk)
7822         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
7823         (enum s390_indirect_branch_type): Define.
7824         * config/s390/s390.c (struct s390_frame_layout, struct
7825         machine_function): Remove.
7826         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
7827         (indirect_branch_table_label_no, indirect_branch_table_name):
7828         Define variables.
7829         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
7830         (enum s390_indirect_branch_option): Define.
7831         (s390_return_addr_from_memory): New function.
7832         (s390_handle_string_attribute): New function.
7833         (s390_attribute_table): Add new attribute handler.
7834         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
7835         (s390_indirect_branch_via_thunk): New function.
7836         (s390_indirect_branch_via_inline_thunk): New function.
7837         (s390_function_ok_for_sibcall): When jumping via thunk disallow
7838         sibling call optimization for non z10 compiles.
7839         (s390_emit_call): Force indirect branch target to be a single
7840         register.  Add r1 clobber for non-z10 compiles.
7841         (s390_emit_epilogue): Emit return jump via return_use expander.
7842         (s390_reorg): Handle JUMP_INSNs as execute targets.
7843         (s390_option_override_internal): Perform validity checks for the
7844         new command line options.
7845         (s390_indirect_branch_attrvalue): New function.
7846         (s390_indirect_branch_settings): New function.
7847         (s390_set_current_function): Invoke s390_indirect_branch_settings.
7848         (s390_output_indirect_thunk_function):  New function.
7849         (s390_code_end): Implement target hook.
7850         (s390_case_values_threshold): Implement target hook.
7851         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
7852         macros.
7853         * config/s390/s390.h (struct s390_frame_layout)
7854         (struct machine_function): Move here from s390.c.
7855         (TARGET_INDIRECT_BRANCH_NOBP_RET)
7856         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
7857         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
7858         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
7859         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
7860         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
7861         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
7862         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
7863         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
7864         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
7865         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
7866         (mnemonic attribute): Add values which aren't recognized
7867         automatically.
7868         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
7869         pattern for branch conversion.  Fix mnemonic attribute.
7870         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
7871         indirect branch via thunk if requested.
7872         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
7873         ("*indirect_jump"): Disable for branch conversion using out of
7874         line thunks.
7875         ("indirect_jump_via_thunk<mode>_z10")
7876         ("indirect_jump_via_thunk<mode>")
7877         ("indirect_jump_via_inlinethunk<mode>_z10")
7878         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
7879         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
7880         ("casesi_jump_via_inlinethunk<mode>_z10")
7881         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
7882         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
7883         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
7884         ("*indirect2_jump"): Disable for branch conversion.
7885         ("casesi_jump"): Turn into expander and expand patterns for branch
7886         conversion.
7887         ("return_use"): New expander.
7888         ("*return"): Emit return via thunk and rename it to ...
7889         ("*return<mode>"): ... this one.
7890         * config/s390/s390.opt: Add new options and and enum for the
7891         option values.
7893 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
7895         * lra-constraints.c (match_reload): Unconditionally use
7896         gen_lowpart_SUBREG, rather than selecting between that
7897         and equivalent gen_rtx_SUBREG code.
7899 2018-02-08  Richard Biener  <rguenther@suse.de>
7901         PR tree-optimization/84233
7902         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
7903         changed flag instead of boguously re-using phi_inserted.
7905 2018-02-08  Martin Jambor  <mjambor@suse.cz>
7907         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
7908         static local variables.
7910 2018-02-08  Richard Biener  <rguenther@suse.de>
7912         PR tree-optimization/84278
7913         * tree-vect-stmts.c (vectorizable_store): When looking for
7914         smaller vector types to perform grouped strided loads/stores
7915         make sure the mode is supported by the target.
7916         (vectorizable_load): Likewise.
7918 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
7920         * config/aarch64/aarch64.c (aarch64_components_for_bb):
7921         Increase LDP/STP opportunities by adding adjacent callee-saves.
7923 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
7925         PR rtl-optimization/84068
7926         PR rtl-optimization/83459
7927         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
7929 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
7931         PR tree-optimization/84224
7932         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
7933         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
7934         non-zero arguments.
7936 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
7938         PR target/84113
7939         * config/rs6000/altivec.md (*restore_world): Remove LR use.
7940         * config/rs6000/predicates.md (restore_world_operation): Adjust op
7941         count, remove one USE.
7943 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
7945         * doc/install.texi (Configuration): Document the
7946         --with-long-double-format={ibm,ieee} PowerPC configuration
7947         options.
7949         PR target/84154
7950         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
7951         Convert from define_expand to be define_insn_and_split.  Rework
7952         float/double/_Float128 conversions to QI/HI/SImode to work with
7953         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
7954         conversions to QI/HImode types did a store and then a load to
7955         truncate the value.  For conversions to VSX registers, don't split
7956         the insn, instead emit the code directly.  Use the code iterator
7957         any_fix to combine signed and unsigned conversions.
7958         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
7959         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
7960         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7961         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
7962         (fix_<mode>di2_hw): Likewise.
7963         (fixuns_<mode>di2_hw): Likewise.
7964         (fix_<mode>si2_hw): Likewise.
7965         (fixuns_<mode>si2_hw): Likewise.
7966         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
7967         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7968         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
7969         fix<uns>_trunc<SFDF:mode>si2_p8.
7970         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
7971         used.
7972         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
7973         (fix<uns>_<mode>_mem): Likewise.
7974         (fctiw<u>z_<mode>_mem): Likewise.
7975         (fix<uns>_<mode>_mem): Likewise.
7976         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
7977         the register allocator from doing a direct move to the GPRs to do
7978         a store, and instead use the ISA 3.0 store byte/half-word from
7979         vector register instruction.  For IEEE 128-bit floating point,
7980         also optimize stores of 32-bit ints.
7981         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
7983 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
7985         * genextract.c (push_pathstr_operand): New function to support
7986         [a-zA-Z].
7987         (walk_rtx): Call push_pathstr_operand.
7988         (print_path): Support [a-zA-Z].
7990 2018-02-07  Richard Biener  <rguenther@suse.de>
7992         PR tree-optimization/84037
7993         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
7994         (cse_and_gimplify_to_preheader): Declare.
7995         (vect_get_place_in_interleaving_chain): Likewise.
7996         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
7997         ivexpr_map.
7998         (_loop_vec_info::~_loop_vec_info): Delete it.
7999         (cse_and_gimplify_to_preheader): New function.
8000         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8001         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8002         (vectorizable_load): Likewise.  For grouped stores always base
8003         the IV on the first element.
8004         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8005         condition before gimplifying.
8007 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8009         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8010         *DIV_EXPR and *MOD_EXPR.
8012 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8014         PR target/84248
8015         * config/i386/i386.c (ix86_option_override_internal): Mask out
8016         the CF_SET bit when checking -fcf-protection.
8018 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8020         PR libgomp/84217
8021         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8022         enough.
8024 2018-02-07  Richard Biener  <rguenther@suse.de>
8026         PR tree-optimization/84204
8027         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8028         this place.
8030         PR tree-optimization/84205
8031         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8032         special-case isl_ast_op_zdiv_r.
8034         PR tree-optimization/84223
8035         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8036         Only add conditions from within the region.
8037         (gather_bbs::after_dom_children): Adjust.
8039 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8041         PR target/84209
8042         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8043         * config/avr/avr.md: Only post-reload split REG-REG moves if
8044         either register is GENERAL_REG_P.
8046 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8048         PR tree-optimization/84235
8049         * tree-ssa-scopedtables.c
8050         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8051         if the subtraction is performed in floating point type where NaNs are
8052         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8053         build 1.  Formatting fix.
8055 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8057         PR target/84146
8058         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8059         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8060         and skip it regardless of bb boundaries.  Use CALL_P macro,
8061         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8062         unnecessarily, formatting fix.
8064 2018-02-06  Michael Collison  <michael.collison@arm.com>
8066         * config/arm/thumb2.md:
8067         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8068         (*thumb_mov_notscc): Ditto.
8070 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8072         PR target/84154
8073         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8074         unsigned_fix, not "s".
8076 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8078         * configure.ac (gcc_fn_eh_frame_ro): New function.
8079         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8080         correct .eh_frame permissions.
8081         * configure: Regenerate.
8083 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8085         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8086         irrelevant options.
8088 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8090         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8091         Display warning message for -mno-speculate-indirect-jumps.
8093 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8095         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8096         Undocumented.
8097         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8099 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8101         PR tree-optimization/84225
8102         * tree-eh.c (find_trapping_overflow): Only call
8103         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8105 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8107         PR target/84145
8108         * config/i386/i386.c: Reimplement the check of possible options
8109         -mibt/-mshstk conbination. Change error messages.
8110         * doc/invoke.texi: Fix a typo: remove extra '='.
8112 2018-02-06  Marek Polacek  <polacek@redhat.com>
8114         PR tree-optimization/84228
8115         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8117 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8119         PR target/82641
8120         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8121         emitted arch directives.
8122         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8123         __ARM_FEATURE_COPROC before changing architectures.
8125 2018-02-06  Richard Biener  <rguenther@suse.de>
8127         * config/i386/i386.c (print_reg): Fix typo.
8128         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8130 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8132         * configure: Regenerate.
8134 2018-02-05  Martin Sebor  <msebor@redhat.com>
8136         PR tree-optimization/83369
8137         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8138         inlining context.
8140 2018-02-05  Martin Liska  <mliska@suse.cz>
8142         * doc/invoke.texi: Cherry-pick upstream r323995.
8144 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8146         * ira.c (ira_init_register_move_cost): Adjust comment.
8148 2018-02-05  Martin Liska  <mliska@suse.cz>
8150         PR gcov-profile/84137
8151         * doc/gcov.texi: Fix typo in documentation.
8153 2018-02-05  Martin Liska  <mliska@suse.cz>
8155         PR gcov-profile/83879
8156         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8157         using dlopen functionality.
8159 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8161         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8162         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8163         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8164         _mm_maskz_range_round_ss): New intrinsics.
8165         (__builtin_ia32_rangesd128_round)
8166         (__builtin_ia32_rangess128_round): Remove.
8167         (__builtin_ia32_rangesd128_mask_round,
8168         __builtin_ia32_rangess128_mask_round): New builtins.
8169         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8170         __builtin_ia32_rangess128_round): Remove.
8171         (__builtin_ia32_rangesd128_mask_round,
8172         __builtin_ia32_rangess128_mask_round): New builtins.
8173         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8174         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8175         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8176         "<round_saeonly_constraint>")): Changed to ...
8177         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8178         "<round_saeonly_scalar_constraint>")): ... this.
8179         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8180         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8181         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8182         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8183         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8185 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8187         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8188         options.
8189         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8190         Remove all values except native, 8540 and 8548.
8192 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8194         * config/i386/i386.c (ix86_output_function_return): Pass
8195         INVALID_REGNUM, instead of -1, as invalid register number to
8196         indirect_thunk_name and output_indirect_thunk.
8198 2018-02-02  Julia Koval  <julia.koval@intel.com>
8200         * config.gcc: Add -march=icelake.
8201         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8202         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8203         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8204         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8205         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8206         (processor_target_table): Add icelake.
8207         (ix86_option_override_internal): Handle new PTAs.
8208         (get_builtin_code_for_version): Handle icelake.
8209         (M_INTEL_COREI7_ICELAKE): New.
8210         (fold_builtin_cpu): Handle icelake.
8211         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8212         * doc/invoke.texi: Add -march=icelake.
8214 2018-02-02  Julia Koval  <julia.koval@intel.com>
8216         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8217         to wide_int_bitmask.
8218         * wide-int-bitmask.h: New.
8220 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8222         PR target/84066
8223         * config/i386/i386.md: Replace Pmode with word_mode in
8224         builtin_setjmp_setup and builtin_longjmp to support x32.
8226 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8228         PR target/56010
8229         PR target/83743
8230         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8231         #include "opts.h".
8232         (rs6000_supported_cpu_names): New static variable.
8233         (linux_cpu_translation_table): Likewise.
8234         (elf_platform) <cpu>: Define new static variable and use it.
8235         Translate kernel AT_PLATFORM name to canonical name if needed.
8236         Error if platform name is unknown.
8238 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8240         PR target/84089
8241         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8243 2018-02-01  Jeff Law  <law@redhat.com>
8245         PR target/84128
8246         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8247         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8248         the scratch if RELEASE_VIA_POP is false.
8249         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8250         If we have to save a temporary register, decrement SIZE appropriately.
8251         Pass new arguments to release_scratch_register_on_entry.
8252         (ix86_adjust_stack_and_probe): Likewise.
8253         (ix86_emit_probe_stack_range): Pass new arguments to
8254         release_scratch_register_on_entry.
8256 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8258         PR rtl-optimization/84157
8259         * combine.c (change_zero_ext): Use REG_P predicate in
8260         front of HARD_REGISTER_P predicate.
8262 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8264         * config/avr/avr.c (avr_option_override): Move disabling of
8265         -fdelete-null-pointer-checks to...
8266         * common/config/avr/avr-common.c (avr_option_optimization_table):
8267         ...here.
8269 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8271         PR tree-optimization/81635
8272         * tree-data-ref.c (split_constant_offset_1): For types that
8273         wrap on overflow, try to use range info to prove that wrapping
8274         cannot occur.
8276 2018-02-01  Renlin Li  <renlin.li@arm.com>
8278         PR target/83370
8279         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8280         TAILCALL_ADDR_REGS.
8281         (aarch64_register_move_cost): Likewise.
8282         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8283         TAILCALL_ADDR_REGS.
8284         (REG_CLASS_NAMES): Likewise.
8285         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8286         TAILCALL_ADDR_REGS. Remove IP registers.
8287         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8289 2018-02-01  Richard Biener  <rguenther@suse.de>
8291         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8292         for specifying RPO order and allow NULL for that.
8293         * domwalk.c (dom_walker::dom_walker): Likewise.
8294         (dom_walker::walk): Handle NULL RPO order.
8295         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8296         in RPO order.
8297         (rewrite_update_dom_walker): Likewise.
8298         (mark_def_dom_walker): Likewise.
8300 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8302         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8303         (aarch64_maybe_expand_sve_subreg_move): Declare.
8304         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8305         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8306         predicate.
8307         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8308         that are semantically a reverse operation.
8309         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8310         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8311         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8312         functions.
8313         (aarch64_can_change_mode_class): For big-endian, forbid changes
8314         between two SVE modes if they have different element sizes.
8316 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8318         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8319         the TImode handling for big-endian targets.
8321 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8323         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8324         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8325         not just bytes.
8326         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8327         Remove BSWAP handing for big-endian targets and use the form of
8328         LD1RQ appropariate for the mode.
8330 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8332         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8333         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8334         duplicated element.
8336 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8338         PR tearget/83845
8339         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8340         check for operands that need to go through aarch64_sve_reload_be.
8342 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8344         PR tree-optimization/81661
8345         PR tree-optimization/84117
8346         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8347         * tree-eh.c: Include gimplify.h.
8348         (find_trapping_overflow, replace_trapping_overflow,
8349         rewrite_to_non_trapping_overflow): New functions.
8350         * tree-vect-loop.c: Include tree-eh.h.
8351         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8352         * tree-data-ref.c: Include tree-eh.h.
8353         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8355 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8357         PR rtl-optimization/84123
8358         * combine.c (change_zero_ext): Check if hard register satisfies
8359         can_change_dest_mode before calling gen_lowpart_SUBREG.
8361 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8363         PR target/82444
8364         * ira.c (ira_init_register_move_cost): Remove assert.
8366 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8368         PR rtl-optimization/84071
8369         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8370         * doc/tm.texi: Regenerate.
8372 2018-01-31  Richard Biener  <rguenther@suse.de>
8374         PR tree-optimization/84132
8375         * tree-data-ref.c (analyze_miv_subscript): Properly
8376         check whether evolution_function_is_affine_multivariate_p
8377         before calling gcd_of_steps_may_divide_p.
8379 2018-01-31  Julia Koval  <julia.koval@intel.com>
8381         PR target/83618
8382         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8383         * config/i386/i386.md (rdpid_rex64) New.
8384         (rdpid): Make 32bit only.
8386 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8388         PR lto/84105
8389         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8390         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8392 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8394         Revert
8395         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8397         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8399 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8401         PR rtl-optimization/84071
8402         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8403         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8405 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8407         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8408         (arc_attribute_table): Add 'aux' attribute.
8409         (arc_in_small_data_p): Consider aux like variables.
8410         (arc_is_aux_reg_p): New function.
8411         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8412         (arc_get_aux_arg): New function.
8413         (prepare_move_operands): Handle aux-register access.
8414         (arc_handle_aux_attribute): New function.
8415         * doc/extend.texi (ARC Variable attributes): Add subsection.
8417 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8419         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8420         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8421         (arc_attribute_table): Add 'uncached' attribute.
8422         (arc_print_operand): Print '.di' flag for uncached memory
8423         accesses.
8424         (arc_in_small_data_p): Do not consider for small data the uncached
8425         types.
8426         (arc_is_uncached_mem_p): New function.
8427         * config/arc/predicates.md (compact_store_memory_operand): Check
8428         for uncached memory accesses.
8429         (nonvol_nonimm_operand): Likewise.
8430         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8432 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8434         PR c/84100
8435         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8436         falign-loops=): Add Optimization flag.
8438 2018-01-30  Jeff Law  <law@redhat.com>
8440         PR target/84064
8441         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8442         INT_REGISTERS_SAVED.  Check it prior to calling
8443         get_scratch_register_on_entry.
8444         (ix86_adjust_stack_and_probe): Similarly.
8445         (ix86_emit_probe_stack_range): Similarly.
8446         (ix86_expand_prologue): Corresponding changes.
8448 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8450         PR target/40411
8451         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8452         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8454 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8456         PR target/84112
8457         * lra-constraints.c (curr_insn_transform): Process AND in the
8458         address.
8460 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8462         PR rtl-optimization/83986
8463         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8464         dependence against last_pending_memory_flush in addition to
8465         pending_jump_insns.
8467 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8469         PR tree-optimization/81611
8470         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8471         copies.
8473 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8475         PR target/83758
8476         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8477         a reg rtx.
8479 2018-01-30  Richard Biener  <rguenther@suse.de>
8480             Jakub Jelinek  <jakub@redhat.com>
8482         PR tree-optimization/84111
8483         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8484         inner loops added during recursion, as they don't have up-to-date
8485         SSA form.
8487 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8489         PR ipa/81360
8490         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8491         (can_inline_edge_by_limits_p): ... here.
8492         (can_early_inline_edge_p, check_callers,
8493         update_caller_keys, update_callee_keys, recursive_inlining,
8494         add_new_edges_to_heap, speculation_useful_p,
8495         inline_small_functions,
8496         inline_small_functions, flatten_function,
8497         inline_to_all_callers_1): Update.
8499 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8501         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8502         zeros correctly.
8504 2018-01-30  Richard Biener  <rguenther@suse.de>
8506         PR tree-optimization/83008
8507         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8508         invariant and constant vector uses in stmts when they need
8509         more than one stmt.
8511 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8513         PR bootstrap/84017
8514         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8515         * configure: Regenerate.
8517 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8519         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8520         pattern.
8521         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8522         Use gen_rtx_REG rather than gen_lowpart.
8524 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8526         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
8527         rather than 0 when creating partial subregs.
8529 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8531         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
8532         of usage.
8534 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8536         PR target/81550
8537         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
8538         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
8539         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
8540         flags.  This restores the settings used before the 2017-07-24.
8541         Turning off pre increment/decrement/modify allows IVOPTS to
8542         optimize DF/SF loops where the index is an int.
8544 2018-01-29  Richard Biener  <rguenther@suse.de>
8545             Kelvin Nilsen  <kelvin@gcc.gnu.org>
8547         PR bootstrap/80867
8548         * tree-vect-stmts.c (vectorizable_call): Don't call
8549         targetm.vectorize_builtin_md_vectorized_function if callee is
8550         NULL.
8552 2018-01-22  Carl Love  <cel@us.ibm.com>
8554         * doc/extend.tex: Fix typo in second arg in
8555         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
8557 2018-01-29  Richard Biener  <rguenther@suse.de>
8559         PR tree-optimization/84086
8560         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
8561         (flush_ssaname_freelist): When SSA names were released reset
8562         the SCEV hash table.
8564 2018-01-29  Richard Biener  <rguenther@suse.de>
8566         PR tree-optimization/84057
8567         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
8568         removed paths when removing edges.
8570 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
8572         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
8573         -mfunction-return=@var{choice}.
8575 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8577         PR diagnostic/84034
8578         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
8579         Handle CR like TAB.
8580         (layout::print_source_line): Likewise.
8581         (test_get_line_width_without_trailing_whitespace): Add test cases.
8583 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
8585         PR middle-end/84040
8586         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
8587         debug insns.
8589 2018-01-26  Jim Wilson  <jimw@sifive.com>
8591         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
8593         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
8594         specified.
8596 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8598         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
8599         and CMP + SUB-immediate -> SUBS.
8601 2018-01-26  Martin Sebor  <msebor@redhat.com>
8603         PR tree-optimization/83896
8604         * tree-ssa-strlen.c (get_string_len): Rename...
8605         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
8606         Avoid assuming length is constant.
8607         (handle_char_store): Use HOST_WIDE_INT for string length.
8609 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
8611         PR target/81763
8612         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
8613         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
8615 2018-01-26  Richard Biener  <rguenther@suse.de>
8617         PR rtl-optimization/84003
8618         * dse.c (record_store): Only record redundant stores when
8619         the earlier store aliases at least all accesses the later one does.
8621 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
8623         PR rtl-optimization/83985
8624         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
8625         REG_CFA_RESTORE insns.
8626         (delete_unmarked_insns): Don't ignore separate shrink wrapping
8627         REG_CFA_RESTORE insns here.
8629         PR c/83989
8630         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
8631         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
8633 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8635         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
8636         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
8637         (arc_init): Likewise.
8638         (arc_override_options): Likewise.
8639         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
8640         value.
8641         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
8642         support.
8643         * config/arc/arc.h (TARGET_DBNZ): Define.
8644         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
8645         properly set the tune attribute.
8646         (dbnz): Use TARGET_DBNZ guard.
8647         * config/arc/arc.opt (mtune): Add core3 option.
8649 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8651         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
8652         recognize new pic like addresses.
8653         (arc_delegitimize_address): Clean up.
8655 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8657         * config/arc/arc-arches.def: Option mrf16 valid for all
8658         architectures.
8659         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
8660         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
8661         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
8662         * config/arc/arc-tables.opt: Regenerate.
8663         * config/arc/arc.c (arc_conditional_register_usage): Handle
8664         reduced register file case.
8665         (arc_file_start): Set must have build attributes.
8666         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
8667         mrf16 option value.
8668         * config/arc/arc.opt (mrf16): Add new option.
8669         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
8670         * config/arc/genmultilib.awk: Handle new mrf16 option.
8671         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
8672         * config/arc/t-multilib: Regenerate.
8673         * doc/invoke.texi (ARC Options): Document mrf16 option.
8675 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8677         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
8678         * config/arc/arc.c (arc_handle_secure_attribute): New function.
8679         (arc_attribute_table): Add 'secure_call' attribute.
8680         (arc_print_operand): Print secure call operand.
8681         (arc_function_ok_for_sibcall): Don't optimize tail calls when
8682         secure.
8683         (arc_is_secure_call_p): New function.  * config/arc/arc.md
8684         (call_i): Add support for sjli instruction.
8685         (call_value_i): Likewise.
8686         * config/arc/constraints.md (Csc): New constraint.
8688 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
8689             John Eric Martin  <John.Martin@emmicro-us.com>
8691         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
8692         * config/arc/arc.c (_arc_jli_section): New struct.
8693         (arc_jli_section): New type.
8694         (rc_jli_sections): New static variable.
8695         (arc_handle_jli_attribute): New function.
8696         (arc_attribute_table): Add jli_always and jli_fixed attribute.
8697         (arc_file_end): New function.
8698         (TARGET_ASM_FILE_END): Define.
8699         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
8700         (arc_add_jli_section): New function.
8701         (jli_call_scan): Likewise.
8702         (arc_reorg): Call jli_call_scan.
8703         (arc_output_addsi): Remove 'S' from printing asm operand.
8704         (arc_is_jli_call_p): New function.
8705         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
8706         operand.
8707         (movhi_insn): Likewise.
8708         (movsi_insn): Likewise.
8709         (movsi_set_cc_insn): Likewise.
8710         (loadqi_update): Likewise.
8711         (load_zeroextendqisi_update): Likewise.
8712         (load_signextendqisi_update): Likewise.
8713         (loadhi_update): Likewise.
8714         (load_zeroextendhisi_update): Likewise.
8715         (load_signextendhisi_update): Likewise.
8716         (loadsi_update): Likewise.
8717         (loadsf_update): Likewise.
8718         (movsicc_insn): Likewise.
8719         (bset_insn): Likewise.
8720         (bxor_insn): Likewise.
8721         (bclr_insn): Likewise.
8722         (bmsk_insn): Likewise.
8723         (bicsi3_insn): Likewise.
8724         (cmpsi_cc_c_insn): Likewise.
8725         (movsi_ne): Likewise.
8726         (movsi_cond_exec): Likewise.
8727         (clrsbsi2): Likewise.
8728         (norm_f): Likewise.
8729         (normw): Likewise.
8730         (swap): Likewise.
8731         (divaw): Likewise.
8732         (flag): Likewise.
8733         (sr): Likewise.
8734         (kflag): Likewise.
8735         (ffs): Likewise.
8736         (ffs_f): Likewise.
8737         (fls): Likewise.
8738         (call_i): Remove 'S' asm letter, add jli instruction.
8739         (call_value_i): Likewise.
8740         * config/arc/arc.op (mjli-always): New option.
8741         * config/arc/constraints.md (Cji): New constraint.
8742         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
8743         operand.
8744         (subsf3_fpx): Likewise.
8745         (mulsf3_fpx): Likewise.
8746         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
8747         asm operand.
8748         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
8749         function attrbutes.
8750         * doc/invoke.texi (ARC): Document mjli-always option.
8752 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
8754         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
8755         avoid addition with 0 and use incw and decw where possible.
8757 2018-01-26  Richard Biener  <rguenther@suse.de>
8759         PR tree-optimization/81082
8760         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
8761         association if it requires casting to unsigned.
8762         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
8763         from fold_plusminus_mult_expr to catch important cases late when
8764         range info is available.
8766 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8768         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
8769         * configure.ac (hidden_linkonce): New test.
8770         * configure: Regenerate.
8771         * config.in: Regenerate.
8773 2018-01-26  Julia Koval  <julia.koval@intel.com>
8775         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
8776         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
8777         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
8778         _mm_mask_bitshuffle_epi64_mask): Fix type.
8779         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
8780         USI_FTYPE_V4DI_V4DI_USI): Remove.
8781         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
8782         __builtin_ia32_vpshufbitqmb256_mask,
8783         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
8784         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
8785         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
8787 2018-01-26  Alan Modra  <amodra@gmail.com>
8789         PR target/84033
8790         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
8791         UNSPEC_VBPERMQ.  Sort other unspecs.
8793 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
8795         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
8797 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
8799         PR middle-end/83055
8800         * predict.c (drop_profile): Do not push/pop cfun; update also
8801         node->count.
8802         (handle_missing_profiles): Fix logic looking for zero profiles.
8804 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
8806         PR middle-end/83977
8807         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
8808         on functions with #pragma omp declare simd or functions with simd
8809         attribute.
8810         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
8811         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
8812         Remove trailing \n from warning_at calls.
8814 2018-01-25  Tom de Vries  <tom@codesourcery.com>
8816         PR target/84028
8817         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8818         for neutered workers.
8820 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
8822         PR target/68467
8823         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
8824         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
8826 2018-01-24  Jeff Law  <law@redhat.com>
8828         PR target/83994
8829         * i386.c (get_probe_interval): Move to earlier point.
8830         (ix86_compute_frame_layout): If -fstack-clash-protection and
8831         the frame is larger than the probe interval, then use pushes
8832         to save registers rather than reg->mem moves.
8833         (ix86_expand_prologue): Remove conditional for int_registers_saved
8834         assertion.
8836 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
8838         PR target/84014
8839         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
8840         min/max for never referenced object.
8842 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
8844         PR middle-end/83977
8845         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
8846         here.
8847         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
8848         attributes from DECL_ATTRIBUTES (decl) without affecting
8849         DECL_ATTRIBUTES (current_function_decl).
8850         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
8851         functions with non-NULL DECL_ABSTRACT_ORIGIN.
8853 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
8855         PR tree-optimization/83979
8856         * fold-const.c (fold_comparison): Use constant_boolean_node
8857         instead of boolean_{true,false}_node.
8859 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
8861         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
8862         with zero counts.
8864 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8866         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8867         Simplify the clause that sets the length attribute.
8868         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8869         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
8870         clause that sets the length attribute.
8871         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8873 2018-01-24  Tom de Vries  <tom@codesourcery.com>
8875         PR target/83589
8876         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
8877         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
8878         Add strict parameter.
8879         (prevent_branch_around_nothing): Insert dummy insn between branch to
8880         label and label with no ptx insn inbetween.
8881         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
8883 2018-01-24  Tom de Vries  <tom@codesourcery.com>
8885         PR target/81352
8886         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8887         for neutered threads in warp.
8888         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
8890 2018-01-24  Richard Biener  <rguenther@suse.de>
8892         PR tree-optimization/83176
8893         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
8894         operands.
8896 2018-01-24  Richard Biener  <rguenther@suse.de>
8898         PR tree-optimization/82819
8899         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
8900         code generating pluses that are no-ops in the target precision.
8902 2018-01-24  Richard Biener  <rguenther@suse.de>
8904         PR middle-end/84000
8905         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
8907 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
8909         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
8910         to merge probabilities.
8911         * predict.c (probably_never_executed): Also mark as cold functions
8912         with global 0 profile and guessed local profile.
8913         * profile-count.c (profile_probability::combine_with_count): New
8914         member function.
8915         * profile-count.h (profile_probability::operator*,
8916         profile_probability::operator*=, profile_probability::operator/,
8917         profile_probability::operator/=): Reduce precision to adjusted
8918         and set value to guessed on contradictory divisions.
8919         (profile_probability::combine_with_freq): Remove.
8920         (profile_probability::combine_wiht_count): Declare.
8921         (profile_count::force_nonzero):: Set to adjusted.
8922         (profile_count::probability_in):: Set quality to adjusted.
8923         * tree-ssa-tail-merge.c (replace_block_by): Use
8924         combine_with_count.
8926 2018-01-23  Andrew Waterman  <andrew@sifive.com>
8927             Jim Wilson  <jimw@sifive.com>
8929         * config/riscv/riscv.c (riscv_stack_boundary): New.
8930         (riscv_option_override): Set riscv_stack_boundary.  Handle
8931         riscv_preferred_stack_boundary_arg.
8932         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
8933         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
8934         (STACK_BOUNDARY): Set to riscv_stack_boundary.
8935         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
8936         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
8937         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
8939 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
8941         PR target/83905
8942         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
8943         of struct ix86_frame.
8944         (ix86_expand_epilogue): Likewise.  Add a local variable for
8945         the reg_save_offset field in struct ix86_frame.
8947 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
8949         PR tree-optimization/82604
8950         * tree-loop-distribution.c (enum partition_kind): New enum item
8951         PKIND_PARTIAL_MEMSET.
8952         (partition_builtin_p): Support above new enum item.
8953         (generate_code_for_partition): Ditto.
8954         (compute_access_range): Differentiate cases that equality can be
8955         proven at all loops, the innermost loops or no loops.
8956         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
8957         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
8958         (finalize_partitions, distribute_loop): Don't fuse partition of
8959         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
8960         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
8961         parloop is enabled.
8963 2018-01-23  Martin Liska  <mliska@suse.cz>
8965         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
8966         order to ignore the predictor.
8967         (PRED_POLYMORPHIC_CALL): Likewise.
8968         (PRED_RECURSIVE_CALL): Likewise.
8970 2018-01-23  Martin Liska  <mliska@suse.cz>
8972         * tree-profile.c (tree_profiling): Print function header to
8973         aware reader which function we are working on.
8974         * value-prof.c (gimple_find_values_to_profile): Do not print
8975         not interesting value histograms.
8977 2018-01-23  Martin Liska  <mliska@suse.cz>
8979         * profile-count.h (enum profile_quality): Add
8980         profile_uninitialized as the first value. Do not number values
8981         as they are zero based.
8982         (profile_count::verify): Update sanity check.
8983         (profile_probability::verify): Likewise.
8985 2018-01-23  Nathan Sidwell  <nathan@acm.org>
8987         * doc/invoke.texi (ffor-scope): Deprecate.
8989 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
8991         PR tree-optimization/83510
8992         * domwalk.c (set_all_edges_as_executable): New function.
8993         (dom_walker::dom_walker): Convert bool param
8994         "skip_unreachable_blocks" to enum reachability.  Move setup of
8995         edge flags to set_all_edges_as_executable and only do it when
8996         reachability is REACHABLE_BLOCKS.
8997         * domwalk.h (enum dom_walker::reachability): New enum.
8998         (dom_walker::dom_walker): Convert bool param
8999         "skip_unreachable_blocks" to enum reachability.
9000         (set_all_edges_as_executable): New decl.
9001         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9002         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9003         "reachability".
9004         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9005         but converting true to REACHABLE_BLOCKS.
9006         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9007         * tree-vrp.c
9008         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9009         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9010         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9011         REACHABLE_BLOCKS.
9012         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9013         if check_all_array_refs will be called.
9015 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9017         * tree.c (selftest::test_location_wrappers): Add more test
9018         coverage.
9020 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9022         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9023         (selftest::test_bit_in_range): Likewise.
9025 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9027         PR testsuite/83888
9028         * doc/sourcebuild.texi (vect_float): Say that the selector
9029         only describes the situation when -funsafe-math-optimizations is on.
9030         (vect_float_strict): Document.
9032 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9034         PR tree-optimization/83965
9035         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9036         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9037         instead of checking only for a reduction.
9038         (vect_recog_widen_sum_pattern): Likewise.
9040 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9042         * predict.c (probably_never_executed): Only use precise profile info.
9043         (compute_function_frequency): Skip after inlining hack since we now
9044         have quality checking.
9046 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9048         * profile-count.h (profile_probability::very_unlikely,
9049         profile_probability::unlikely, profile_probability::even): Set
9050         precision to guessed.
9052 2018-01-23  Richard Biener  <rguenther@suse.de>
9054         PR tree-optimization/83963
9055         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9056         Properly terminate dominator walk when crossing the exit edge not
9057         when visiting its source block.
9059 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9061         PR c++/83918
9062         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9063         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9065 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9067         PR tree-optimization/83957
9068         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9069         semicolon after for body surrounded by braces.
9071         PR tree-optimization/83081
9072         * profile-count.h (profile_probability::split): New method.
9073         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9074         Use profile_probability::split.
9075         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9076         when splitting a single conditional jump into 2.
9078 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9080         PR tree-optimization/69452
9081         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9082         decl.
9084 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9086         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9087         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9088         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9090 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9092         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9093         * config/rl78/rl78.md (movdi): New define_expand.
9094         * config/rl78/rl78.c (rl78_split_movdi): New function.
9096 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9098         PR target/83862
9099         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9100         no longer used.
9101         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9102         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9103         128-bit to produce an UNSPEC move to get the double word with the
9104         signbit and then a shift directly to do signbit.
9105         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9106         implementation with a new version that just does either a direct
9107         move or a regular move.  Move memory interface to separate insns.
9108         Move insns so they are next to the expander.
9109         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9110         with signbit move.  Split big and little endian case.
9111         (signbit<mode>2_dm_mem_le): Likewise.
9112         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9113         (signbit<mode>2_dm2): Likewise.
9115 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9117         * config/rl78/rl78.md (anddi3): New define_expand.
9119 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9121         * config/rl78/rl78.md (umindi3): New define_expand.
9123 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9125         * config/rl78/rl78.md (smindi3): New define_expand.
9127 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9129         * config/rl78/rl78.md (smaxdi3): New define_expand.
9131 2018-01-22  Carl Love  <cel@us.ibm.com>
9133         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9134         LVX_V1TI): Add macro expansion.
9135         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9136         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9137         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9138         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9139         Change check to determine if the instruction is a byte reversing
9140         entry.  Fix typo in comment.
9141         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9142         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9143         Add def_builtin calls for new builtins.
9144         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9145         Add define_insn expansion.
9147 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9149         * config/rl78/rl78.md (umaxdi3): New define_expand.
9151 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9153         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9154         for non-QImode registers.
9156 2018-01-22  Richard Biener  <rguenther@suse.de>
9158         PR tree-optimization/83963
9159         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9160         including the loop exit block.
9161         (scop_detection::merge_sese): Likewise.
9162         (scop_detection::add_scop): Do it here instead.
9164 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9166         * doc/sourcebuild.texi (arm_softfloat): Document.
9168 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9170         PR gcc/77734
9171         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9172         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9173         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9175 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9176             David Edelsohn  <dje.gcc@gmail.com>
9178         PR target/83946
9179         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9180         Change "crset eq" to "crset 2".
9181         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9182         (*call_indirect_aix<mode>_nospec): Likewise.
9183         (*call_value_indirect_aix<mode>_nospec): Likewise.
9184         (*call_indirect_elfv2<mode>_nospec): Likewise.
9185         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9186         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9187         change assembly output from . to $.
9188         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9189         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9190         (*tablejump<mode>_internal1_nospec): Likewise.
9192 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9194         PR target/80870
9195         * config/sh/sh_optimize_sett_clrt.cc:
9196         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9198 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9200         PR tree-optimization/83940
9201         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9202         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9203         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9204         use it to pass back the definition type.
9205         (vect_check_store_rhs): Likewise rhs_dt_out.
9206         (vect_build_gather_load_calls): Add a mask_dt argument and use
9207         it instead of a call to vect_is_simple_use.
9208         (vectorizable_store): Update calls to vect_check_load_store_mask
9209         and vect_check_store_rhs.  Use the dt returned by the latter instead
9210         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9211         instead of calls to vect_is_simple_use.  Pass the scalar rather
9212         than the vector operand to vect_is_simple_use when handling
9213         second and subsequent copies of an rhs value.
9214         (vectorizable_load): Update calls to vect_check_load_store_mask
9215         and vect_build_gather_load_calls.  Use the cached mask_dt and
9216         gs_info.offset_dt instead of calls to vect_is_simple_use.
9218 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9220         PR middle-end/83945
9221         * tree-emutls.c: Include gimplify.h.
9222         (lower_emutls_2): New function.
9223         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9224         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9225         it before further processing.
9227         PR target/83930
9228         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9229         UINTVAL (trueop1) instead of INTVAL (op1).
9231 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9233         PR debug/81570
9234         PR debug/83728
9235         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9236         INCOMING_FRAME_SP_OFFSET if not defined.
9237         (scan_trace): Add ENTRY argument.  If true and
9238         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9239         emit a note to adjust the CFA offset.
9240         (create_cfi_notes): Adjust scan_trace callers.
9241         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9242         INCOMING_FRAME_SP_OFFSET in the CIE.
9243         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9244         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9245         Likewise.
9246         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9247         * doc/tm.texi: Regenerated.
9249 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9251         PR rtl-optimization/83147
9252         * lra-constraints.c (remove_inheritance_pseudos): Use
9253         lra_substitute_pseudo_within_insn.
9255 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9256             Cesar Philippidis  <cesar@codesourcery.com>
9258         PR target/83920
9259         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9261 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9263         PR target/83790
9264         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9265         spaces for function labels.
9267 2018-01-19  Martin Liska  <mliska@suse.cz>
9269         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9270         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9271         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9272         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9273         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9274         (PRED_CONST_RETURN): Change from 69 to 65.
9275         (PRED_NULL_RETURN): Change from 91 to 71.
9276         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9277         (PRED_LOOP_GUARD): Change from 66 to 73.
9279 2018-01-19  Martin Liska  <mliska@suse.cz>
9281         * predict.c (predict_insn_def): Add new assert.
9282         (struct branch_predictor): Change type to signed integer.
9283         (test_prediction_value_range): Amend test to cover
9284         PROB_UNINITIALIZED.
9285         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9286         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9287         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9288         (PRED_LOOP_IV_COMPARE): Likewise.
9289         * predict.h (PROB_UNINITIALIZED): Define new constant.
9291 2018-01-19  Martin Liska  <mliska@suse.cz>
9293         * predict.c (dump_prediction): Add new format for
9294         analyze_brprob.py script which is enabled with -details
9295         suboption.
9296         * profile-count.h (precise_p): New function.
9298 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9300         PR tree-optimization/83922
9301         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9302         there are no statements that need masking.
9303         (vect_active_double_reduction_p): New function.
9304         (vect_analyze_loop_operations): Use it when handling phis that
9305         are not in the loop header.
9307 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9309         PR tree-optimization/83914
9310         * tree-vect-loop.c (vectorizable_induction): Don't convert
9311         init_expr or apply the peeling adjustment for inductions
9312         that are nested within the vectorized loop.
9314 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9316         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9317         instead of NEG.
9319 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9321         PR sanitizer/81715
9322         PR testsuite/83882
9323         * function.h (gimplify_parameters): Add gimple_seq * argument.
9324         * function.c: Include gimple.h and options.h.
9325         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9326         for the added local temporaries if needed.
9327         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9328         if there are any parameter cleanups, wrap whole body into a
9329         try/finally with the cleanups.
9331 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9333         PR target/82964
9334         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9335         Use GET_MODE_CLASS for scalar floating point.
9337 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9339         PR ipa/82256
9340         patch by PaX Team
9341         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9342         Fix call of call_cgraph_insertion_hooks.
9344 2018-01-18  Martin Sebor  <msebor@redhat.com>
9346         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9348 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9350         PR ipa/83619
9351         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9352         frequencies.
9354 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9356         PR other/70268
9357         * common.opt: (-ffile-prefix-map): New option.
9358         * opts.c (common_handle_option): Defer it.
9359         * opts-global.c (handle_common_deferred_options): Handle it.
9360         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9361         * file-prefix-map.h: New file.
9362         (remap_debug_filename, add_debug_prefix_map): ...here.
9363         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9364         * final.c (debug_prefix_map, add_debug_prefix_map
9365         remap_debug_filename): Move to...
9366         * file-prefix-map.c: New file.
9367         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9368         generalize, get rid of alloca(), use strrchr() instead of strchr().
9369         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9370         Implement in terms of add_prefix_map().
9371         (remap_macro_filename, remap_debug_filename): Implement in term of
9372         remap_filename().
9373         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9374         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9375         * dbxout.c: Include file-prefix-map.h.
9376         * varasm.c: Likewise.
9377         * vmsdbgout.c: Likewise.
9378         * xcoffout.c: Likewise.
9379         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9380         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9381         * doc/invoke.texi (-ffile-prefix-map): Document.
9382         (-fdebug-prefix-map): Update description.
9384 2018-01-18  Martin Liska  <mliska@suse.cz>
9386         * config/i386/i386.c (indirect_thunk_name): Document that also
9387         lfence is emitted.
9388         (output_indirect_thunk): Document why both instructions
9389         (pause and lfence) are generated.
9391 2018-01-18  Richard Biener  <rguenther@suse.de>
9393         PR tree-optimization/83887
9394         * graphite-scop-detection.c
9395         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9396         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9397         (scop_detection::merge_sese): Re-implement with a flood-fill
9398         algorithm that properly finds a SESE region if it exists.
9400 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9402         PR c/61240
9403         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9404         pointer_diff optimizations use view_convert instead of convert.
9406 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9408         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9409         Generate different code for -mno-speculate-indirect-jumps.
9410         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9411         (*call_indirect_aix<mode>): Disable for
9412         -mno-speculate-indirect-jumps.
9413         (*call_indirect_aix<mode>_nospec): New define_insn.
9414         (*call_value_indirect_aix<mode>): Disable for
9415         -mno-speculate-indirect-jumps.
9416         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9417         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9418         -mno-speculate-indirect-jumps.
9419         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9421 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9423         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9424         long double type, set the flags for noting the default long double
9425         type, even if we don't pass or return a long double type.
9427 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9429         PR ipa/83051
9430         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9431         failure.
9433 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9435         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9436         support for merge[hl].
9437         (fold_mergehl_helper): New helper function.
9438         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9439         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9440         (altivec_vmrglw_direct): Add xxmrglw insn.
9442 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9444         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9445         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9447 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9449         PR lto/83121
9450         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9451         call the lto_location_cache before reading the
9452         DECL_SOURCE_LOCATION of the types.
9454 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9455             Richard Sandiford  <richard.sandiford@linaro.org>
9457         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9458         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9459         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9460         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9461         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9462         Add declaration.
9463         * config/aarch64/constraints.md (aarch64_movti_operand):
9464         Limit immediates.
9465         * config/aarch64/predicates.md (Uti): Add new constraint.
9467 2018-01-17 Carl Love  <cel@us.ibm.com>
9469         * config/rs6000/vsx.md (define_expand xl_len_r,
9470         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9471         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9472         lxvll.
9473         (define_expand, define_insn): Move the shift left from  the
9474         define_insn to the define_expand for lxvl and stxvl instructions.
9475         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9476         and XL_LEN_R definitions to PURE.
9478 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9480         * config/i386/i386.c (indirect_thunk_name): Declare regno
9481         as unsigned int.  Compare regno with INVALID_REGNUM.
9482         (output_indirect_thunk): Ditto.
9483         (output_indirect_thunk_function): Ditto.
9484         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9485         in the call to output_indirect_thunk_function.
9487 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9489         PR middle-end/83884
9490         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9491         rather than the size of inner_type to determine the stack slot size
9492         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9494 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9496         PR target/83546
9497         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9498         to PTA_SILVERMONT.
9500 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9502         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9503         endian Linux systems to optionally enable multilibs for selecting
9504         the long double type if the user configured an explicit type.
9505         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9506         have no long double multilibs if not defined.
9507         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9508         warn if the user used -mabi={ieee,ibm}longdouble and we built
9509         multilibs for long double.
9510         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9511         appropriate multilib option.
9512         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9513         multilib options.
9514         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9515         for building long double multilibs.
9516         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9518 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
9520         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9521         copies.
9523         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9524         64 bits.
9525         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9526         128 bits.
9528         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
9529         variables.
9531         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
9532         return value.
9534 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9536         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
9537         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
9539 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9541         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
9542         different rtl trees depending on TARGET_64BIT.
9543         (rs6000_gen_lvx): Likewise.
9545 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
9547         * config/visium/visium.md (nop): Tweak comment.
9548         (hazard_nop): Likewise.
9550 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9552         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
9553         -mspeculate-indirect-jumps.
9554         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
9555         for -mno-speculate-indirect-jumps.
9556         (*call_indirect_elfv2<mode>_nospec): New define_insn.
9557         (*call_value_indirect_elfv2<mode>): Disable for
9558         -mno-speculate-indirect-jumps.
9559         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
9560         (indirect_jump): Emit different RTL for
9561         -mno-speculate-indirect-jumps.
9562         (*indirect_jump<mode>): Disable for
9563         -mno-speculate-indirect-jumps.
9564         (*indirect_jump<mode>_nospec): New define_insn.
9565         (tablejump): Emit different RTL for
9566         -mno-speculate-indirect-jumps.
9567         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
9568         (tablejumpsi_nospec): New define_expand.
9569         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
9570         (tablejumpdi_nospec): New define_expand.
9571         (*tablejump<mode>_internal1): Disable for
9572         -mno-speculate-indirect-jumps.
9573         (*tablejump<mode>_internal1_nospec): New define_insn.
9574         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
9575         option.
9577 2018-01-16  Artyom Skrobov tyomitch@gmail.com
9579         * caller-save.c (insert_save): Drop unnecessary parameter.  All
9580         callers updated.
9582 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9583             Richard Biener  <rguenth@suse.de>
9585         PR libgomp/83590
9586         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
9587         return early, inline manually is_gimple_sizepos.  Make sure if we
9588         call gimplify_expr we don't end up with a gimple constant.
9589         * tree.c (variably_modified_type_p): Don't return true for
9590         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
9591         * gimplify.h (is_gimple_sizepos): Remove.
9593 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9595         PR tree-optimization/83857
9596         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
9597         vectorizable_live_operation for pure SLP statements.
9598         (vectorizable_live_operation): Handle PHIs.
9600 2018-01-16  Richard Biener  <rguenther@suse.de>
9602         PR tree-optimization/83867
9603         * tree-vect-stmts.c (vect_transform_stmt): Precompute
9604         nested_in_vect_loop_p since the scalar stmt may get invalidated.
9606 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9608         PR c/83844
9609         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
9610         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
9611         If off is not INTEGER_CST, issue a may not be aligned warning
9612         rather than isn't aligned.  Use isn%'t rather than isn't.
9613         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
9614         into MULT_EXPR.
9615         <case MULT_EXPR>: Improve the case when bottom and one of the
9616         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
9617         operand, in that case check if the other operand is multiple of
9618         bottom divided by the INTEGER_CST operand.
9620 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9622         PR target/83858
9623         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
9624         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
9625         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
9626         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
9627         * config/pa/pa.c (pa_function_arg_advance): Likewise.
9628         (pa_function_arg, pa_arg_partial_bytes): Likewise.
9629         (pa_function_arg_size): New function.
9631 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9633         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
9634         in a separate statement.
9636 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
9638         PR tree-optimization/83847
9639         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
9640         group gathers and scatters.
9642 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
9644         PR rtl-optimization/86620
9645         * params.def (max-sched-ready-insns): Bump minimum value to 1.
9647         PR rtl-optimization/83213
9648         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
9649         to last if both are JUMP_INSNs.
9651         PR tree-optimization/83843
9652         * gimple-ssa-store-merging.c
9653         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
9654         store_immediate_info for bswap/nop orig_stores.
9656 2018-01-15  Andrew Waterman  <andrew@sifive.com>
9658         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
9659         !TARGET_MUL.
9660         <UDIV>: Increase cost if !TARGET_DIV.
9662 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
9664         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
9665         (define_attr "cr_logical_3op"): New.
9666         (cceq_ior_compare): Adjust.
9667         (cceq_ior_compare_complement): Adjust.
9668         (*cceq_rev_compare): Adjust.
9669         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
9670         (is_cracked_insn): Adjust.
9671         (insn_must_be_first_in_group): Adjust.
9672         * config/rs6000/40x.md: Adjust.
9673         * config/rs6000/440.md: Adjust.
9674         * config/rs6000/476.md: Adjust.
9675         * config/rs6000/601.md: Adjust.
9676         * config/rs6000/603.md: Adjust.
9677         * config/rs6000/6xx.md: Adjust.
9678         * config/rs6000/7450.md: Adjust.
9679         * config/rs6000/7xx.md: Adjust.
9680         * config/rs6000/8540.md: Adjust.
9681         * config/rs6000/cell.md: Adjust.
9682         * config/rs6000/e300c2c3.md: Adjust.
9683         * config/rs6000/e500mc.md: Adjust.
9684         * config/rs6000/e500mc64.md: Adjust.
9685         * config/rs6000/e5500.md: Adjust.
9686         * config/rs6000/e6500.md: Adjust.
9687         * config/rs6000/mpc.md: Adjust.
9688         * config/rs6000/power4.md: Adjust.
9689         * config/rs6000/power5.md: Adjust.
9690         * config/rs6000/power6.md: Adjust.
9691         * config/rs6000/power7.md: Adjust.
9692         * config/rs6000/power8.md: Adjust.
9693         * config/rs6000/power9.md: Adjust.
9694         * config/rs6000/rs64.md: Adjust.
9695         * config/rs6000/titan.md: Adjust.
9697 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9699         * config/i386/predicates.md (indirect_branch_operand): Rewrite
9700         ix86_indirect_branch_register logic.
9702 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9704         * config/i386/constraints.md (Bs): Update
9705         ix86_indirect_branch_register check.  Don't check
9706         ix86_indirect_branch_register with GOT_memory_operand.
9707         (Bw): Likewise.
9708         * config/i386/predicates.md (GOT_memory_operand): Don't check
9709         ix86_indirect_branch_register here.
9710         (GOT32_symbol_operand): Likewise.
9712 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9714         * config/i386/predicates.md (constant_call_address_operand):
9715         Rewrite ix86_indirect_branch_register logic.
9716         (sibcall_insn_operand): Likewise.
9718 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9720         * config/i386/constraints.md (Bs): Replace
9721         ix86_indirect_branch_thunk_register with
9722         ix86_indirect_branch_register.
9723         (Bw): Likewise.
9724         * config/i386/i386.md (indirect_jump): Likewise.
9725         (tablejump): Likewise.
9726         (*sibcall_memory): Likewise.
9727         (*sibcall_value_memory): Likewise.
9728         Peepholes of indirect call and jump via memory: Likewise.
9729         * config/i386/i386.opt: Likewise.
9730         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9731         (GOT_memory_operand): Likewise.
9732         (call_insn_operand): Likewise.
9733         (sibcall_insn_operand): Likewise.
9734         (GOT32_symbol_operand): Likewise.
9736 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9738         PR middle-end/83837
9739         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
9740         type rather than type addr's type points to.
9741         (expand_omp_atomic_mutex): Likewise.
9742         (expand_omp_atomic): Likewise.
9744 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
9746         PR target/83839
9747         * config/i386/i386.c (output_indirect_thunk_function): Use
9748         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
9749         for  __x86_return_thunk.
9751 2018-01-15  Richard Biener  <rguenther@suse.de>
9753         PR middle-end/83850
9754         * expmed.c (extract_bit_field_1): Fix typo.
9756 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9758         PR target/83687
9759         * config/arm/iterators.md (VF): New mode iterator.
9760         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
9761         Remove integer-related logic from pattern.
9762         (neon_vabd<mode>_3): Likewise.
9764 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
9766         PR middle-end/82694
9767         * common.opt (fstrict-overflow): No longer an alias.
9768         (fwrapv-pointer): New option.
9769         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
9770         also for pointer types based on flag_wrapv_pointer.
9771         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
9772         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
9773         opts->x_flag_wrapv got set.
9774         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
9775         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
9776         POINTER_TYPE_OVERFLOW_UNDEFINED.
9777         * match.pd: Likewise in address comparison pattern.
9778         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
9780 2018-01-15  Richard Biener  <rguenther@suse.de>
9782         PR lto/83804
9783         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
9784         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
9785         Reset type names to their identifier if their TYPE_DECL doesn't
9786         have linkage (and thus is used for ODR and devirt).
9787         (save_debug_info_for_decl): Remove.
9788         (save_debug_info_for_type): Likewise.
9789         (add_tree_to_fld_list): Adjust.
9790         * tree-pretty-print.c (dump_generic_node): Make dumping of
9791         type names more robust.
9793 2018-01-15  Richard Biener  <rguenther@suse.de>
9795         * BASE-VER: Bump to 8.0.1.
9797 2018-01-14  Martin Sebor  <msebor@redhat.com>
9799         PR other/83508
9800         * builtins.c (check_access): Avoid warning when the no-warning bit
9801         is set.
9803 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
9805         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
9806         * ira-color (allocno_hard_regs_compare): Likewise.
9808 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
9810         PR target/83013
9811         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
9812         Use .pushsection/.popsection.
9814 2018-01-14  Martin Sebor  <msebor@redhat.com>
9816         PR c++/81327
9817         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
9819 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
9821         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
9822         entry from extra_headers.
9823         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
9824         extra_headers, make the list bitwise identical to the i?86-*-* one.
9826 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9828         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
9829         -mcmodel=large with -mindirect-branch=thunk,
9830         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
9831         -mfunction-return=thunk-extern.
9832         * doc/invoke.texi: Document -mcmodel=large is incompatible with
9833         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
9834         -mfunction-return=thunk and -mfunction-return=thunk-extern.
9836 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9838         * config/i386/i386.c (print_reg): Print the name of the full
9839         integer register without '%'.
9840         (ix86_print_operand): Handle 'V'.
9841          * doc/extend.texi: Document 'V' modifier.
9843 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9845         * config/i386/constraints.md (Bs): Disallow memory operand for
9846         -mindirect-branch-register.
9847         (Bw): Likewise.
9848         * config/i386/predicates.md (indirect_branch_operand): Likewise.
9849         (GOT_memory_operand): Likewise.
9850         (call_insn_operand): Likewise.
9851         (sibcall_insn_operand): Likewise.
9852         (GOT32_symbol_operand): Likewise.
9853         * config/i386/i386.md (indirect_jump): Call convert_memory_address
9854         for -mindirect-branch-register.
9855         (tablejump): Likewise.
9856         (*sibcall_memory): Likewise.
9857         (*sibcall_value_memory): Likewise.
9858         Disallow peepholes of indirect call and jump via memory for
9859         -mindirect-branch-register.
9860         (*call_pop): Replace m with Bw.
9861         (*call_value_pop): Likewise.
9862         (*sibcall_pop_memory): Replace m with Bs.
9863         * config/i386/i386.opt (mindirect-branch-register): New option.
9864         * doc/invoke.texi: Document -mindirect-branch-register option.
9866 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9868         * config/i386/i386-protos.h (ix86_output_function_return): New.
9869         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
9870         set function_return_type.
9871         (indirect_thunk_name): Add ret_p to indicate thunk for function
9872         return.
9873         (output_indirect_thunk_function): Pass false to
9874         indirect_thunk_name.
9875         (ix86_output_indirect_branch_via_reg): Likewise.
9876         (ix86_output_indirect_branch_via_push): Likewise.
9877         (output_indirect_thunk_function): Create alias for function
9878         return thunk if regno < 0.
9879         (ix86_output_function_return): New function.
9880         (ix86_handle_fndecl_attribute): Handle function_return.
9881         (ix86_attribute_table): Add function_return.
9882         * config/i386/i386.h (machine_function): Add
9883         function_return_type.
9884         * config/i386/i386.md (simple_return_internal): Use
9885         ix86_output_function_return.
9886         (simple_return_internal_long): Likewise.
9887         * config/i386/i386.opt (mfunction-return=): New option.
9888         (indirect_branch): Mention -mfunction-return=.
9889         * doc/extend.texi: Document function_return function attribute.
9890         * doc/invoke.texi: Document -mfunction-return= option.
9892 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
9894         * config/i386/i386-opts.h (indirect_branch): New.
9895         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
9896         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
9897         with local indirect jump when converting indirect call and jump.
9898         (ix86_set_indirect_branch_type): New.
9899         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
9900         (indirectlabelno): New.
9901         (indirect_thunk_needed): Likewise.
9902         (indirect_thunk_bnd_needed): Likewise.
9903         (indirect_thunks_used): Likewise.
9904         (indirect_thunks_bnd_used): Likewise.
9905         (INDIRECT_LABEL): Likewise.
9906         (indirect_thunk_name): Likewise.
9907         (output_indirect_thunk): Likewise.
9908         (output_indirect_thunk_function): Likewise.
9909         (ix86_output_indirect_branch_via_reg): Likewise.
9910         (ix86_output_indirect_branch_via_push): Likewise.
9911         (ix86_output_indirect_branch): Likewise.
9912         (ix86_output_indirect_jmp): Likewise.
9913         (ix86_code_end): Call output_indirect_thunk_function if needed.
9914         (ix86_output_call_insn): Call ix86_output_indirect_branch if
9915         needed.
9916         (ix86_handle_fndecl_attribute): Handle indirect_branch.
9917         (ix86_attribute_table): Add indirect_branch.
9918         * config/i386/i386.h (machine_function): Add indirect_branch_type
9919         and has_local_indirect_jump.
9920         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
9921         to true.
9922         (tablejump): Likewise.
9923         (*indirect_jump): Use ix86_output_indirect_jmp.
9924         (*tablejump_1): Likewise.
9925         (simple_return_indirect_internal): Likewise.
9926         * config/i386/i386.opt (mindirect-branch=): New option.
9927         (indirect_branch): New.
9928         (keep): Likewise.
9929         (thunk): Likewise.
9930         (thunk-inline): Likewise.
9931         (thunk-extern): Likewise.
9932         * doc/extend.texi: Document indirect_branch function attribute.
9933         * doc/invoke.texi: Document -mindirect-branch= option.
9935 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
9937         PR ipa/83051
9938         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
9940 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
9942         * ipa-inline.c (want_inline_small_function_p): Return false if
9943         inlining has already failed with CIF_FINAL_ERROR.
9944         (update_caller_keys): Call want_inline_small_function_p before
9945         can_inline_edge_p.
9946         (update_callee_keys): Likewise.
9948 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9950         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
9951         New function.
9952         (rs6000_quadword_masked_address_p): Likewise.
9953         (quad_aligned_load_p): Likewise.
9954         (quad_aligned_store_p): Likewise.
9955         (const_load_sequence_p): Add comment to describe the outer-most loop.
9956         (mimic_memory_attributes_and_flags): New function.
9957         (rs6000_gen_stvx): Likewise.
9958         (replace_swapped_aligned_store): Likewise.
9959         (rs6000_gen_lvx): Likewise.
9960         (replace_swapped_aligned_load): Likewise.
9961         (replace_swapped_load_constant): Capitalize argument name in
9962         comment describing this function.
9963         (rs6000_analyze_swaps): Add a third pass to search for vector loads
9964         and stores that access quad-word aligned addresses and replace
9965         with stvx or lvx instructions when appropriate.
9966         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
9967         New function prototype.
9968         (rs6000_quadword_masked_address_p): Likewise.
9969         (rs6000_gen_lvx): Likewise.
9970         (rs6000_gen_stvx): Likewise.
9971         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
9972         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
9973         when memory address is aligned.
9974         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
9975         this split to select lvx instruction when memory address is aligned.
9976         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
9977         instruction when memory address is aligned.
9978         (*vsx_le_perm_load_v16qi): Likewise.
9979         (four unnamed splitters): Modify to select the stvx instruction
9980         when memory is aligned.
9982 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
9984         * predict.c (determine_unlikely_bbs): Handle correctly BBs
9985         which appears in the queue multiple times.
9987 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
9988             Alan Hayward  <alan.hayward@arm.com>
9989             David Sherwood  <david.sherwood@arm.com>
9991         * tree-vectorizer.h (vec_lower_bound): New structure.
9992         (_loop_vec_info): Add check_nonzero and lower_bounds.
9993         (LOOP_VINFO_CHECK_NONZERO): New macro.
9994         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
9995         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
9996         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
9997         fields.  Make seg_len the distance travelled, not including the
9998         access size.
9999         (dr_direction_indicator): Declare.
10000         (dr_zero_step_indicator): Likewise.
10001         (dr_known_forward_stride_p): Likewise.
10002         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10003         tree-ssanames.h.
10004         (runtime_alias_check_p): Allow runtime alias checks with
10005         variable strides.
10006         (operator ==): Compare access_size and align.
10007         (prune_runtime_alias_test_list): Rework for new distinction between
10008         the access_size and seg_len.
10009         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10010         segment lengths.
10011         (get_segment_min_max): New function.
10012         (create_intersect_range_checks): Use it.
10013         (dr_step_indicator): New function.
10014         (dr_direction_indicator): Likewise.
10015         (dr_zero_step_indicator): Likewise.
10016         (dr_known_forward_stride_p): Likewise.
10017         * tree-loop-distribution.c (data_ref_segment_size): Return
10018         DR_STEP * (niters - 1).
10019         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10020         constructor.
10021         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10022         (vect_preserves_scalar_order_p): New function, split out from...
10023         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10024         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10025         (vect_vfa_access_size): New function.
10026         (vect_vfa_align): Likewise.
10027         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10028         (dump_lower_bound): New function.
10029         (vect_check_lower_bound): Likewise.
10030         (vect_small_gap_p): Likewise.
10031         (vectorizable_with_step_bound_p): Likewise.
10032         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10033         depencies if the vectorization factor is 1.  Convert the checks
10034         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10035         a bunds check for variable steps if the minimum required step is
10036         relatively small. Update calls to the dr_with_seg_len
10037         constructor and to vect_compile_time_alias.
10038         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10039         function.
10040         (vect_loop_versioning): Call it.
10041         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10042         when retrying.
10043         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10045 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10046             Alan Hayward  <alan.hayward@arm.com>
10047             David Sherwood  <david.sherwood@arm.com>
10049         * doc/sourcebuild.texi (vect_scatter_store): Document.
10050         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10051         optabs.
10052         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10053         Document.
10054         * genopinit.c (main): Add supports_vec_scatter_store and
10055         supports_vec_scatter_store_cached to target_optabs.
10056         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10057         IFN_MASK_SCATTER_STORE.
10058         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10059         functions.
10060         * internal-fn.h (internal_store_fn_p): Declare.
10061         (internal_fn_stored_value_index): Likewise.
10062         * internal-fn.c (scatter_store_direct): New macro.
10063         (expand_scatter_store_optab_fn): New function.
10064         (direct_scatter_store_optab_supported_p): New macro.
10065         (internal_store_fn_p): New function.
10066         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10067         IFN_MASK_SCATTER_STORE.
10068         (internal_fn_mask_index): Likewise.
10069         (internal_fn_stored_value_index): New function.
10070         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10071         for scatter stores.
10072         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10073         * optabs-query.c (supports_vec_scatter_store_p): New function.
10074         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10075         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10076         true for scatter stores.
10077         (vect_gather_scatter_fn_p): Handle scatter stores too.
10078         (vect_check_gather_scatter): Consider using scatter stores if
10079         supports_vec_scatter_store_p.
10080         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10081         scatter stores too.
10082         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10083         internal_fn_stored_value_index.
10084         (check_load_store_masking): Handle scatter stores too.
10085         (vect_get_store_rhs): Make public.
10086         (vectorizable_call): Use internal_store_fn_p.
10087         (vectorizable_store): Handle scatter store internal functions.
10088         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10089         when deciding whether the end of the group has been reached.
10090         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10091         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10092         (mask_scatter_store<mode>): New insns.
10094 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10095             Alan Hayward  <alan.hayward@arm.com>
10096             David Sherwood  <david.sherwood@arm.com>
10098         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10099         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10100         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10101         function.
10102         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10103         Use vect_truncate_gather_scatter_offset if we can't treat the
10104         operation as a normal gather load or scatter store.
10105         (get_group_load_store_type): Take the gather_scatter_info
10106         as argument.  Try using a gather load or scatter store for
10107         single-element groups.
10108         (get_load_store_type): Update calls to get_group_load_store_type
10109         and vect_use_strided_gather_scatters_p.
10111 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10112             Alan Hayward  <alan.hayward@arm.com>
10113             David Sherwood  <david.sherwood@arm.com>
10115         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10116         optional tree argument.
10117         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10118         null target hooks.
10119         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10120         but continue to use the current value as a fallback.
10121         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10122         to compare the updates.
10123         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10124         (get_load_store_type): Use it when handling a strided access.
10125         (vect_get_strided_load_store_ops): New function.
10126         (vect_get_data_ptr_increment): Likewise.
10127         (vectorizable_load): Handle strided gather loads.  Always pass
10128         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10130 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10131             Alan Hayward  <alan.hayward@arm.com>
10132             David Sherwood  <david.sherwood@arm.com>
10134         * doc/md.texi (gather_load@var{m}): Document.
10135         (mask_gather_load@var{m}): Likewise.
10136         * genopinit.c (main): Add supports_vec_gather_load and
10137         supports_vec_gather_load_cached to target_optabs.
10138         * optabs-tree.c (init_tree_optimization_optabs): Use
10139         ggc_cleared_alloc to allocate target_optabs.
10140         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10141         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10142         functions.
10143         * internal-fn.h (internal_load_fn_p): Declare.
10144         (internal_gather_scatter_fn_p): Likewise.
10145         (internal_fn_mask_index): Likewise.
10146         (internal_gather_scatter_fn_supported_p): Likewise.
10147         * internal-fn.c (gather_load_direct): New macro.
10148         (expand_gather_load_optab_fn): New function.
10149         (direct_gather_load_optab_supported_p): New macro.
10150         (direct_internal_fn_optab): New function.
10151         (internal_load_fn_p): Likewise.
10152         (internal_gather_scatter_fn_p): Likewise.
10153         (internal_fn_mask_index): Likewise.
10154         (internal_gather_scatter_fn_supported_p): Likewise.
10155         * optabs-query.c (supports_at_least_one_mode_p): New function.
10156         (supports_vec_gather_load_p): Likewise.
10157         * optabs-query.h (supports_vec_gather_load_p): Declare.
10158         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10159         and memory_type field.
10160         (NUM_PATTERNS): Bump to 15.
10161         * tree-vect-data-refs.c: Include internal-fn.h.
10162         (vect_gather_scatter_fn_p): New function.
10163         (vect_describe_gather_scatter_call): Likewise.
10164         (vect_check_gather_scatter): Try using internal functions for
10165         gather loads.  Recognize existing calls to a gather load function.
10166         (vect_analyze_data_refs): Consider using gather loads if
10167         supports_vec_gather_load_p.
10168         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10169         (vect_get_gather_scatter_offset_type): Likewise.
10170         (vect_convert_mask_for_vectype): Likewise.
10171         (vect_add_conversion_to_patterm): Likewise.
10172         (vect_try_gather_scatter_pattern): Likewise.
10173         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10174         (vect_vect_recog_func_ptrs): Add it.
10175         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10176         internal_fn_mask_index and internal_gather_scatter_fn_p.
10177         (check_load_store_masking): Take the gather_scatter_info as an
10178         argument and handle gather loads.
10179         (vect_get_gather_scatter_ops): New function.
10180         (vectorizable_call): Check internal_load_fn_p.
10181         (vectorizable_load): Likewise.  Handle gather load internal
10182         functions.
10183         (vectorizable_store): Update call to check_load_store_masking.
10184         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10185         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10186         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10187         (aarch64_gather_scale_operand_d): New predicates.
10188         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10189         (mask_gather_load<mode>): New insns.
10191 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10192             Alan Hayward  <alan.hayward@arm.com>
10193             David Sherwood  <david.sherwood@arm.com>
10195         * optabs.def (fold_left_plus_optab): New optab.
10196         * doc/md.texi (fold_left_plus_@var{m}): Document.
10197         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10198         * internal-fn.c (fold_left_direct): Define.
10199         (expand_fold_left_optab_fn): Likewise.
10200         (direct_fold_left_optab_supported_p): Likewise.
10201         * fold-const-call.c (fold_const_fold_left): New function.
10202         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10203         * tree-parloops.c (valid_reduction_p): New function.
10204         (gather_scalar_reductions): Use it.
10205         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10206         (vect_finish_replace_stmt): Declare.
10207         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10208         (needs_fold_left_reduction_p): New function, split out from...
10209         (vect_is_simple_reduction): ...here.  Accept reductions that
10210         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10211         (vect_force_simple_reduction): Also store the reduction type in
10212         the assignment's STMT_VINFO_REDUC_TYPE.
10213         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10214         (merge_with_identity): New function.
10215         (vect_expand_fold_left): Likewise.
10216         (vectorize_fold_left_reduction): Likewise.
10217         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10218         scalar phi in place for it.  Check for target support and reject
10219         cases that would reassociate the operation.  Defer the transform
10220         phase to vectorize_fold_left_reduction.
10221         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10222         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10223         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10225 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10227         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10228         call to ifc_temp_var.
10230 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10231             Alan Hayward  <alan.hayward@arm.com>
10232             David Sherwood  <david.sherwood@arm.com>
10234         * target.def (legitimize_address_displacement): Take the original
10235         offset as a poly_int.
10236         * targhooks.h (default_legitimize_address_displacement): Update
10237         accordingly.
10238         * targhooks.c (default_legitimize_address_displacement): Likewise.
10239         * doc/tm.texi: Regenerate.
10240         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10241         as an argument, moving assert of ad->disp == ad->disp_term to...
10242         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10243         Try calling targetm.legitimize_address_displacement before expanding
10244         the address rather than afterwards, and adjust for the new interface.
10245         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10246         Match the new hook interface.  Handle SVE addresses.
10247         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10248         new hook interface.
10250 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10252         * Makefile.in (OBJS): Add early-remat.o.
10253         * target.def (select_early_remat_modes): New hook.
10254         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10255         * doc/tm.texi: Regenerate.
10256         * targhooks.h (default_select_early_remat_modes): Declare.
10257         * targhooks.c (default_select_early_remat_modes): New function.
10258         * timevar.def (TV_EARLY_REMAT): New timevar.
10259         * passes.def (pass_early_remat): New pass.
10260         * tree-pass.h (make_pass_early_remat): Declare.
10261         * early-remat.c: New file.
10262         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10263         function.
10264         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10266 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10267             Alan Hayward  <alan.hayward@arm.com>
10268             David Sherwood  <david.sherwood@arm.com>
10270         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10271         vfm1 with a bound_epilog parameter.
10272         (vect_do_peeling): Update calls accordingly, and move the prologue
10273         call earlier in the function.  Treat the base bound_epilog as 0 for
10274         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10275         this base when peeling for gaps.
10276         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10277         with fully-masked loops.
10278         (vect_estimate_min_profitable_iters): Handle the single peeled
10279         iteration in that case.
10281 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10282             Alan Hayward  <alan.hayward@arm.com>
10283             David Sherwood  <david.sherwood@arm.com>
10285         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10286         single-element interleaving even if the size is not a power of 2.
10287         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10288         accesses for single-element interleaving if the group size is
10289         not a power of 2.
10291 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10292             Alan Hayward  <alan.hayward@arm.com>
10293             David Sherwood  <david.sherwood@arm.com>
10295         * doc/md.texi (fold_extract_last_@var{m}): Document.
10296         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10297         * optabs.def (fold_extract_last_optab): New optab.
10298         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10299         * internal-fn.c (fold_extract_direct): New macro.
10300         (expand_fold_extract_optab_fn): Likewise.
10301         (direct_fold_extract_optab_supported_p): Likewise.
10302         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10303         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10304         EXTRACT_LAST_REDUCTION.
10305         (get_initial_def_for_reduction): Do not create an initial vector
10306         for EXTRACT_LAST_REDUCTION reductions.
10307         (vectorizable_reduction): Leave the scalar phi in place for
10308         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10309         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10310         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10311         transform phase to vectorizable_condition.
10312         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10313         split out from...
10314         (vect_finish_stmt_generation): ...here.
10315         (vect_finish_replace_stmt): New function.
10316         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10317         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10318         pattern.
10319         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10321 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10322             Alan Hayward  <alan.hayward@arm.com>
10323             David Sherwood  <david.sherwood@arm.com>
10325         * doc/md.texi (extract_last_@var{m}): Document.
10326         * optabs.def (extract_last_optab): New optab.
10327         * internal-fn.def (EXTRACT_LAST): New internal function.
10328         * internal-fn.c (cond_unary_direct): New macro.
10329         (expand_cond_unary_optab_fn): Likewise.
10330         (direct_cond_unary_optab_supported_p): Likewise.
10331         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10332         loops using EXTRACT_LAST.
10333         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10334         (extract_last_<mode>): ...this optab.
10335         (vec_extract<mode><Vel>): Update accordingly.
10337 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10338             Alan Hayward  <alan.hayward@arm.com>
10339             David Sherwood  <david.sherwood@arm.com>
10341         * target.def (empty_mask_is_expensive): New hook.
10342         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10343         * doc/tm.texi: Regenerate.
10344         * targhooks.h (default_empty_mask_is_expensive): Declare.
10345         * targhooks.c (default_empty_mask_is_expensive): New function.
10346         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10347         if the target says that empty masks are expensive.
10348         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10349         New function.
10350         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10352 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10353             Alan Hayward  <alan.hayward@arm.com>
10354             David Sherwood  <david.sherwood@arm.com>
10356         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10357         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10358         (vect_use_loop_mask_for_alignment_p): New function.
10359         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10360         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10361         niters_skip argument.  Make sure that the first niters_skip elements
10362         of the first iteration are inactive.
10363         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10364         Update call to vect_set_loop_masks_directly.
10365         (get_misalign_in_elems): New function, split out from...
10366         (vect_gen_prolog_loop_niters): ...here.
10367         (vect_update_init_of_dr): Take a code argument that specifies whether
10368         the adjustment should be added or subtracted.
10369         (vect_update_init_of_drs): Likewise.
10370         (vect_prepare_for_masked_peels): New function.
10371         (vect_do_peeling): Skip prologue peeling if we're using a mask
10372         instead.  Update call to vect_update_inits_of_drs.
10373         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10374         mask_skip_niters.
10375         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10376         alignment.  Do not include the number of peeled iterations in
10377         the minimum threshold in that case.
10378         (vectorizable_induction): Adjust the start value down by
10379         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10380         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10381         Take the number of skipped iterations into account when calculating
10382         the loop bounds.
10383         * tree-vect-stmts.c (vect_gen_while_not): New function.
10385 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10386             Alan Hayward  <alan.hayward@arm.com>
10387             David Sherwood  <david.sherwood@arm.com>
10389         * doc/sourcebuild.texi (vect_fully_masked): Document.
10390         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10391         default value to 0.
10392         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10393         split out from...
10394         (vect_analyze_loop_2): ...here. Don't check the vectorization
10395         factor against the number of loop iterations if the loop is
10396         fully-masked.
10398 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10399             Alan Hayward  <alan.hayward@arm.com>
10400             David Sherwood  <david.sherwood@arm.com>
10402         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10403         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10404         (dump_groups): Update accordingly.
10405         (iv_use::mem_type): New member variable.
10406         (address_p): New function.
10407         (record_use): Add a mem_type argument and initialize the new
10408         mem_type field.
10409         (record_group_use): Add a mem_type argument.  Use address_p.
10410         Remove obsolete null checks of base_object.  Update call to record_use.
10411         (find_interesting_uses_op): Update call to record_group_use.
10412         (find_interesting_uses_cond): Likewise.
10413         (find_interesting_uses_address): Likewise.
10414         (get_mem_type_for_internal_fn): New function.
10415         (find_address_like_use): Likewise.
10416         (find_interesting_uses_stmt): Try find_address_like_use before
10417         calling find_interesting_uses_op.
10418         (addr_offset_valid_p): Use the iv mem_type field as the type
10419         of the addressed memory.
10420         (add_autoinc_candidates): Likewise.
10421         (get_address_cost): Likewise.
10422         (split_small_address_groups_p): Use address_p.
10423         (split_address_groups): Likewise.
10424         (add_iv_candidate_for_use): Likewise.
10425         (autoinc_possible_for_pair): Likewise.
10426         (rewrite_groups): Likewise.
10427         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10428         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10429         (get_alias_ptr_type_for_ptr_address): New function.
10430         (rewrite_use_address): Rewrite address uses in calls that were
10431         identified by find_address_like_use.
10433 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10434             Alan Hayward  <alan.hayward@arm.com>
10435             David Sherwood  <david.sherwood@arm.com>
10437         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10438         TARGET_MEM_REFs.
10439         * gimple-expr.h (is_gimple_addressable: Likewise.
10440         * gimple-expr.c (is_gimple_address): Likewise.
10441         * internal-fn.c (expand_call_mem_ref): New function.
10442         (expand_mask_load_optab_fn): Use it.
10443         (expand_mask_store_optab_fn): Likewise.
10445 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10446             Alan Hayward  <alan.hayward@arm.com>
10447             David Sherwood  <david.sherwood@arm.com>
10449         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10450         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10451         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10452         (cond_umax@var{mode}): Document.
10453         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10454         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10455         (cond_umin_optab, cond_umax_optab): New optabs.
10456         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10457         (COND_IOR, COND_XOR): New internal functions.
10458         * internal-fn.h (get_conditional_internal_fn): Declare.
10459         * internal-fn.c (cond_binary_direct): New macro.
10460         (expand_cond_binary_optab_fn): Likewise.
10461         (direct_cond_binary_optab_supported_p): Likewise.
10462         (get_conditional_internal_fn): New function.
10463         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10464         Cope with reduction statements that are vectorized as calls rather
10465         than assignments.
10466         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10467         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10468         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10469         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10470         (UNSPEC_COND_EOR): New unspecs.
10471         (optab): Add mappings for them.
10472         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10473         (sve_int_op, sve_fp_op): New int attributes.
10475 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10476             Alan Hayward  <alan.hayward@arm.com>
10477             David Sherwood  <david.sherwood@arm.com>
10479         * optabs.def (while_ult_optab): New optab.
10480         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10481         * internal-fn.def (WHILE_ULT): New internal function.
10482         * internal-fn.h (direct_internal_fn_supported_p): New override
10483         that takes two types as argument.
10484         * internal-fn.c (while_direct): New macro.
10485         (expand_while_optab_fn): New function.
10486         (convert_optab_supported_p): Likewise.
10487         (direct_while_optab_supported_p): New macro.
10488         * wide-int.h (wi::udiv_ceil): New function.
10489         * tree-vectorizer.h (rgroup_masks): New structure.
10490         (vec_loop_masks): New typedef.
10491         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10492         and fully_masked_p.
10493         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10494         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10495         (vect_max_vf): New function.
10496         (slpeel_make_loop_iterate_ntimes): Delete.
10497         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10498         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10499         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10500         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10501         internal-fn.h, stor-layout.h and optabs-query.h.
10502         (vect_set_loop_mask): New function.
10503         (add_preheader_seq): Likewise.
10504         (add_header_seq): Likewise.
10505         (interleave_supported_p): Likewise.
10506         (vect_maybe_permute_loop_masks): Likewise.
10507         (vect_set_loop_masks_directly): Likewise.
10508         (vect_set_loop_condition_masked): Likewise.
10509         (vect_set_loop_condition_unmasked): New function, split out from
10510         slpeel_make_loop_iterate_ntimes.
10511         (slpeel_make_loop_iterate_ntimes): Rename to..
10512         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10513         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10514         (vect_do_peeling): Update call accordingly.
10515         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10516         loops.
10517         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10518         mask_compare_type, can_fully_mask_p and fully_masked_p.
10519         (release_vec_loop_masks): New function.
10520         (_loop_vec_info): Use it to free the loop masks.
10521         (can_produce_all_loop_masks_p): New function.
10522         (vect_get_max_nscalars_per_iter): Likewise.
10523         (vect_verify_full_masking): Likewise.
10524         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10525         retries, and free the mask rgroups before retrying.  Check loop-wide
10526         reasons for disallowing fully-masked loops.  Make the final decision
10527         about whether use a fully-masked loop or not.
10528         (vect_estimate_min_profitable_iters): Do not assume that peeling
10529         for the number of iterations will be needed for fully-masked loops.
10530         (vectorizable_reduction): Disable fully-masked loops.
10531         (vectorizable_live_operation): Likewise.
10532         (vect_halve_mask_nunits): New function.
10533         (vect_double_mask_nunits): Likewise.
10534         (vect_record_loop_mask): Likewise.
10535         (vect_get_loop_mask): Likewise.
10536         (vect_transform_loop): Handle the case in which the final loop
10537         iteration might handle a partial vector.  Call vect_set_loop_condition
10538         instead of slpeel_make_loop_iterate_ntimes.
10539         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
10540         (check_load_store_masking): New function.
10541         (prepare_load_store_mask): Likewise.
10542         (vectorizable_store): Handle fully-masked loops.
10543         (vectorizable_load): Likewise.
10544         (supportable_widening_operation): Use vect_halve_mask_nunits for
10545         booleans.
10546         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
10547         (vect_gen_while): New function.
10548         * config/aarch64/aarch64.md (umax<mode>3): New expander.
10549         (aarch64_uqdec<mode>): New insn.
10551 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10552             Alan Hayward  <alan.hayward@arm.com>
10553             David Sherwood  <david.sherwood@arm.com>
10555         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
10556         (reduc_xor_scal_optab): New optabs.
10557         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
10558         (reduc_xor_scal_@var{m}): Document.
10559         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
10560         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
10561         internal functions.
10562         * fold-const-call.c (fold_const_call): Handle them.
10563         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
10564         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
10565         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
10566         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
10567         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
10568         (UNSPEC_XORV): New unspecs.
10569         (optab): Add entries for them.
10570         (BITWISEV): New int iterator.
10571         (bit_reduc_op): New int attributes.
10573 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10574             Alan Hayward  <alan.hayward@arm.com>
10575             David Sherwood  <david.sherwood@arm.com>
10577         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
10578         * internal-fn.def (VEC_SHL_INSERT): New internal function.
10579         * optabs.def (vec_shl_insert_optab): New optab.
10580         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
10581         (duplicate_and_interleave): Likewise.
10582         * tree-vect-loop.c: Include internal-fn.h.
10583         (neutral_op_for_slp_reduction): New function, split out from
10584         get_initial_defs_for_reduction.
10585         (get_initial_def_for_reduction): Handle option 2 for variable-length
10586         vectors by loading the neutral value into a vector and then shifting
10587         the initial value into element 0.
10588         (get_initial_defs_for_reduction): Replace the code argument with
10589         the neutral value calculated by neutral_op_for_slp_reduction.
10590         Use gimple_build_vector for constant-length vectors.
10591         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
10592         but the first group_size elements have a neutral value.
10593         Use duplicate_and_interleave otherwise.
10594         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
10595         Update call to get_initial_defs_for_reduction.  Handle SLP
10596         reductions for variable-length vectors by creating one vector
10597         result for each scalar result, with the elements associated
10598         with other scalar results stubbed out with the neutral value.
10599         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
10600         Require IFN_VEC_SHL_INSERT for double reductions on
10601         variable-length vectors, or SLP reductions that have
10602         a neutral value.  Require can_duplicate_and_interleave_p
10603         support for variable-length unchained SLP reductions if there
10604         is no neutral value, such as for MIN/MAX reductions.  Also require
10605         the number of vector elements to be a multiple of the number of
10606         SLP statements when doing variable-length unchained SLP reductions.
10607         Update call to vect_create_epilog_for_reduction.
10608         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
10609         and remove initial values.
10610         (duplicate_and_interleave): Make public.
10611         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
10612         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
10614 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10615             Alan Hayward  <alan.hayward@arm.com>
10616             David Sherwood  <david.sherwood@arm.com>
10618         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
10619         (can_duplicate_and_interleave_p): New function.
10620         (vect_get_and_check_slp_defs): Take the vector of statements
10621         rather than just the current one.  Remove excess parentheses.
10622         Restriction rejectinon of vect_constant_def and vect_external_def
10623         for variable-length vectors to boolean types, or types for which
10624         can_duplicate_and_interleave_p is false.
10625         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
10626         (duplicate_and_interleave): New function.
10627         (vect_get_constant_vectors): Use gimple_build_vector for
10628         constant-length vectors and suitable variable-length constant
10629         vectors.  Use duplicate_and_interleave for other variable-length
10630         vectors.  Don't defer the update when inserting new statements.
10632 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10633             Alan Hayward  <alan.hayward@arm.com>
10634             David Sherwood  <david.sherwood@arm.com>
10636         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
10637         min_profitable_iters doesn't go negative.
10639 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10640             Alan Hayward  <alan.hayward@arm.com>
10641             David Sherwood  <david.sherwood@arm.com>
10643         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
10644         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
10645         * optabs.def (vec_mask_load_lanes_optab): New optab.
10646         (vec_mask_store_lanes_optab): Likewise.
10647         * internal-fn.def (MASK_LOAD_LANES): New internal function.
10648         (MASK_STORE_LANES): Likewise.
10649         * internal-fn.c (mask_load_lanes_direct): New macro.
10650         (mask_store_lanes_direct): Likewise.
10651         (expand_mask_load_optab_fn): Handle masked operations.
10652         (expand_mask_load_lanes_optab_fn): New macro.
10653         (expand_mask_store_optab_fn): Handle masked operations.
10654         (expand_mask_store_lanes_optab_fn): New macro.
10655         (direct_mask_load_lanes_optab_supported_p): Likewise.
10656         (direct_mask_store_lanes_optab_supported_p): Likewise.
10657         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
10658         parameter.
10659         (vect_load_lanes_supported): Likewise.
10660         * tree-vect-data-refs.c (strip_conversion): New function.
10661         (can_group_stmts_p): Likewise.
10662         (vect_analyze_data_ref_accesses): Use it instead of checking
10663         for a pair of assignments.
10664         (vect_store_lanes_supported): Take a masked_p parameter.
10665         (vect_load_lanes_supported): Likewise.
10666         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
10667         vect_store_lanes_supported and vect_load_lanes_supported.
10668         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10669         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
10670         parameter.  Don't allow gaps for masked accesses.
10671         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
10672         and vect_load_lanes_supported.
10673         (get_load_store_type): Take a masked_p parameter and update
10674         call to get_group_load_store_type.
10675         (vectorizable_store): Update call to get_load_store_type.
10676         Handle IFN_MASK_STORE_LANES.
10677         (vectorizable_load): Update call to get_load_store_type.
10678         Handle IFN_MASK_LOAD_LANES.
10680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10681             Alan Hayward  <alan.hayward@arm.com>
10682             David Sherwood  <david.sherwood@arm.com>
10684         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
10685         modes for SVE.
10686         * config/aarch64/aarch64-protos.h
10687         (aarch64_sve_struct_memory_operand_p): Declare.
10688         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
10689         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
10690         (VPRED, vpred): Handle SVE structure modes.
10691         * config/aarch64/constraints.md (Utx): New constraint.
10692         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
10693         (aarch64_sve_struct_nonimmediate_operand): New predicates.
10694         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
10695         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
10696         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
10697         structure modes.  Split into pieces after RA.
10698         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
10699         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
10700         New patterns.
10701         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
10702         SVE structure modes.
10703         (aarch64_classify_address): Likewise.
10704         (sizetochar): Move earlier in file.
10705         (aarch64_print_operand): Handle SVE register lists.
10706         (aarch64_array_mode): New function.
10707         (aarch64_sve_struct_memory_operand_p): Likewise.
10708         (TARGET_ARRAY_MODE): Redefine.
10710 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10711             Alan Hayward  <alan.hayward@arm.com>
10712             David Sherwood  <david.sherwood@arm.com>
10714         * target.def (array_mode): New target hook.
10715         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
10716         * doc/tm.texi: Regenerate.
10717         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
10718         * hooks.c (hook_optmode_mode_uhwi_none): New function.
10719         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
10720         targetm.array_mode.
10721         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
10722         type sizes.
10724 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10725             Alan Hayward  <alan.hayward@arm.com>
10726             David Sherwood  <david.sherwood@arm.com>
10728         * fold-const.c (fold_binary_loc): Check the argument types
10729         rather than the result type when testing for a vector operation.
10731 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10733         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
10734         * doc/tm.texi: Regenerate.
10736 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10737             Alan Hayward  <alan.hayward@arm.com>
10738             David Sherwood  <david.sherwood@arm.com>
10740         * doc/invoke.texi (-msve-vector-bits=): Document new option.
10741         (sve): Document new AArch64 extension.
10742         * doc/md.texi (w): Extend the description of the AArch64
10743         constraint to include SVE vectors.
10744         (Upl, Upa): Document new AArch64 predicate constraints.
10745         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
10746         enum.
10747         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
10748         (msve-vector-bits=): New option.
10749         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
10750         SVE when these are disabled.
10751         (sve): New extension.
10752         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
10753         modes.  Adjust their number of units based on aarch64_sve_vg.
10754         (MAX_BITSIZE_MODE_ANY_MODE): Define.
10755         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
10756         aarch64_addr_query_type.
10757         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
10758         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
10759         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
10760         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
10761         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
10762         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
10763         (aarch64_simd_imm_zero_p): Delete.
10764         (aarch64_check_zero_based_sve_index_immediate): Declare.
10765         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10766         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10767         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10768         (aarch64_sve_float_mul_immediate_p): Likewise.
10769         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10770         rather than an rtx.
10771         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
10772         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
10773         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
10774         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
10775         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
10776         (aarch64_regmode_natural_size): Likewise.
10777         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
10778         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
10779         left one place.
10780         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
10781         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
10782         for VG and the SVE predicate registers.
10783         (V_ALIASES): Add a "z"-prefixed alias.
10784         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
10785         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
10786         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
10787         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
10788         (REG_CLASS_NAMES): Add entries for them.
10789         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
10790         and the predicate registers.
10791         (aarch64_sve_vg): Declare.
10792         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
10793         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
10794         (REGMODE_NATURAL_SIZE): Define.
10795         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
10796         SVE macros.
10797         * config/aarch64/aarch64.c: Include cfgrtl.h.
10798         (simd_immediate_info): Add a constructor for series vectors,
10799         and an associated step field.
10800         (aarch64_sve_vg): New variable.
10801         (aarch64_dbx_register_number): Handle VG and the predicate registers.
10802         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
10803         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
10804         (VEC_ANY_DATA, VEC_STRUCT): New constants.
10805         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
10806         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
10807         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
10808         (aarch64_get_mask_mode): New functions.
10809         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
10810         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
10811         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
10812         predicate modes and predicate registers.  Explicitly restrict
10813         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
10814         to store a vector mode if it is recognized by
10815         aarch64_classify_vector_mode.
10816         (aarch64_regmode_natural_size): New function.
10817         (aarch64_hard_regno_caller_save_mode): Return the original mode
10818         for predicates.
10819         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
10820         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
10821         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
10822         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
10823         functions.
10824         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
10825         does not overlap dest if the function is frame-related.  Handle
10826         SVE constants.
10827         (aarch64_split_add_offset): New function.
10828         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
10829         them aarch64_add_offset.
10830         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
10831         and update call to aarch64_sub_sp.
10832         (aarch64_add_cfa_expression): New function.
10833         (aarch64_expand_prologue): Pass extra temporary registers to the
10834         functions above.  Handle the case in which we need to emit new
10835         DW_CFA_expressions for registers that were originally saved
10836         relative to the stack pointer, but now have to be expressed
10837         relative to the frame pointer.
10838         (aarch64_output_mi_thunk): Pass extra temporary registers to the
10839         functions above.
10840         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
10841         IP0 and IP1 values for SVE frames.
10842         (aarch64_expand_vec_series): New function.
10843         (aarch64_expand_sve_widened_duplicate): Likewise.
10844         (aarch64_expand_sve_const_vector): Likewise.
10845         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
10846         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
10847         into the register, rather than emitting a SET directly.
10848         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
10849         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
10850         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
10851         (offset_9bit_signed_scaled_p): New functions.
10852         (aarch64_replicate_bitmask_imm): New function.
10853         (aarch64_bitmask_imm): Use it.
10854         (aarch64_cannot_force_const_mem): Reject expressions involving
10855         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
10856         (aarch64_classify_index): Handle SVE indices, by requiring
10857         a plain register index with a scale that matches the element size.
10858         (aarch64_classify_address): Handle SVE addresses.  Assert that
10859         the mode of the address is VOIDmode or an integer mode.
10860         Update call to aarch64_classify_symbol.
10861         (aarch64_classify_symbolic_expression): Update call to
10862         aarch64_classify_symbol.
10863         (aarch64_const_vec_all_in_range_p): New function.
10864         (aarch64_print_vector_float_operand): Likewise.
10865         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
10866         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
10867         and the FP immediates 1.0 and 0.5.
10868         (aarch64_print_address_internal): Handle SVE addresses.
10869         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
10870         (aarch64_regno_regclass): Handle predicate registers.
10871         (aarch64_secondary_reload): Handle big-endian reloads of SVE
10872         data modes.
10873         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
10874         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
10875         (aarch64_convert_sve_vector_bits): New function.
10876         (aarch64_override_options): Use it to handle -msve-vector-bits=.
10877         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
10878         rather than an rtx.
10879         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
10880         Handle SVE vector and predicate modes.  Accept VL-based constants
10881         that need only one temporary register, and VL offsets that require
10882         no temporary registers.
10883         (aarch64_conditional_register_usage): Mark the predicate registers
10884         as fixed if SVE isn't available.
10885         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
10886         Return true for SVE vector and predicate modes.
10887         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
10888         rather than an unsigned int.  Handle SVE modes.
10889         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
10890         SVE modes.
10891         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
10892         if SVE is enabled.
10893         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10894         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10895         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10896         (aarch64_sve_float_mul_immediate_p): New functions.
10897         (aarch64_sve_valid_immediate): New function.
10898         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
10899         Explicitly reject structure modes.  Check for INDEX constants.
10900         Handle PTRUE and PFALSE constants.
10901         (aarch64_check_zero_based_sve_index_immediate): New function.
10902         (aarch64_simd_imm_zero_p): Delete.
10903         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
10904         vector modes.  Accept constants in the range of CNT[BHWD].
10905         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
10906         ask for an Advanced SIMD mode.
10907         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
10908         (aarch64_simd_vector_alignment): Handle SVE predicates.
10909         (aarch64_vectorize_preferred_vector_alignment): New function.
10910         (aarch64_simd_vector_alignment_reachable): Use it instead of
10911         the vector size.
10912         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
10913         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
10914         functions.
10915         (MAX_VECT_LEN): Delete.
10916         (expand_vec_perm_d): Add a vec_flags field.
10917         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
10918         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
10919         (aarch64_evpc_ext): Don't apply a big-endian lane correction
10920         for SVE modes.
10921         (aarch64_evpc_rev): Rename to...
10922         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
10923         (aarch64_evpc_rev_global): New function.
10924         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
10925         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
10926         MAX_VECT_LEN.
10927         (aarch64_evpc_sve_tbl): New function.
10928         (aarch64_expand_vec_perm_const_1): Update after rename of
10929         aarch64_evpc_rev.  Handle SVE permutes too, trying
10930         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
10931         than aarch64_evpc_tbl.
10932         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
10933         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
10934         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
10935         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
10936         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
10937         (aarch64_expand_sve_vcond): New functions.
10938         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
10939         of aarch64_vector_mode_p.
10940         (aarch64_dwarf_poly_indeterminate_value): New function.
10941         (aarch64_compute_pressure_classes): Likewise.
10942         (aarch64_can_change_mode_class): Likewise.
10943         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
10944         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
10945         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
10946         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
10947         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
10948         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
10949         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
10950         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
10951         constraints.
10952         (Dn, Dl, Dr): Accept const as well as const_vector.
10953         (Dz): Likewise.  Compare against CONST0_RTX.
10954         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
10955         of "vector" where appropriate.
10956         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
10957         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
10958         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
10959         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
10960         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
10961         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
10962         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
10963         (v_int_equiv): Extend to SVE modes.
10964         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
10965         mode attributes.
10966         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
10967         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
10968         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
10969         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
10970         (SVE_COND_FP_CMP): New int iterators.
10971         (perm_hilo): Handle the new unpack unspecs.
10972         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
10973         attributes.
10974         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
10975         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
10976         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
10977         (aarch64_equality_operator, aarch64_constant_vector_operand)
10978         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
10979         (aarch64_sve_nonimmediate_operand): Likewise.
10980         (aarch64_sve_general_operand): Likewise.
10981         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
10982         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
10983         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
10984         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
10985         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
10986         (aarch64_sve_float_arith_immediate): Likewise.
10987         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
10988         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
10989         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
10990         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
10991         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
10992         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
10993         (aarch64_sve_float_arith_operand): Likewise.
10994         (aarch64_sve_float_arith_with_sub_operand): Likewise.
10995         (aarch64_sve_float_mul_operand): Likewise.
10996         (aarch64_sve_vec_perm_operand): Likewise.
10997         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
10998         (aarch64_mov_operand): Accept const_poly_int and const_vector.
10999         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11000         as well as const_vector.
11001         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11002         in file.  Use CONST0_RTX and CONSTM1_RTX.
11003         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11004         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11005         Use aarch64_simd_imm_zero.
11006         * config/aarch64/aarch64-sve.md: New file.
11007         * config/aarch64/aarch64.md: Include it.
11008         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11009         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11010         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11011         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11012         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11013         (sve): New attribute.
11014         (enabled): Disable instructions with the sve attribute unless
11015         TARGET_SVE.
11016         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11017         aarch64_expand_mov_immediate.
11018         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11019         CNT[BHSD] immediates.
11020         (movti): Split CONST_POLY_INT moves into two halves.
11021         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11022         Split additions that need a temporary here if the destination
11023         is the stack pointer.
11024         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11025         (*add<mode>3_poly_1): New instruction.
11026         (set_clobber_cc): New expander.
11028 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11030         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11031         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11032         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11033         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11034         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11035         Change innermode from fixed_mode_size to machine_mode.
11036         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11037         subreg of a variable-length CONST_VECTOR.
11039 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11040             Alan Hayward  <alan.hayward@arm.com>
11041             David Sherwood  <david.sherwood@arm.com>
11043         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11044         (add_offset_to_base): New function, split out from...
11045         (create_mem_ref): ...here.  When handling a scale other than 1,
11046         check first whether the address is valid without the offset.
11047         Add it into the base if so, leaving the index and scale as-is.
11049 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11051         PR c++/83778
11052         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11053         fold_for_warn before checking if arg2 is INTEGER_CST.
11055 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11057         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11058         (store_multiple_operation): Delete.
11059         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11060         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11061         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11062         guarded by TARGET_STRING.
11063         (rs6000_output_load_multiple): Delete.
11064         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11065         OPTION_MASK_STRING / TARGET_STRING handling.
11066         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11067         (const rs6000_opt_masks) <"string">: Change mask to 0.
11068         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11069         (MASK_STRING): Delete.
11070         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11071         parts.  Simplify.
11072         (load_multiple): Delete.
11073         (*ldmsi8): Delete.
11074         (*ldmsi7): Delete.
11075         (*ldmsi6): Delete.
11076         (*ldmsi5): Delete.
11077         (*ldmsi4): Delete.
11078         (*ldmsi3): Delete.
11079         (store_multiple): Delete.
11080         (*stmsi8): Delete.
11081         (*stmsi7): Delete.
11082         (*stmsi6): Delete.
11083         (*stmsi5): Delete.
11084         (*stmsi4): Delete.
11085         (*stmsi3): Delete.
11086         (movmemsi_8reg): Delete.
11087         (corresponding unnamed define_insn): Delete.
11088         (movmemsi_6reg): Delete.
11089         (corresponding unnamed define_insn): Delete.
11090         (movmemsi_4reg): Delete.
11091         (corresponding unnamed define_insn): Delete.
11092         (movmemsi_2reg): Delete.
11093         (corresponding unnamed define_insn): Delete.
11094         (movmemsi_1reg): Delete.
11095         (corresponding unnamed define_insn): Delete.
11096         * config/rs6000/rs6000.opt (mno-string): New.
11097         (mstring): Replace by deprecation warning stub.
11098         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11100 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11102         * regrename.c (regrename_do_replace): If replacing the same
11103         reg multiple times, try to reuse last created gen_raw_REG.
11105         PR debug/81155
11106         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11107         main to workaround a bug in GDB.
11109 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11111         PR target/83737
11112         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11114 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11116         PR rtl-optimization/80481
11117         * ira-color.c (get_cap_member): New function.
11118         (allocnos_conflict_by_live_ranges_p): Use it.
11119         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11120         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11122 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11124         PR target/83628
11125         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11126         (*saddl_se_1): Ditto.
11127         (*ssubsi_1): Ditto.
11128         (*ssubl_se_1): Ditto.
11130 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11132         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11133         rather than wi::to_widest for DR_INITs.
11134         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11135         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11136         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11137         INTEGER_CSTs.
11138         (vect_analyze_group_access_1): Note that here.
11140 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11142         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11143         polynomial type sizes.
11145 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11147         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11148         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11149         (gimple_add_tmp_var): Likewise.
11151 2018-01-12  Martin Liska  <mliska@suse.cz>
11153         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11154         (gimple_alloc_sizes): Likewise.
11155         (dump_gimple_statistics): Use PRIu64 in printf format.
11156         * gimple.h: Change uint64_t to int.
11158 2018-01-12  Martin Liska  <mliska@suse.cz>
11160         * tree-core.h: Use uint64_t instead of int.
11161         * tree.c (tree_node_counts): Likewise.
11162         (tree_node_sizes): Likewise.
11163         (dump_tree_statistics): Use PRIu64 in printf format.
11165 2018-01-12  Martin Liska  <mliska@suse.cz>
11167         * Makefile.in: As qsort_chk is implemented in vec.c, add
11168         vec.o to linkage of gencfn-macros.
11169         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11170         passing the info to record_node_allocation_statistics.
11171         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11172         and pass the info.
11173         * ggc-common.c (struct ggc_usage): Add operator== and use
11174         it in operator< and compare function.
11175         * mem-stats.h (struct mem_usage): Likewise.
11176         * vec.c (struct vec_usage): Remove operator< and compare
11177         function. Can be simply inherited.
11179 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11181         PR target/81616
11182         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11183         * tree-ssa-math-opts.c: Include domwalk.h.
11184         (convert_mult_to_fma_1): New function.
11185         (fma_transformation_info): New type.
11186         (fma_deferring_state): Likewise.
11187         (cancel_fma_deferring): New function.
11188         (result_of_phi): Likewise.
11189         (last_fma_candidate_feeds_initial_phi): Likewise.
11190         (convert_mult_to_fma): Added deferring logic, split actual
11191         transformation to convert_mult_to_fma_1.
11192         (math_opts_dom_walker): New type.
11193         (math_opts_dom_walker::after_dom_children): New method, body moved
11194         here from pass_optimize_widening_mul::execute, added deferring logic
11195         bits.
11196         (pass_optimize_widening_mul::execute): Moved most of code to
11197         math_opts_dom_walker::after_dom_children.
11198         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11199         * config/i386/i386.c (ix86_option_override_internal): Added
11200         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11202 2018-01-12  Richard Biener  <rguenther@suse.de>
11204         PR debug/83157
11205         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11206         inline instance vars.
11208 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11210         PR target/81819
11211         * config/rx/rx.c (rx_is_restricted_memory_address):
11212         Handle SUBREG case.
11214 2018-01-12  Richard Biener  <rguenther@suse.de>
11216         PR tree-optimization/80846
11217         * target.def (split_reduction): New target hook.
11218         * targhooks.c (default_split_reduction): New function.
11219         * targhooks.h (default_split_reduction): Declare.
11220         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11221         target requests first reduce vectors by combining low and high
11222         parts.
11223         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11224         (get_vectype_for_scalar_type_and_size): Export.
11225         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11226         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11227         * doc/tm.texi: Regenerate.
11228         * config/i386/i386.c (ix86_split_reduction): Implement
11229         TARGET_VECTORIZE_SPLIT_REDUCTION.
11231 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11233         PR target/83368
11234         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11235         in PIC mode except for TARGET_VXWORKS_RTP.
11236         * config/sparc/sparc.c: Include cfgrtl.h.
11237         (TARGET_INIT_PIC_REG): Define.
11238         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11239         (sparc_pic_register_p): New predicate.
11240         (sparc_legitimate_address_p): Use it.
11241         (sparc_legitimize_pic_address): Likewise.
11242         (sparc_delegitimize_address): Likewise.
11243         (sparc_mode_dependent_address_p): Likewise.
11244         (gen_load_pcrel_sym): Remove 4th parameter.
11245         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11246         (sparc_expand_prologue): Do not call load_got_register here.
11247         (sparc_flat_expand_prologue): Likewise.
11248         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11249         (sparc_use_pseudo_pic_reg): New function.
11250         (sparc_init_pic_reg): Likewise.
11251         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11252         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11254 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11256         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11257         Add item for branch_cost.
11259 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11261         PR rtl-optimization/83565
11262         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11263         not extend the result to a larger mode for rotate operations.
11264         (num_sign_bit_copies1): Likewise.
11266 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11268         PR target/40411
11269         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11270         -symbolic.
11271         Use values-Xc.o for -pedantic.
11272         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11274 2018-01-12  Martin Liska  <mliska@suse.cz>
11276         PR ipa/83054
11277         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11278         New function.
11279         (possible_polymorphic_call_targets): Use it.
11280         (ipa_devirt): Likewise.
11282 2018-01-12  Martin Liska  <mliska@suse.cz>
11284         * profile-count.h (enum profile_quality): Use 0 as invalid
11285         enum value of profile_quality.
11287 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11289         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11290         -mext-string options.
11292 2018-01-12  Richard Biener  <rguenther@suse.de>
11294         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11295         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11296         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11297         Likewise.
11298         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11300 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11302         * configure.ac (--with-long-double-format): Add support for the
11303         configuration option to change the default long double format on
11304         PowerPC systems.
11305         * config.gcc (powerpc*-linux*-*): Likewise.
11306         * configure: Regenerate.
11307         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11308         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11309         used without modification.
11311 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11313         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11314         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11315         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11316         MISC_BUILTIN_SPEC_BARRIER.
11317         (rs6000_init_builtins): Likewise.
11318         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11319         enum value.
11320         (speculation_barrier): New define_insn.
11321         * doc/extend.texi: Document __builtin_speculation_barrier.
11323 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11325         PR target/83203
11326         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11327         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11328         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11329         iterators.
11330         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11331         integral modes instead of "ss" and "sd".
11332         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11333         vectors with 32-bit and 64-bit elements.
11334         (vecdupssescalarmodesuffix): New mode attribute.
11335         (vec_dup<mode>): Use it.
11337 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11339         PR target/83330
11340         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11341         frame if argument is passed on stack.
11343 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11345         PR target/82682
11346         * ree.c (combine_reaching_defs): Optimize also
11347         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11348         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11350 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11352         PR middle-end/83189
11353         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11355 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11357         PR middle-end/83718
11358         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11359         after they are computed.
11361 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11363         PR tree-optimization/83695
11364         * gimple-loop-linterchange.cc
11365         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11366         reset cached scev information after interchange.
11367         (pass_linterchange::execute): Remove call to scev_reset_htab.
11369 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11371         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11372         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11373         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11374         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11375         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11376         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11377         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11378         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11379         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11380         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11381         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11382         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11383         (V_lane_reg): Likewise.
11384         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11385         New define_expand.
11386         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11387         (vfmal_lane_low<mode>_intrinsic,
11388         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11389         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11390         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11391         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11392         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11393         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11395 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11397         * config/arm/arm-cpus.in (fp16fml): New feature.
11398         (ALL_SIMD): Add fp16fml.
11399         (armv8.2-a): Add fp16fml as an option.
11400         (armv8.3-a): Likewise.
11401         (armv8.4-a): Add fp16fml as part of fp16.
11402         * config/arm/arm.h (TARGET_FP16FML): Define.
11403         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11404         when appropriate.
11405         * config/arm/arm-modes.def (V2HF): Define.
11406         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11407         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11408         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11409         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11410         vfmsl_low, vfmsl_high): New set of builtins.
11411         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11412         (vfml_op): New code attribute.
11413         (VFMLHALVES): New int iterator.
11414         (VFML, VFMLSEL): New mode attributes.
11415         (V_reg): Define mapping for V2HF.
11416         (V_hi, V_lo): New mode attributes.
11417         (VF_constraint): Likewise.
11418         (vfml_half, vfml_half_selector): New int attributes.
11419         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11420         define_expand.
11421         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11422         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11423         New define_insn.
11424         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11425         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11426         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11427         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11428         documentation.
11429         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11430         Document new effective target and option set.
11432 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11434         * config/arm/arm-cpus.in (armv8_4): New feature.
11435         (ARMv8_4a): New fgroup.
11436         (armv8.4-a): New arch.
11437         * config/arm/arm-tables.opt: Regenerate.
11438         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11439         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11440         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11441         Add matching rules for -march=armv8.4-a and extensions.
11442         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11444 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11446         PR target/81821
11447         * config/rx/rx.md (BW): New mode attribute.
11448         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11450 2018-01-11  Richard Biener  <rguenther@suse.de>
11452         PR tree-optimization/83435
11453         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11454         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11455         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11457 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11458             Alan Hayward  <alan.hayward@arm.com>
11459             David Sherwood  <david.sherwood@arm.com>
11461         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11462         field.
11463         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11464         (aarch64_print_address_internal): Use it to check for a zero offset.
11466 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11467             Alan Hayward  <alan.hayward@arm.com>
11468             David Sherwood  <david.sherwood@arm.com>
11470         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11471         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11472         Return a poly_int64 rather than a HOST_WIDE_INT.
11473         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11474         rather than a HOST_WIDE_INT.
11475         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11476         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11477         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11478         final_offset from HOST_WIDE_INT to poly_int64.
11479         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11480         to_constant when getting the number of units in an Advanced SIMD
11481         mode.
11482         (aarch64_builtin_vectorized_function): Check for a constant number
11483         of units.
11484         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11485         GET_MODE_SIZE.
11486         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11487         attribute instead of GET_MODE_NUNITS.
11488         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11489         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11490         GET_MODE_SIZE for fixed-size registers.
11491         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11492         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11493         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11494         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11495         (aarch64_print_operand, aarch64_print_address_internal)
11496         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11497         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11498         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11499         Handle polynomial GET_MODE_SIZE.
11500         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11501         wider than SImode without modification.
11502         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11503         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11504         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11505         passing and returning SVE modes.
11506         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11507         rather than GEN_INT.
11508         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11509         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11510         (aarch64_allocate_and_probe_stack_space): Likewise.
11511         (aarch64_layout_frame): Cope with polynomial offsets.
11512         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11513         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11514         polynomial offsets.
11515         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11516         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11517         poly_int64 rather than a HOST_WIDE_INT.
11518         (aarch64_get_separate_components, aarch64_process_components)
11519         (aarch64_expand_prologue, aarch64_expand_epilogue)
11520         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11521         (aarch64_anchor_offset): New function, split out from...
11522         (aarch64_legitimize_address): ...here.
11523         (aarch64_builtin_vectorization_cost): Handle polynomial
11524         TYPE_VECTOR_SUBPARTS.
11525         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11526         GET_MODE_NUNITS.
11527         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
11528         number of elements from the PARALLEL rather than the mode.
11529         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
11530         rather than GET_MODE_BITSIZE.
11531         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
11532         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
11533         (aarch64_expand_vec_perm_const_1): Handle polynomial
11534         d->perm.length () and d->perm elements.
11535         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
11536         Apply to_constant to d->perm elements.
11537         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
11538         polynomial CONST_VECTOR_NUNITS.
11539         (aarch64_move_pointer): Take amount as a poly_int64 rather
11540         than an int.
11541         (aarch64_progress_pointer): Avoid temporary variable.
11542         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
11543         the mode attribute instead of GET_MODE.
11545 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11546             Alan Hayward  <alan.hayward@arm.com>
11547             David Sherwood  <david.sherwood@arm.com>
11549         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
11550         x exists before using it.
11551         (aarch64_add_constant_internal): Rename to...
11552         (aarch64_add_offset_1): ...this.  Replace regnum with separate
11553         src and dest rtxes.  Handle the case in which they're different,
11554         including when the offset is zero.  Replace scratchreg with an rtx.
11555         Use 2 additions if there is no spare register into which we can
11556         move a 16-bit constant.
11557         (aarch64_add_constant): Delete.
11558         (aarch64_add_offset): Replace reg with separate src and dest
11559         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
11560         Use aarch64_add_offset_1.
11561         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
11562         an rtx rather than an int.  Take the delta as a poly_int64
11563         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
11564         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
11565         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
11566         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
11567         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
11568         and aarch64_add_sp.
11569         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
11570         aarch64_add_constant.
11572 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11574         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
11575         Use scalar_float_mode.
11577 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11579         * config/aarch64/aarch64-simd.md
11580         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
11581         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
11582         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
11583         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
11584         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
11585         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
11586         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
11587         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
11588         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
11589         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
11591 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11593         PR target/83514
11594         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
11595         targ_options->x_arm_arch_string is non NULL.
11597 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
11599         * config/aarch64/aarch64.h
11600         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
11602 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
11604         PR target/82096
11605         * expmed.c (emit_store_flag_force): Swap if const op0
11606         and change VOIDmode to mode of op0.
11608 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11610         PR rtl-optimization/83761
11611         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
11612         than bytes to mode_for_size.
11614 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11616         PR middle-end/83189
11617         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
11618         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
11619         profile.
11621 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
11623         PR middle-end/83575
11624         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
11625         when in layout mode.
11626         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
11627         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
11628         partition fixup.
11630 2018-01-10  Michael Collison  <michael.collison@arm.com>
11632         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
11633         * config/aarch64/aarch64-option-extension.def: Add
11634         AARCH64_OPT_EXTENSION of 'fp16fml'.
11635         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11636         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
11637         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
11638         * config/aarch64/constraints.md (Ui7): New constraint.
11639         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
11640         (VFMLA_SEL_W): Ditto.
11641         (f16quad): Ditto.
11642         (f16mac1): Ditto.
11643         (VFMLA16_LOW): New int iterator.
11644         (VFMLA16_HIGH): Ditto.
11645         (UNSPEC_FMLAL): New unspec.
11646         (UNSPEC_FMLSL): Ditto.
11647         (UNSPEC_FMLAL2): Ditto.
11648         (UNSPEC_FMLSL2): Ditto.
11649         (f16mac): New code attribute.
11650         * config/aarch64/aarch64-simd-builtins.def
11651         (aarch64_fmlal_lowv2sf): Ditto.
11652         (aarch64_fmlsl_lowv2sf): Ditto.
11653         (aarch64_fmlalq_lowv4sf): Ditto.
11654         (aarch64_fmlslq_lowv4sf): Ditto.
11655         (aarch64_fmlal_highv2sf): Ditto.
11656         (aarch64_fmlsl_highv2sf): Ditto.
11657         (aarch64_fmlalq_highv4sf): Ditto.
11658         (aarch64_fmlslq_highv4sf): Ditto.
11659         (aarch64_fmlal_lane_lowv2sf): Ditto.
11660         (aarch64_fmlsl_lane_lowv2sf): Ditto.
11661         (aarch64_fmlal_laneq_lowv2sf): Ditto.
11662         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
11663         (aarch64_fmlalq_lane_lowv4sf): Ditto.
11664         (aarch64_fmlsl_lane_lowv4sf): Ditto.
11665         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
11666         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
11667         (aarch64_fmlal_lane_highv2sf): Ditto.
11668         (aarch64_fmlsl_lane_highv2sf): Ditto.
11669         (aarch64_fmlal_laneq_highv2sf): Ditto.
11670         (aarch64_fmlsl_laneq_highv2sf): Ditto.
11671         (aarch64_fmlalq_lane_highv4sf): Ditto.
11672         (aarch64_fmlsl_lane_highv4sf): Ditto.
11673         (aarch64_fmlalq_laneq_highv4sf): Ditto.
11674         (aarch64_fmlsl_laneq_highv4sf): Ditto.
11675         * config/aarch64/aarch64-simd.md:
11676         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
11677         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11678         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
11679         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
11680         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
11681         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
11682         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
11683         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
11684         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
11685         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
11686         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
11687         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
11688         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
11689         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
11690         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
11691         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
11692         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
11693         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
11694         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
11695         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
11696         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
11697         (vfmlsl_low_u32): Ditto.
11698         (vfmlalq_low_u32): Ditto.
11699         (vfmlslq_low_u32): Ditto.
11700         (vfmlal_high_u32): Ditto.
11701         (vfmlsl_high_u32): Ditto.
11702         (vfmlalq_high_u32): Ditto.
11703         (vfmlslq_high_u32): Ditto.
11704         (vfmlal_lane_low_u32): Ditto.
11705         (vfmlsl_lane_low_u32): Ditto.
11706         (vfmlal_laneq_low_u32): Ditto.
11707         (vfmlsl_laneq_low_u32): Ditto.
11708         (vfmlalq_lane_low_u32): Ditto.
11709         (vfmlslq_lane_low_u32): Ditto.
11710         (vfmlalq_laneq_low_u32): Ditto.
11711         (vfmlslq_laneq_low_u32): Ditto.
11712         (vfmlal_lane_high_u32): Ditto.
11713         (vfmlsl_lane_high_u32): Ditto.
11714         (vfmlal_laneq_high_u32): Ditto.
11715         (vfmlsl_laneq_high_u32): Ditto.
11716         (vfmlalq_lane_high_u32): Ditto.
11717         (vfmlslq_lane_high_u32): Ditto.
11718         (vfmlalq_laneq_high_u32): Ditto.
11719         (vfmlslq_laneq_high_u32): Ditto.
11720         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
11721         (AARCH64_FL_FOR_ARCH8_4): New.
11722         (AARCH64_ISA_F16FML): New ISA flag.
11723         (TARGET_F16FML): New feature flag for fp16fml.
11724         (doc/invoke.texi): Document new fp16fml option.
11726 2018-01-10  Michael Collison  <michael.collison@arm.com>
11728         * config/aarch64/aarch64-builtins.c:
11729         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
11730         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11731         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
11732         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
11733         (AARCH64_ISA_SHA3): New ISA flag.
11734         (TARGET_SHA3): New feature flag for sha3.
11735         * config/aarch64/iterators.md (sha512_op): New int attribute.
11736         (CRYPTO_SHA512): New int iterator.
11737         (UNSPEC_SHA512H): New unspec.
11738         (UNSPEC_SHA512H2): Ditto.
11739         (UNSPEC_SHA512SU0): Ditto.
11740         (UNSPEC_SHA512SU1): Ditto.
11741         * config/aarch64/aarch64-simd-builtins.def
11742         (aarch64_crypto_sha512hqv2di): New builtin.
11743         (aarch64_crypto_sha512h2qv2di): Ditto.
11744         (aarch64_crypto_sha512su0qv2di): Ditto.
11745         (aarch64_crypto_sha512su1qv2di): Ditto.
11746         (aarch64_eor3qv8hi): Ditto.
11747         (aarch64_rax1qv2di): Ditto.
11748         (aarch64_xarqv2di): Ditto.
11749         (aarch64_bcaxqv8hi): Ditto.
11750         * config/aarch64/aarch64-simd.md:
11751         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
11752         (aarch64_crypto_sha512su0qv2di): Ditto.
11753         (aarch64_crypto_sha512su1qv2di): Ditto.
11754         (aarch64_eor3qv8hi): Ditto.
11755         (aarch64_rax1qv2di): Ditto.
11756         (aarch64_xarqv2di): Ditto.
11757         (aarch64_bcaxqv8hi): Ditto.
11758         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
11759         (vsha512h2q_u64): Ditto.
11760         (vsha512su0q_u64): Ditto.
11761         (vsha512su1q_u64): Ditto.
11762         (veor3q_u16): Ditto.
11763         (vrax1q_u64): Ditto.
11764         (vxarq_u64): Ditto.
11765         (vbcaxq_u16): Ditto.
11766         * config/arm/types.md (crypto_sha512): New type attribute.
11767         (crypto_sha3): Ditto.
11768         (doc/invoke.texi): Document new sha3 option.
11770 2018-01-10  Michael Collison  <michael.collison@arm.com>
11772         * config/aarch64/aarch64-builtins.c:
11773         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
11774         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11775         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
11776         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
11777         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
11778         (AARCH64_ISA_SM4): New ISA flag.
11779         (TARGET_SM4): New feature flag for sm4.
11780         * config/aarch64/aarch64-simd-builtins.def
11781         (aarch64_sm3ss1qv4si): Ditto.
11782         (aarch64_sm3tt1aq4si): Ditto.
11783         (aarch64_sm3tt1bq4si): Ditto.
11784         (aarch64_sm3tt2aq4si): Ditto.
11785         (aarch64_sm3tt2bq4si): Ditto.
11786         (aarch64_sm3partw1qv4si): Ditto.
11787         (aarch64_sm3partw2qv4si): Ditto.
11788         (aarch64_sm4eqv4si): Ditto.
11789         (aarch64_sm4ekeyqv4si): Ditto.
11790         * config/aarch64/aarch64-simd.md:
11791         (aarch64_sm3ss1qv4si): Ditto.
11792         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
11793         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
11794         (aarch64_sm4eqv4si): Ditto.
11795         (aarch64_sm4ekeyqv4si): Ditto.
11796         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
11797         (sm3part_op): Ditto.
11798         (CRYPTO_SM3TT): Ditto.
11799         (CRYPTO_SM3PART): Ditto.
11800         (UNSPEC_SM3SS1): New unspec.
11801         (UNSPEC_SM3TT1A): Ditto.
11802         (UNSPEC_SM3TT1B): Ditto.
11803         (UNSPEC_SM3TT2A): Ditto.
11804         (UNSPEC_SM3TT2B): Ditto.
11805         (UNSPEC_SM3PARTW1): Ditto.
11806         (UNSPEC_SM3PARTW2): Ditto.
11807         (UNSPEC_SM4E): Ditto.
11808         (UNSPEC_SM4EKEY): Ditto.
11809         * config/aarch64/constraints.md (Ui2): New constraint.
11810         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
11811         * config/arm/types.md (crypto_sm3): New type attribute.
11812         (crypto_sm4): Ditto.
11813         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
11814         (vsm3tt1aq_u32): Ditto.
11815         (vsm3tt1bq_u32): Ditto.
11816         (vsm3tt2aq_u32): Ditto.
11817         (vsm3tt2bq_u32): Ditto.
11818         (vsm3partw1q_u32): Ditto.
11819         (vsm3partw2q_u32): Ditto.
11820         (vsm4eq_u32): Ditto.
11821         (vsm4ekeyq_u32): Ditto.
11822         (doc/invoke.texi): Document new sm4 option.
11824 2018-01-10  Michael Collison  <michael.collison@arm.com>
11826         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
11827         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
11828         (AARCH64_FL_FOR_ARCH8_4): New.
11829         (AARCH64_FL_V8_4): New flag.
11830         (doc/invoke.texi): Document new armv8.4-a option.
11832 2018-01-10  Michael Collison  <michael.collison@arm.com>
11834         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11835         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
11836         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
11837         * config/aarch64/aarch64-option-extension.def: Add
11838         AARCH64_OPT_EXTENSION of 'sha2'.
11839         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
11840         (crypto): Disable sha2 and aes if crypto disabled.
11841         (crypto): Enable aes and sha2 if enabled.
11842         (simd): Disable sha2 and aes if simd disabled.
11843         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
11844         New flags.
11845         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
11846         (TARGET_SHA2): New feature flag for sha2.
11847         (TARGET_AES): New feature flag for aes.
11848         * config/aarch64/aarch64-simd.md:
11849         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
11850         conditional on TARGET_AES.
11851         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
11852         (aarch64_crypto_sha1hsi): Make pattern conditional
11853         on TARGET_SHA2.
11854         (aarch64_crypto_sha1hv4si): Ditto.
11855         (aarch64_be_crypto_sha1hv4si): Ditto.
11856         (aarch64_crypto_sha1su1v4si): Ditto.
11857         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
11858         (aarch64_crypto_sha1su0v4si): Ditto.
11859         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
11860         (aarch64_crypto_sha256su0v4si): Ditto.
11861         (aarch64_crypto_sha256su1v4si): Ditto.
11862         (doc/invoke.texi): Document new aes and sha2 options.
11864 2018-01-10  Martin Sebor  <msebor@redhat.com>
11866         PR tree-optimization/83781
11867         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
11868         as string arrays.
11870 2018-01-11  Martin Sebor  <msebor@gmail.com>
11871             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11873         PR tree-optimization/83501
11874         PR tree-optimization/81703
11876         * tree-ssa-strlen.c (get_string_cst): Rename...
11877         (get_string_len): ...to this.  Handle global constants.
11878         (handle_char_store): Adjust.
11880 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
11881             Jim Wilson  <jimw@sifive.com>
11883         * config/riscv/riscv-protos.h (riscv_output_return): New.
11884         * config/riscv/riscv.c (struct machine_function): New naked_p field.
11885         (riscv_attribute_table, riscv_output_return),
11886         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
11887         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
11888         (riscv_compute_frame_info): Only compute frame->mask if not a naked
11889         function.
11890         (riscv_expand_prologue): Add early return for naked function.
11891         (riscv_expand_epilogue): Likewise.
11892         (riscv_function_ok_for_sibcall): Return false for naked function.
11893         (riscv_set_current_function): New.
11894         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
11895         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
11896         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
11897         * doc/extend.texi (RISC-V Function Attributes): New.
11899 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11901         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
11902         check for 128-bit long double before checking TCmode.
11903         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
11904         128-bit long doubles before checking TFmode or TCmode.
11905         (FLOAT128_IBM_P): Likewise.
11907 2018-01-10  Martin Sebor  <msebor@redhat.com>
11909         PR tree-optimization/83671
11910         * builtins.c (c_strlen): Unconditionally return zero for the empty
11911         string.
11912         Use -Warray-bounds for warnings.
11913         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
11914         for non-constant array indices with COMPONENT_REF, arrays of
11915         arrays, and pointers to arrays.
11916         (gimple_fold_builtin_strlen): Determine and set length range for
11917         non-constant character arrays.
11919 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
11921         PR middle-end/81897
11922         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
11923         empty blocks.
11925 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
11927         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
11929 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
11931         PR target/83399
11932         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
11933         VECTOR_MEM_ALTIVEC_OR_VSX_P.
11934         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
11935         indexed_or_indirect_operand predicate.
11936         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
11937         (*vsx_le_perm_load_v8hi): Likewise.
11938         (*vsx_le_perm_load_v16qi): Likewise.
11939         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
11940         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
11941         (*vsx_le_perm_store_v8hi): Likewise.
11942         (*vsx_le_perm_store_v16qi): Likewise.
11943         (eight unnamed splitters): Likewise.
11945 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
11947         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
11948         * config/rs6000/emmintrin.h: Likewise.
11949         * config/rs6000/mmintrin.h: Likewise.
11950         * config/rs6000/xmmintrin.h: Likewise.
11952 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
11954         PR c++/43486
11955         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
11956         "public_flag".
11957         * tree.c (tree_nop_conversion): Return true for location wrapper
11958         nodes.
11959         (maybe_wrap_with_location): New function.
11960         (selftest::check_strip_nops): New function.
11961         (selftest::test_location_wrappers): New function.
11962         (selftest::tree_c_tests): Call it.
11963         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
11964         (maybe_wrap_with_location): New decl.
11965         (EXPR_LOCATION_WRAPPER_P): New macro.
11966         (location_wrapper_p): New inline function.
11967         (tree_strip_any_location_wrapper): New inline function.
11969 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
11971         PR target/83735
11972         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
11973         stack_realign_offset for the largest alignment of stack slot
11974         actually used.
11975         (ix86_find_max_used_stack_alignment): New function.
11976         (ix86_finalize_stack_frame_flags): Use it.  Set
11977         max_used_stack_alignment if we don't realign stack.
11978         * config/i386/i386.h (machine_function): Add
11979         max_used_stack_alignment.
11981 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
11983         * config/arm/arm.opt (-mbranch-cost): New option.
11984         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
11985         account.
11987 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
11989         PR target/83629
11990         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
11991         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
11993 2018-01-10  Richard Biener  <rguenther@suse.de>
11995         PR debug/83765
11996         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
11997         early out so it also covers the case where we have a non-NULL
11998         origin.
12000 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12002         PR tree-optimization/83753
12003         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12004         for non-strided grouped accesses if the number of elements is 1.
12006 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12008         PR target/81616
12009         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12010         * i386.h (TARGET_USE_GATHER): Define.
12011         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12013 2018-01-10  Martin Liska  <mliska@suse.cz>
12015         PR bootstrap/82831
12016         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12017         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12018         partitioning.
12019         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12020         CLEANUP_NO_PARTITIONING is not set.
12022 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12024         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12025         for vectors, as a partial revert of r254296.
12026         * rtl.h (const_vec_p): Delete.
12027         (const_vec_duplicate_p): Don't test for vector CONSTs.
12028         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12029         * expmed.c (make_tree): Likewise.
12031         Revert:
12032         * common.md (E, F): Use CONSTANT_P instead of checking for
12033         CONST_VECTOR.
12034         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12035         checking for CONST_VECTOR.
12037 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12039         PR middle-end/83575
12040         * predict.c (force_edge_cold): Handle in more sane way edges
12041         with no prediction.
12043 2018-01-09  Carl Love  <cel@us.ibm.com>
12045         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12046         V4SI, V4SF types.
12047         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12048         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12049         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12050         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12051         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12052         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12053         * config/rs6000/rs6000-protos.h: Add extern defition for
12054         rs6000_generate_float2_double_code.
12055         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12056         function.
12057         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12058         (float2_v2df): Add define_expand.
12060 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12062         PR target/83628
12063         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12064         op_mode in the force_to_mode call.
12066 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12068         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12069         instead of checking each element individually.
12070         (aarch64_evpc_uzp): Likewise.
12071         (aarch64_evpc_zip): Likewise.
12072         (aarch64_evpc_ext): Likewise.
12073         (aarch64_evpc_rev): Likewise.
12074         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12075         instead of checking each element individually.  Return true without
12076         generating rtl if
12077         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12078         whether all selected elements come from the same input, instead of
12079         checking each element individually.  Remove calls to gen_rtx_REG,
12080         start_sequence and end_sequence and instead assert that no rtl is
12081         generated.
12083 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12085         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12086         order of HIGH and CONST checks.
12088 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12090         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12091         if the destination isn't an SSA_NAME.
12093 2018-01-09  Richard Biener  <rguenther@suse.de>
12095         PR tree-optimization/83668
12096         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12097         move prologue...
12098         (canonicalize_loop_form): ... here, renamed from ...
12099         (canonicalize_loop_closed_ssa_form): ... this and amended to
12100         swap successor edges for loop exit blocks to make us use
12101         the RPO order we need for initial schedule generation.
12103 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12105         PR tree-optimization/64811
12106         * match.pd: When optimizing comparisons with Inf, avoid
12107         introducing or losing exceptions from comparisons with NaN.
12109 2018-01-09  Martin Liska  <mliska@suse.cz>
12111         PR sanitizer/82517
12112         * asan.c (shadow_mem_size): Add gcc_assert.
12114 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12116         Don't save registers in main().
12118         PR target/83738
12119         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12120         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12121         * config/avr/avr.c (avr_set_current_function): Don't error if
12122         naked, OS_task or OS_main are specified at the same time.
12123         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12124         OS_main.
12125         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12126         attribute.
12127         * common/config/avr/avr-common.c (avr_option_optimization_table):
12128         Switch on -mmain-is-OS_task for optimizing compilations.
12130 2018-01-09  Richard Biener  <rguenther@suse.de>
12132         PR tree-optimization/83572
12133         * graphite.c: Include cfganal.h.
12134         (graphite_transform_loops): Connect infinite loops to exit
12135         and remove fake edges at the end.
12137 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12139         * ipa-inline.c (edge_badness): Revert accidental checkin.
12141 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12143         PR ipa/80763
12144         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12145         symbols; not inline clones.
12147 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12149         PR target/83507
12150         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12151         hard registers.  Formatting fixes.
12153         PR preprocessor/83722
12154         * gcc.c (try_generate_repro): Pass
12155         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12156         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12157         do_report_bug.
12159 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12160             Kito Cheng  <kito.cheng@gmail.com>
12162         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12163         (riscv_leaf_function_p): Delete.
12164         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12166 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12168         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12169         function.
12170         (do_ifelse): New function.
12171         (do_isel): New function.
12172         (do_sub3): New function.
12173         (do_add3): New function.
12174         (do_load_mask_compare): New function.
12175         (do_overlap_load_compare): New function.
12176         (expand_compare_loop): New function.
12177         (expand_block_compare): Call expand_compare_loop() when appropriate.
12178         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12179         option description.
12180         (-mblock-compare-inline-loop-limit): New option.
12182 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12184         PR target/83677
12185         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12186         Reverse order of second and third operands in first alternative.
12187         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12188         of first and second elements in UNSPEC_VPERMR vector.
12189         (altivec_expand_vec_perm_le): Likewise.
12191 2018-01-08  Jeff Law  <law@redhat.com>
12193         PR rtl-optimizatin/81308
12194         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12195         (process_switch): If group_case_labels makes a change, then set
12196         cfg_altered.
12197         (pass_convert_switch::execute): If a switch is converted, then
12198         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12200         PR rtl-optimization/81308
12201         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12202         splitting insns.
12204 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12206         PR target/83663 - Revert r255946
12207         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12208         generation for cases where splatting a value is not useful.
12209         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12210         across a vec_duplicate and a paradoxical subreg forming a vector
12211         mode to a vec_concat.
12213 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12215         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12216         -march=armv8.3-a variants.
12217         * config/arm/t-multilib: Likewise.
12218         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12220 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12222         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12223         to generate rtl.
12224         (cceq_ior_compare_complement): Give it a name so I can use it, and
12225         change boolean_or_operator predicate to boolean_operator so it can
12226         be used to generate a crand.
12227         (eqne): New code iterator.
12228         (bd/bd_neg): New code_attrs.
12229         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12230         a single define_insn.
12231         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12232         decrement (bdnzt/bdnzf/bdzt/bdzf).
12233         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12234         with the new names of the branch decrement patterns, and added the
12235         names of the branch decrement conditional patterns.
12237 2018-01-08  Richard Biener  <rguenther@suse.de>
12239         PR tree-optimization/83563
12240         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12241         cache.
12243 2018-01-08  Richard Biener  <rguenther@suse.de>
12245         PR middle-end/83713
12246         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12248 2018-01-08  Richard Biener  <rguenther@suse.de>
12250         PR tree-optimization/83685
12251         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12252         references to abnormals.
12254 2018-01-08  Richard Biener  <rguenther@suse.de>
12256         PR lto/83719
12257         * dwarf2out.c (output_indirect_strings): Handle empty
12258         skeleton_debug_str_hash.
12259         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12261 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12263         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12264         (emit_store_direct): Likewise.
12265         (arc_trampoline_adjust_address): Likewise.
12266         (arc_asm_trampoline_template): New function.
12267         (arc_initialize_trampoline): Use asm_trampoline_template.
12268         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12269         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12270         * config/arc/arc.md (flush_icache): Delete pattern.
12272 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12274         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12275         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12276         munaligned-access.
12278 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12280         PR target/83681
12281         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12282         by not USED_FOR_TARGET.
12283         (make_pass_resolve_sw_modes): Likewise.
12285 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12287         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12288         USED_FOR_TARGET.
12290 2018-01-08  Richard Biener  <rguenther@suse.de>
12292         PR middle-end/83580
12293         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12295 2018-01-08  Richard Biener  <rguenther@suse.de>
12297         PR middle-end/83517
12298         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12300 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12302         PR middle-end/81897
12303         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12304         basic blocks with a small number of successors.
12305         (convert_control_dep_chain_into_preds): Improve handling of
12306         forwarder blocks.
12307         (dump_predicates): Split apart into...
12308         (dump_pred_chain): ...here...
12309         (dump_pred_info): ...and here.
12310         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12311         (can_chain_union_be_invalidated_p): Improve check for invalidation
12312         of paths.
12313         (uninit_uses_cannot_happen): Avoid unnecessary if
12314         convert_control_dep_chain_into_preds yielded nothing.
12316 2018-01-06  Martin Sebor  <msebor@redhat.com>
12318         PR tree-optimization/83640
12319         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12320         subtracting negative offset from size.
12321         (builtin_access::overlap): Adjust offset bounds of the access to fall
12322         within the size of the object if possible.
12324 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12326         PR rtl-optimization/83699
12327         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12328         extract_bit_field_as_subreg to cases in which the extracted
12329         value is also a vector.
12331         * lra-constraints.c (process_alt_operands): Test for the equivalence
12332         substitutions when detecting a possible reload cycle.
12334 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12336         PR debug/83480
12337         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12338         by default if flag_selective_schedling{,2}.  Formatting fixes.
12340         PR rtl-optimization/83682
12341         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12342         if it has non-VECTOR_MODE element mode.
12343         (vec_duplicate_p): Likewise.
12345         PR middle-end/83694
12346         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12347         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12349 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12351         PR target/83604
12352         * config/i386/i386-builtin.def
12353         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12354         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12355         Require also OPTION_MASK_ISA_AVX512F in addition to
12356         OPTION_MASK_ISA_GFNI.
12357         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12358         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12359         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12360         to OPTION_MASK_ISA_GFNI.
12361         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12362         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12363         OPTION_MASK_ISA_AVX512BW.
12364         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12365         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12366         addition to OPTION_MASK_ISA_GFNI.
12367         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12368         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12369         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12370         to OPTION_MASK_ISA_GFNI.
12371         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12372         a requirement for all ISAs rather than any of them with a few
12373         exceptions.
12374         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12375         processing.
12376         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12377         bitmasks to be enabled with 3 exceptions, instead of requiring any
12378         enabled ISA with lots of exceptions.
12379         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12380         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12381         Change avx512bw in isa attribute to avx512f.
12382         * config/i386/sgxintrin.h: Add license boilerplate.
12383         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12384         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12385         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12386         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12387         defined.
12388         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12389         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12390         temporarily sse2 rather than sse if not enabled already.
12392         PR target/83604
12393         * config/i386/sse.md (VI248_VLBW): Rename to ...
12394         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12395         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12396         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12397         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12398         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12399         mode iterator instead of VI248_VLBW.
12401 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12403         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12404         (record_modified): Skip clobbers; add debug output.
12405         (param_change_prob): Use sreal frequencies.
12407 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12409         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12410         punt for user-aligned variables.
12412 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12414         * tree-chrec.c (chrec_contains_symbols): Return true for
12415         POLY_INT_CST.
12417 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12419         PR target/82439
12420         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12421         of (x|y) == x for BICS pattern.
12423 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12425         PR tree-optimization/83605
12426         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12427         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12428         can throw.
12430 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12432         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12433         * config/epiphany/rtems.h: New file.
12435 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12436             Uros Bizjak  <ubizjak@gmail.com>
12438         PR target/83554
12439         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12440         QIreg_operand instead of register_operand predicate.
12441         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12442         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12443         comments instead of -fmitigate[-_]rop.
12445 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12447         PR bootstrap/81926
12448         * cgraphunit.c (symbol_table::compile): Switch to text_section
12449         before calling assembly_start debug hook.
12450         * run-rtl-passes.c (run_rtl_passes): Likewise.
12451         Include output.h.
12453 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12455         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12456         range_int_cst_p rather than !symbolic_range_p before calling
12457         extract_range_from_multiplicative_op_1.
12459 2018-01-04  Jeff Law  <law@redhat.com>
12461         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12462         redundant test in assertion.
12464 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12466         * doc/rtl.texi: Document machine_mode wrapper classes.
12468 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12470         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12471         using tree_to_uhwi.
12473 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12475         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12476         the VEC_PERM_EXPR fold to fail.
12478 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12480         PR debug/83585
12481         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12482         to switched_sections.
12484 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12486         PR target/83680
12487         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12488         test for d.testing.
12490 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12492         PR target/83387
12493         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12494         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12496 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12498         PR debug/83666
12499         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12500         is BLKmode and bitpos not zero or mode change is needed.
12502 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12504         PR target/83675
12505         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12506         TARGET_VIS2.
12508 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12510         PR target/83628
12511         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12512         instead of MULT rtx.  Update all corresponding splitters.
12513         (*saddl_se): Ditto.
12514         (*ssub<modesuffix>): Ditto.
12515         (*ssubl_se): Ditto.
12516         (*cmp_sadd_di): Update split patterns.
12517         (*cmp_sadd_si): Ditto.
12518         (*cmp_sadd_sidi): Ditto.
12519         (*cmp_ssub_di): Ditto.
12520         (*cmp_ssub_si): Ditto.
12521         (*cmp_ssub_sidi): Ditto.
12522         * config/alpha/predicates.md (const23_operand): New predicate.
12523         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12524         Look for ASHIFT, not MULT inner operand.
12525         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
12527 2018-01-04  Martin Liska  <mliska@suse.cz>
12529         PR gcov-profile/83669
12530         * gcov.c (output_intermediate_file): Add version to intermediate
12531         gcov file.
12532         * doc/gcov.texi: Document new field 'version' in intermediate
12533         file format. Fix location of '-k' option of gcov command.
12535 2018-01-04  Martin Liska  <mliska@suse.cz>
12537         PR ipa/82352
12538         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
12540 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12542         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
12544 2018-01-03  Martin Sebor  <msebor@redhat.com>
12546         PR tree-optimization/83655
12547         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
12548         checking calls with invalid arguments.
12550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12552         * tree-vect-stmts.c (vect_get_store_rhs): New function.
12553         (vectorizable_mask_load_store): Delete.
12554         (vectorizable_call): Return false for masked loads and stores.
12555         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
12556         instead of gimple_assign_rhs1.
12557         (vectorizable_load): Handle IFN_MASK_LOAD.
12558         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
12560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12562         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
12563         split out from..,
12564         (vectorizable_mask_load_store): ...here.
12565         (vectorizable_load): ...and here.
12567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12569         * tree-vect-stmts.c (vect_build_all_ones_mask)
12570         (vect_build_zero_merge_argument): New functions, split out from...
12571         (vectorizable_load): ...here.
12573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12575         * tree-vect-stmts.c (vect_check_store_rhs): New function,
12576         split out from...
12577         (vectorizable_mask_load_store): ...here.
12578         (vectorizable_store): ...and here.
12580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12582         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
12583         split out from...
12584         (vectorizable_mask_load_store): ...here.
12586 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12588         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
12589         (vect_model_store_cost): Take a vec_load_store_type instead of a
12590         vect_def_type.
12591         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
12592         (vect_model_store_cost): Take a vec_load_store_type instead of a
12593         vect_def_type.
12594         (vectorizable_mask_load_store): Update accordingly.
12595         (vectorizable_store): Likewise.
12596         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
12598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12600         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
12601         IFN_MASK_LOAD calls here rather than...
12602         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
12604 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12605             Alan Hayward  <alan.hayward@arm.com>
12606             David Sherwood  <david.sherwood@arm.com>
12608         * expmed.c (extract_bit_field_1): For vector extracts,
12609         fall back to extract_bit_field_as_subreg if vec_extract
12610         isn't available.
12612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12613             Alan Hayward  <alan.hayward@arm.com>
12614             David Sherwood  <david.sherwood@arm.com>
12616         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
12617         they are variable or constant sized.
12618         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
12619         slots for constant-sized data.
12621 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12622             Alan Hayward  <alan.hayward@arm.com>
12623             David Sherwood  <david.sherwood@arm.com>
12625         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
12626         handling COND_EXPRs with boolean comparisons, try to find a better
12627         basis for the mask type than the boolean itself.
12629 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12631         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
12632         is calculated and how it can be overridden.
12633         * genmodes.c (max_bitsize_mode_any_mode): New variable.
12634         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
12635         if defined.
12636         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
12637         if nonzero.
12639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12640             Alan Hayward  <alan.hayward@arm.com>
12641             David Sherwood  <david.sherwood@arm.com>
12643         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
12644         Remove the mode argument.
12645         (aarch64_simd_valid_immediate): Remove the mode and inverse
12646         arguments.
12647         * config/aarch64/iterators.md (bitsize): New iterator.
12648         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
12649         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
12650         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
12651         aarch64_simd_valid_immediate.
12652         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
12653         (aarch64_reg_or_bic_imm): Likewise.
12654         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
12655         with an insn_type enum and msl with a modifier_type enum.
12656         Replace element_width with a scalar_mode.  Change the shift
12657         to unsigned int.  Add constructors for scalar_float_mode and
12658         scalar_int_mode elements.
12659         (aarch64_vect_float_const_representable_p): Delete.
12660         (aarch64_can_const_movi_rtx_p)
12661         (aarch64_simd_scalar_immediate_valid_for_move)
12662         (aarch64_simd_make_constant): Update call to
12663         aarch64_simd_valid_immediate.
12664         (aarch64_advsimd_valid_immediate_hs): New function.
12665         (aarch64_advsimd_valid_immediate): Likewise.
12666         (aarch64_simd_valid_immediate): Remove mode and inverse
12667         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
12668         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
12669         and aarch64_float_const_representable_p on the result.
12670         (aarch64_output_simd_mov_immediate): Remove mode argument.
12671         Update call to aarch64_simd_valid_immediate and use of
12672         simd_immediate_info.
12673         (aarch64_output_scalar_simd_mov_immediate): Update call
12674         accordingly.
12676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12677             Alan Hayward  <alan.hayward@arm.com>
12678             David Sherwood  <david.sherwood@arm.com>
12680         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
12681         (mode_nunits): Likewise CONST_MODE_NUNITS.
12682         * machmode.def (ADJUST_NUNITS): Document.
12683         * genmodes.c (mode_data::need_nunits_adj): New field.
12684         (blank_mode): Update accordingly.
12685         (adj_nunits): New variable.
12686         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
12687         parameter.
12688         (emit_mode_size_inline): Set need_bytesize_adj for all modes
12689         listed in adj_nunits.
12690         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
12691         listed in adj_nunits.  Don't emit case statements for such modes.
12692         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
12693         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
12694         nothing if adj_nunits is nonnull.
12695         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
12696         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
12697         (emit_mode_fbit): Update use of print_maybe_const_decl.
12698         (emit_move_size): Likewise.  Treat the array as non-const
12699         if adj_nunits.
12700         (emit_mode_adjustments): Handle adj_nunits.
12702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12704         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
12705         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
12706         (VECTOR_MODES): Use it.
12707         (make_vector_modes): Take the prefix as an argument.
12709 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12710             Alan Hayward  <alan.hayward@arm.com>
12711             David Sherwood  <david.sherwood@arm.com>
12713         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
12714         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
12715         for MODE_VECTOR_BOOL.
12716         * machmode.def (VECTOR_BOOL_MODE): Document.
12717         * genmodes.c (VECTOR_BOOL_MODE): New macro.
12718         (make_vector_bool_mode): New function.
12719         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
12720         MODE_VECTOR_BOOL.
12721         * lto-streamer-in.c (lto_input_mode_table): Likewise.
12722         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
12723         Likewise.
12724         * stor-layout.c (int_mode_for_mode): Likewise.
12725         * tree.c (build_vector_type_for_mode): Likewise.
12726         * varasm.c (output_constant_pool_2): Likewise.
12727         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
12728         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
12729         for MODE_VECTOR_BOOL.
12730         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
12731         of mode class checks.
12732         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
12733         instead of a list of mode class checks.
12734         (expand_vector_scalar_condition): Likewise.
12735         (type_for_widest_vector_mode): Handle BImode as an inner mode.
12737 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12738             Alan Hayward  <alan.hayward@arm.com>
12739             David Sherwood  <david.sherwood@arm.com>
12741         * machmode.h (mode_size): Change from unsigned short to
12742         poly_uint16_pod.
12743         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
12744         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12745         or if measurement_type is not polynomial.
12746         (fixed_size_mode::includes_p): Check for constant-sized modes.
12747         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
12748         return a poly_uint16 rather than an unsigned short.
12749         (emit_mode_size): Change the type of mode_size from unsigned short
12750         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
12751         (emit_mode_adjustments): Cope with polynomial vector sizes.
12752         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12753         for GET_MODE_SIZE.
12754         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12755         for GET_MODE_SIZE.
12756         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
12757         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
12758         * caller-save.c (setup_save_areas): Likewise.
12759         (replace_reg_with_saved_mem): Likewise.
12760         * calls.c (emit_library_call_value_1): Likewise.
12761         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
12762         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
12763         (gen_lowpart_for_combine): Likewise.
12764         * convert.c (convert_to_integer_1): Likewise.
12765         * cse.c (equiv_constant, cse_insn): Likewise.
12766         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
12767         (cselib_subst_to_values): Likewise.
12768         * dce.c (word_dce_process_block): Likewise.
12769         * df-problems.c (df_word_lr_mark_ref): Likewise.
12770         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
12771         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
12772         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
12773         (rtl_for_decl_location): Likewise.
12774         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
12775         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
12776         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
12777         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
12778         (expand_expr_real_1): Likewise.
12779         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
12780         (pad_below): Likewise.
12781         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12782         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
12783         * ira.c (get_subreg_tracking_sizes): Likewise.
12784         * ira-build.c (ira_create_allocno_objects): Likewise.
12785         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
12786         (ira_sort_regnos_for_alter_reg): Likewise.
12787         * ira-costs.c (record_operand_costs): Likewise.
12788         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
12789         (resolve_simple_move): Likewise.
12790         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
12791         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
12792         (lra_constraints): Likewise.
12793         (CONST_POOL_OK_P): Reject variable-sized modes.
12794         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
12795         (add_pseudo_to_slot, lra_spill): Likewise.
12796         * omp-low.c (omp_clause_aligned_alignment): Likewise.
12797         * optabs-query.c (get_best_extraction_insn): Likewise.
12798         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12799         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
12800         (expand_mult_highpart, valid_multiword_target_p): Likewise.
12801         * recog.c (offsettable_address_addr_space_p): Likewise.
12802         * regcprop.c (maybe_mode_change): Likewise.
12803         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
12804         * regrename.c (build_def_use): Likewise.
12805         * regstat.c (dump_reg_info): Likewise.
12806         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
12807         (find_reloads, find_reloads_subreg_address): Likewise.
12808         * reload1.c (eliminate_regs_1): Likewise.
12809         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
12810         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
12811         (simplify_binary_operation_1, simplify_subreg): Likewise.
12812         * targhooks.c (default_function_arg_padding): Likewise.
12813         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
12814         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
12815         (verify_gimple_assign_ternary): Likewise.
12816         * tree-inline.c (estimate_move_cost): Likewise.
12817         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12818         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
12819         (get_address_cost_ainc): Likewise.
12820         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
12821         (vect_supportable_dr_alignment): Likewise.
12822         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12823         (vectorizable_reduction): Likewise.
12824         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
12825         (vectorizable_operation, vectorizable_load): Likewise.
12826         * tree.c (build_same_sized_truth_vector_type): Likewise.
12827         * valtrack.c (cleanup_auto_inc_dec): Likewise.
12828         * var-tracking.c (emit_note_insn_var_location): Likewise.
12829         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
12830         (ADDR_VEC_ALIGN): Likewise.
12832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12833             Alan Hayward  <alan.hayward@arm.com>
12834             David Sherwood  <david.sherwood@arm.com>
12836         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
12837         unsigned short.
12838         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
12839         or if measurement_type is polynomial.
12840         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
12841         * combine.c (make_extraction): Likewise.
12842         * dse.c (find_shift_sequence): Likewise.
12843         * dwarf2out.c (mem_loc_descriptor): Likewise.
12844         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
12845         (extract_bit_field, extract_low_bits): Likewise.
12846         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
12847         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
12848         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
12849         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
12850         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
12851         * reload.c (find_reloads): Likewise.
12852         * reload1.c (alter_reg): Likewise.
12853         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
12854         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
12855         * tree-if-conv.c (predicate_mem_writes): Likewise.
12856         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
12857         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
12858         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
12859         * valtrack.c (dead_debug_insert_temp): Likewise.
12860         * varasm.c (mergeable_constant_section): Likewise.
12861         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
12863 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12864             Alan Hayward  <alan.hayward@arm.com>
12865             David Sherwood  <david.sherwood@arm.com>
12867         * expr.c (expand_assignment): Cope with polynomial mode sizes
12868         when assigning to a CONCAT.
12870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12871             Alan Hayward  <alan.hayward@arm.com>
12872             David Sherwood  <david.sherwood@arm.com>
12874         * machmode.h (mode_precision): Change from unsigned short to
12875         poly_uint16_pod.
12876         (mode_to_precision): Return a poly_uint16 rather than an unsigned
12877         short.
12878         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
12879         or if measurement_type is not polynomial.
12880         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
12881         in which the mode is already known to be a scalar_int_mode.
12882         * genmodes.c (emit_mode_precision): Change the type of mode_precision
12883         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
12884         initializer.
12885         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12886         for GET_MODE_PRECISION.
12887         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12888         for GET_MODE_PRECISION.
12889         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
12890         as polynomial.
12891         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
12892         (expand_field_assignment, make_extraction): Likewise.
12893         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
12894         (get_last_value): Likewise.
12895         * convert.c (convert_to_integer_1): Likewise.
12896         * cse.c (cse_insn): Likewise.
12897         * expr.c (expand_expr_real_1): Likewise.
12898         * lra-constraints.c (simplify_operand_subreg): Likewise.
12899         * optabs-query.c (can_atomic_load_p): Likewise.
12900         * optabs.c (expand_atomic_load): Likewise.
12901         (expand_atomic_store): Likewise.
12902         * ree.c (combine_reaching_defs): Likewise.
12903         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
12904         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
12905         * tree.h (type_has_mode_precision_p): Likewise.
12906         * ubsan.c (instrument_si_overflow): Likewise.
12908 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12909             Alan Hayward  <alan.hayward@arm.com>
12910             David Sherwood  <david.sherwood@arm.com>
12912         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
12913         polynomial numbers of units.
12914         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
12915         (valid_vector_subparts_p): New function.
12916         (build_vector_type): Remove temporary shim and take the number
12917         of units as a poly_uint64 rather than an int.
12918         (build_opaque_vector_type): Take the number of units as a
12919         poly_uint64 rather than an int.
12920         * tree.c (build_vector_from_ctor): Handle polynomial
12921         TYPE_VECTOR_SUBPARTS.
12922         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
12923         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
12924         (build_vector_from_val): If the number of units is variable,
12925         use build_vec_duplicate_cst for constant operands and
12926         VEC_DUPLICATE_EXPR otherwise.
12927         (make_vector_type): Remove temporary is_constant ().
12928         (build_vector_type, build_opaque_vector_type): Take the number of
12929         units as a poly_uint64 rather than an int.
12930         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
12931         VECTOR_CST_NELTS.
12932         * cfgexpand.c (expand_debug_expr): Likewise.
12933         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
12934         (store_constructor, expand_expr_real_1): Likewise.
12935         (const_scalar_mask_from_tree): Likewise.
12936         * fold-const-call.c (fold_const_reduction): Likewise.
12937         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
12938         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
12939         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
12940         (fold_relational_const): Likewise.
12941         (native_interpret_vector): Likewise.  Change the size from an
12942         int to an unsigned int.
12943         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
12944         TYPE_VECTOR_SUBPARTS.
12945         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
12946         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
12947         duplicating a non-constant operand into a variable-length vector.
12948         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
12949         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
12950         * ipa-icf.c (sem_variable::equals): Likewise.
12951         * match.pd: Likewise.
12952         * omp-simd-clone.c (simd_clone_subparts): Likewise.
12953         * print-tree.c (print_node): Likewise.
12954         * stor-layout.c (layout_type): Likewise.
12955         * targhooks.c (default_builtin_vectorization_cost): Likewise.
12956         * tree-cfg.c (verify_gimple_comparison): Likewise.
12957         (verify_gimple_assign_binary): Likewise.
12958         (verify_gimple_assign_ternary): Likewise.
12959         (verify_gimple_assign_single): Likewise.
12960         * tree-pretty-print.c (dump_generic_node): Likewise.
12961         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12962         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
12963         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
12964         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
12965         (vect_shift_permute_load_chain): Likewise.
12966         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
12967         (expand_vector_condition, optimize_vector_constructor): Likewise.
12968         (lower_vec_perm, get_compute_type): Likewise.
12969         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12970         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
12971         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12972         (vect_recog_mask_conversion_pattern): Likewise.
12973         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
12974         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
12975         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12976         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
12977         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
12978         (vectorizable_shift, vectorizable_operation, vectorizable_store)
12979         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
12980         (supportable_widening_operation): Likewise.
12981         (supportable_narrowing_operation): Likewise.
12982         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
12983         Likewise.
12984         * varasm.c (output_constant): Likewise.
12986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12987             Alan Hayward  <alan.hayward@arm.com>
12988             David Sherwood  <david.sherwood@arm.com>
12990         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
12991         so that both the length == 3 and length != 3 cases set up their
12992         own permute vectors.  Add comments explaining why we know the
12993         number of elements is constant.
12994         (vect_permute_load_chain): Likewise.
12996 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
12997             Alan Hayward  <alan.hayward@arm.com>
12998             David Sherwood  <david.sherwood@arm.com>
13000         * machmode.h (mode_nunits): Change from unsigned char to
13001         poly_uint16_pod.
13002         (ONLY_FIXED_SIZE_MODES): New macro.
13003         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13004         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13005         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13006         New typedefs.
13007         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13008         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13009         or if measurement_type is not polynomial.
13010         * genmodes.c (ZERO_COEFFS): New macro.
13011         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13012         poly_uint16.
13013         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13014         Use ZERO_COEFFS when emitting initializers.
13015         * data-streamer.h (bp_pack_poly_value): New function.
13016         (bp_unpack_poly_value): Likewise.
13017         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13018         for GET_MODE_NUNITS.
13019         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13020         for GET_MODE_NUNITS.
13021         * tree.c (make_vector_type): Remove temporary shim and make
13022         the real function take the number of units as a poly_uint64
13023         rather than an int.
13024         (build_vector_type_for_mode): Handle polynomial nunits.
13025         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13026         * emit-rtl.c (const_vec_series_p_1): Likewise.
13027         (gen_rtx_CONST_VECTOR): Likewise.
13028         * fold-const.c (test_vec_duplicate_folding): Likewise.
13029         * genrecog.c (validate_pattern): Likewise.
13030         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13031         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13032         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13033         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13034         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13035         * rtlanal.c (subreg_get_info): Likewise.
13036         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13037         (vect_grouped_load_supported): Likewise.
13038         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13039         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13040         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13041         (simplify_const_unary_operation, simplify_binary_operation_1)
13042         (simplify_const_binary_operation, simplify_ternary_operation)
13043         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13044         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13045         instead of CONST_VECTOR_NUNITS.
13046         * varasm.c (output_constant_pool_2): Likewise.
13047         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13048         explicit-encoded elements in the XVEC for variable-length vectors.
13050 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13052         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13054 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13055             Alan Hayward  <alan.hayward@arm.com>
13056             David Sherwood  <david.sherwood@arm.com>
13058         * coretypes.h (fixed_size_mode): Declare.
13059         (fixed_size_mode_pod): New typedef.
13060         * builtins.h (target_builtins::x_apply_args_mode)
13061         (target_builtins::x_apply_result_mode): Change type to
13062         fixed_size_mode_pod.
13063         * builtins.c (apply_args_size, apply_result_size, result_vector)
13064         (expand_builtin_apply_args_1, expand_builtin_apply)
13065         (expand_builtin_return): Update accordingly.
13067 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13069         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13070         * cselib.c (cselib_hash_rtx): Likewise.
13071         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13072         CONST_VECTOR encoding.
13074 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13075             Jeff Law  <law@redhat.com>
13077         PR target/83641
13078         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13079         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13080         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13081         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13083         PR target/83641
13084         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13085         explicitly probe *sp in a noreturn function if there were any callee
13086         register saves or frame pointer is needed.
13088 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13090         PR debug/83621
13091         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13092         BLKmode for ternary, binary or unary expressions.
13094         PR debug/83645
13095         * var-tracking.c (delete_vta_debug_insn): New inline function.
13096         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13097         insns from get_insns () to NULL instead of each bb separately.
13098         Use delete_vta_debug_insn.  No longer static.
13099         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13100         delete_vta_debug_insns callers.
13101         * rtl.h (delete_vta_debug_insns): Declare.
13102         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13103         instead of variable_tracking_main.
13105 2018-01-03  Martin Sebor  <msebor@redhat.com>
13107         PR tree-optimization/83603
13108         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13109         arguments past the endof the argument list in functions declared
13110         without a prototype.
13111         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13112         Avoid checking when arguments are null.
13114 2018-01-03  Martin Sebor  <msebor@redhat.com>
13116         PR c/83559
13117         * doc/extend.texi (attribute const): Fix a typo.
13118         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13119         issuing -Wsuggest-attribute for void functions.
13121 2018-01-03  Martin Sebor  <msebor@redhat.com>
13123         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13124         offset_int::from instead of wide_int::to_shwi.
13125         (maybe_diag_overlap): Remove assertion.
13126         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13127         * gimple-ssa-sprintf.c (format_directive): Same.
13128         (parse_directive): Same.
13129         (sprintf_dom_walker::compute_format_length): Same.
13130         (try_substitute_return_value): Same.
13132 2018-01-03  Jeff Law  <law@redhat.com>
13134         PR middle-end/83654
13135         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13136         non-constant residual for zero at runtime and avoid probing in
13137         that case.  Reorganize code for trailing problem to mirror handling
13138         of the residual.
13140 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13142         PR tree-optimization/83501
13143         * tree-ssa-strlen.c (get_string_cst): New.
13144         (handle_char_store): Call get_string_cst.
13146 2018-01-03  Martin Liska  <mliska@suse.cz>
13148         PR tree-optimization/83593
13149         * tree-ssa-strlen.c: Include tree-cfg.h.
13150         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13151         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13152         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13153         to false.
13154         (strlen_dom_walker::before_dom_children): Call
13155         gimple_purge_dead_eh_edges. Dump tranformation with details
13156         dump flags.
13157         (strlen_dom_walker::before_dom_children): Update call by adding
13158         new argument cleanup_eh.
13159         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13161 2018-01-03  Martin Liska  <mliska@suse.cz>
13163         PR ipa/83549
13164         * cif-code.def (VARIADIC_THUNK): New enum value.
13165         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13166         thunks.
13168 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13170         * sse.md (mov<mode>_internal): Tighten condition for when to use
13171         vmovdqu<ssescalarsize> for TI and OI modes.
13173 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13175         Update copyright years.
13177 2018-01-03  Martin Liska  <mliska@suse.cz>
13179         PR ipa/83594
13180         * ipa-visibility.c (function_and_variable_visibility): Skip
13181         functions with noipa attribure.
13183 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13185         * gcc.c (process_command): Update copyright notice dates.
13186         * gcov-dump.c (print_version): Ditto.
13187         * gcov.c (print_version): Ditto.
13188         * gcov-tool.c (print_version): Ditto.
13189         * gengtype.c (create_file): Ditto.
13190         * doc/cpp.texi: Bump @copying's copyright year.
13191         * doc/cppinternals.texi: Ditto.
13192         * doc/gcc.texi: Ditto.
13193         * doc/gccint.texi: Ditto.
13194         * doc/gcov.texi: Ditto.
13195         * doc/install.texi: Ditto.
13196         * doc/invoke.texi: Ditto.
13198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13200         * vector-builder.h (vector_builder::m_full_nelts): Change from
13201         unsigned int to poly_uint64.
13202         (vector_builder::full_nelts): Update prototype accordingly.
13203         (vector_builder::new_vector): Likewise.
13204         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13205         (vector_builder::operator ==): Likewise.
13206         (vector_builder::finalize): Likewise.
13207         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13208         Take the number of elements as a poly_uint64 rather than an
13209         unsigned int.
13210         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13211         from unsigned int to poly_uint64.
13212         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13213         (vec_perm_indices::new_vector): Likewise.
13214         (vec_perm_indices::length): Likewise.
13215         (vec_perm_indices::nelts_per_input): Likewise.
13216         (vec_perm_indices::input_nelts): Likewise.
13217         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13218         number of elements per input as a poly_uint64 rather than an
13219         unsigned int.  Use the original encoding for variable-length
13220         vectors, rather than clamping each individual element.
13221         For the second and subsequent elements in each pattern,
13222         clamp the step and base before clamping their sum.
13223         (vec_perm_indices::series_p): Handle polynomial element counts.
13224         (vec_perm_indices::all_in_range_p): Likewise.
13225         (vec_perm_indices_to_tree): Likewise.
13226         (vec_perm_indices_to_rtx): Likewise.
13227         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13228         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13229         (tree_vector_builder::new_binary_operation): Handle polynomial
13230         element counts.  Return false if we need to know the number
13231         of elements at compile time.
13232         * fold-const.c (fold_vec_perm): Punt if the number of elements
13233         isn't known at compile time.
13235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13237         * vec-perm-indices.h (vec_perm_builder): Change element type
13238         from HOST_WIDE_INT to poly_int64.
13239         (vec_perm_indices::element_type): Update accordingly.
13240         (vec_perm_indices::clamp): Handle polynomial element_types.
13241         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13242         (vec_perm_indices::all_in_range_p): Likewise.
13243         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13244         than shwi trees.
13245         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13246         polynomial vec_perm_indices element types.
13247         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13248         * fold-const.c (fold_vec_perm): Likewise.
13249         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13250         * tree-vect-generic.c (lower_vec_perm): Likewise.
13251         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13252         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13253         element type to HOST_WIDE_INT.
13255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13256             Alan Hayward  <alan.hayward@arm.com>
13257             David Sherwood  <david.sherwood@arm.com>
13259         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13260         rather than an int.  Use plus_constant.
13261         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13262         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13265             Alan Hayward  <alan.hayward@arm.com>
13266             David Sherwood  <david.sherwood@arm.com>
13268         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13269         a HOST_WIDE_INT to a poly_int64.
13271 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13272             Alan Hayward  <alan.hayward@arm.com>
13273             David Sherwood  <david.sherwood@arm.com>
13275         * calls.c (load_register_parameters): Cope with polynomial
13276         mode sizes.  Require a constant size for BLKmode parameters
13277         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13278         forces a parameter to be padded at the lsb end in order to
13279         fill a complete number of words, require the parameter size
13280         to be ordered wrt UNITS_PER_WORD.
13282 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13283             Alan Hayward  <alan.hayward@arm.com>
13284             David Sherwood  <david.sherwood@arm.com>
13286         * reload1.c (spill_stack_slot_width): Change element type
13287         from unsigned int to poly_uint64_pod.
13288         (alter_reg): Treat mode sizes as polynomial.
13290 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13291             Alan Hayward  <alan.hayward@arm.com>
13292             David Sherwood  <david.sherwood@arm.com>
13294         * reload.c (complex_word_subreg_p): New function.
13295         (reload_inner_reg_of_subreg, push_reload): Use it.
13297 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13298             Alan Hayward  <alan.hayward@arm.com>
13299             David Sherwood  <david.sherwood@arm.com>
13301         * lra-constraints.c (process_alt_operands): Reject matched
13302         operands whose sizes aren't ordered.
13303         (match_reload): Refer to this check here.
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         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13310         that the mode size is in the set {1, 2, 4, 8, 16}.
13312 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13313             Alan Hayward  <alan.hayward@arm.com>
13314             David Sherwood  <david.sherwood@arm.com>
13316         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13317         Use plus_constant instead of gen_rtx_PLUS.
13319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13320             Alan Hayward  <alan.hayward@arm.com>
13321             David Sherwood  <david.sherwood@arm.com>
13323         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13324         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13325         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13326         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13327         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13328         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13329         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13330         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13331         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13332         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13333         a poly_int64.
13334         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13335         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13336         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13337         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13338         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13339         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13340         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13341         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13342         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13343         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13344         function.
13345         * expr.c (emit_move_resolve_push): Treat the input and result
13346         of PUSH_ROUNDING as a poly_int64.
13347         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13348         (emit_push_insn): Likewise.
13349         * lra-eliminations.c (mark_not_eliminable): Likewise.
13350         * recog.c (push_operand): Likewise.
13351         * reload1.c (elimination_effects): Likewise.
13352         * rtlanal.c (nonzero_bits1): Likewise.
13353         * calls.c (store_one_arg): Likewise.  Require the padding to be
13354         known at compile time.
13356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13357             Alan Hayward  <alan.hayward@arm.com>
13358             David Sherwood  <david.sherwood@arm.com>
13360         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13361         Use plus_constant instead of gen_rtx_PLUS.
13363 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13364             Alan Hayward  <alan.hayward@arm.com>
13365             David Sherwood  <david.sherwood@arm.com>
13367         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13368         rather than an int.
13370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13371             Alan Hayward  <alan.hayward@arm.com>
13372             David Sherwood  <david.sherwood@arm.com>
13374         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13375         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13376         via stack temporaries.  Treat the mode size as polynomial too.
13378 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13379             Alan Hayward  <alan.hayward@arm.com>
13380             David Sherwood  <david.sherwood@arm.com>
13382         * expr.c (expand_expr_real_2): When handling conversions involving
13383         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13384         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13385         as a poly_uint64 too.
13387 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13388             Alan Hayward  <alan.hayward@arm.com>
13389             David Sherwood  <david.sherwood@arm.com>
13391         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
13398         REGMODE_NATURAL_SIZE.
13399         * expmed.c (store_bit_field_1): Likewise.
13400         * expr.c (store_constructor): Likewise.
13401         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13402         and polynomial REGMODE_NATURAL_SIZE.
13403         (gen_lowpart_common): Likewise.
13404         * reginfo.c (record_subregs_of_mode): Likewise.
13405         * rtlanal.c (read_modify_subreg_p): Likewise.
13407 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13408             Alan Hayward  <alan.hayward@arm.com>
13409             David Sherwood  <david.sherwood@arm.com>
13411         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13412         numbers of elements.
13414 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13415             Alan Hayward  <alan.hayward@arm.com>
13416             David Sherwood  <david.sherwood@arm.com>
13418         * match.pd: Cope with polynomial numbers of vector elements.
13420 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13421             Alan Hayward  <alan.hayward@arm.com>
13422             David Sherwood  <david.sherwood@arm.com>
13424         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13425         in a POINTER_PLUS_EXPR.
13427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13428             Alan Hayward  <alan.hayward@arm.com>
13429             David Sherwood  <david.sherwood@arm.com>
13431         * omp-simd-clone.c (simd_clone_subparts): New function.
13432         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13433         (ipa_simd_modify_function_body): Likewise.
13435 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13436             Alan Hayward  <alan.hayward@arm.com>
13437             David Sherwood  <david.sherwood@arm.com>
13439         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13440         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13441         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13442         (expand_vector_condition, vector_element): Likewise.
13443         (subparts_gt): New function.
13444         (get_compute_type): Use subparts_gt.
13445         (count_type_subparts): Delete.
13446         (expand_vector_operations_1): Use subparts_gt instead of
13447         count_type_subparts.
13449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13450             Alan Hayward  <alan.hayward@arm.com>
13451             David Sherwood  <david.sherwood@arm.com>
13453         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13454         (vect_compile_time_alias): ...this new function.  Do the calculation
13455         on poly_ints rather than trees.
13456         (vect_prune_runtime_alias_test_list): Update call accordingly.
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-slp.c (vect_build_slp_tree_1): Handle polynomial
13463         numbers of units.
13464         (vect_schedule_slp_instance): Likewise.
13466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13467             Alan Hayward  <alan.hayward@arm.com>
13468             David Sherwood  <david.sherwood@arm.com>
13470         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13471         constant and extern definitions for variable-length vectors.
13472         (vect_get_constant_vectors): Note that the number of units
13473         is known to be constant.
13475 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13476             Alan Hayward  <alan.hayward@arm.com>
13477             David Sherwood  <david.sherwood@arm.com>
13479         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13480         of units as polynomial.  Choose between WIDE and NARROW based
13481         on multiple_p.
13483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13484             Alan Hayward  <alan.hayward@arm.com>
13485             David Sherwood  <david.sherwood@arm.com>
13487         * tree-vect-stmts.c (simd_clone_subparts): New function.
13488         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13490 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13491             Alan Hayward  <alan.hayward@arm.com>
13492             David Sherwood  <david.sherwood@arm.com>
13494         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13495         vectors as polynomial.  Use build_index_vector for
13496         IFN_GOMP_SIMD_LANE.
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 (get_load_store_type): Treat the number of
13503         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13504         for variable-length vectors.
13505         (vectorizable_mask_load_store): Treat the number of units as
13506         polynomial, asserting that it is constant if the condition has
13507         already been enforced.
13508         (vectorizable_store, vectorizable_load): Likewise.
13510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13511             Alan Hayward  <alan.hayward@arm.com>
13512             David Sherwood  <david.sherwood@arm.com>
13514         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13515         of units as polynomial.  Punt if we can't tell at compile time
13516         which vector contains the final result.
13518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13519             Alan Hayward  <alan.hayward@arm.com>
13520             David Sherwood  <david.sherwood@arm.com>
13522         * tree-vect-loop.c (vectorizable_induction): Treat the number
13523         of units as polynomial.  Punt on SLP inductions.  Use an integer
13524         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
13525         cast of such a series for variable-length floating-point
13526         reductions.
13528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13529             Alan Hayward  <alan.hayward@arm.com>
13530             David Sherwood  <david.sherwood@arm.com>
13532         * tree.h (build_index_vector): Declare.
13533         * tree.c (build_index_vector): New function.
13534         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
13535         of units as polynomial, forcibly converting it to a constant if
13536         vectorizable_reduction has already enforced the condition.
13537         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
13538         to create a {1,2,3,...} vector.
13539         (vectorizable_reduction): Treat the number of units as polynomial.
13540         Choose vectype_in based on the largest scalar element size rather
13541         than the smallest number of units.  Enforce the restrictions
13542         relied on above.
13544 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13545             Alan Hayward  <alan.hayward@arm.com>
13546             David Sherwood  <david.sherwood@arm.com>
13548         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
13549         number of units as polynomial.
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         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
13556         * target.def (autovectorize_vector_sizes): Return the vector sizes
13557         by pointer, using vector_sizes rather than a bitmask.
13558         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
13559         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
13560         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
13561         Likewise.
13562         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
13563         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
13564         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
13565         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
13566         * omp-general.c (omp_max_vf): Likewise.
13567         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13568         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
13569         * tree-vect-loop.c (vect_analyze_loop): Likewise.
13570         * tree-vect-slp.c (vect_slp_bb): Likewise.
13571         * doc/tm.texi: Regenerate.
13572         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
13573         to a poly_uint64.
13574         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
13575         the vector size as a poly_uint64 rather than an unsigned int.
13576         (current_vector_size): Change from an unsigned int to a poly_uint64.
13577         (get_vectype_for_scalar_type): Update accordingly.
13578         * tree.h (build_truth_vector_type): Take the size and number of
13579         units as a poly_uint64 rather than an unsigned int.
13580         (build_vector_type): Add a temporary overload that takes
13581         the number of units as a poly_uint64 rather than an unsigned int.
13582         * tree.c (make_vector_type): Likewise.
13583         (build_truth_vector_type): Take the number of units as a poly_uint64
13584         rather than an unsigned int.
13586 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13587             Alan Hayward  <alan.hayward@arm.com>
13588             David Sherwood  <david.sherwood@arm.com>
13590         * target.def (get_mask_mode): Take the number of units and length
13591         as poly_uint64s rather than unsigned ints.
13592         * targhooks.h (default_get_mask_mode): Update accordingly.
13593         * targhooks.c (default_get_mask_mode): Likewise.
13594         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13595         * doc/tm.texi: Regenerate.
13597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13598             Alan Hayward  <alan.hayward@arm.com>
13599             David Sherwood  <david.sherwood@arm.com>
13601         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
13602         * omp-general.c (omp_max_vf): Likewise.
13603         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
13604         (expand_omp_simd): Handle polynomial safelen.
13605         * omp-low.c (omplow_simd_context): Add a default constructor.
13606         (omplow_simd_context::max_vf): Change from int to poly_uint64.
13607         (lower_rec_simd_input_clauses): Update accordingly.
13608         (lower_rec_input_clauses): Likewise.
13610 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13611             Alan Hayward  <alan.hayward@arm.com>
13612             David Sherwood  <david.sherwood@arm.com>
13614         * tree-vectorizer.h (vect_nunits_for_cost): New function.
13615         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
13616         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
13617         (vect_analyze_slp_cost): Likewise.
13618         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
13619         (vect_model_load_cost): Likewise.
13621 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13622             Alan Hayward  <alan.hayward@arm.com>
13623             David Sherwood  <david.sherwood@arm.com>
13625         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
13626         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
13627         from an unsigned int * to a poly_uint64_pod *.
13628         (calculate_unrolling_factor): New function.
13629         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
13631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13632             Alan Hayward  <alan.hayward@arm.com>
13633             David Sherwood  <david.sherwood@arm.com>
13635         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
13636         from an unsigned int to a poly_uint64.
13637         (_loop_vec_info::slp_unrolling_factor): Likewise.
13638         (_loop_vec_info::vectorization_factor): Change from an int
13639         to a poly_uint64.
13640         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
13641         (vect_get_num_vectors): New function.
13642         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
13643         (vect_get_num_copies): Use vect_get_num_vectors.
13644         (vect_analyze_data_ref_dependences): Change max_vf from an int *
13645         to an unsigned int *.
13646         (vect_analyze_data_refs): Change min_vf from an int * to a
13647         poly_uint64 *.
13648         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13649         than an unsigned HOST_WIDE_INT.
13650         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13651         (vect_analyze_data_ref_dependence): Change max_vf from an int *
13652         to an unsigned int *.
13653         (vect_analyze_data_ref_dependences): Likewise.
13654         (vect_compute_data_ref_alignment): Handle polynomial vf.
13655         (vect_enhance_data_refs_alignment): Likewise.
13656         (vect_prune_runtime_alias_test_list): Likewise.
13657         (vect_shift_permute_load_chain): Likewise.
13658         (vect_supportable_dr_alignment): Likewise.
13659         (dependence_distance_ge_vf): Take the vectorization factor as a
13660         poly_uint64 rather than an unsigned HOST_WIDE_INT.
13661         (vect_analyze_data_refs): Change min_vf from an int * to a
13662         poly_uint64 *.
13663         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
13664         vfm1 as a poly_uint64 rather than an int.  Make the same change
13665         for the returned bound_scalar.
13666         (vect_gen_vector_loop_niters): Handle polynomial vf.
13667         (vect_do_peeling): Likewise.  Update call to
13668         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
13669         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
13670         be constant.
13671         * tree-vect-loop.c (vect_determine_vectorization_factor)
13672         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
13673         (vect_get_known_peeling_cost): Likewise.
13674         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
13675         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
13676         (vect_transform_loop): Likewise.  Use the lowest possible VF when
13677         updating the upper bounds of the loop.
13678         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
13679         rather than an int.
13680         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
13681         polynomial unroll factors.
13682         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
13683         (vect_make_slp_decision): Likewise.
13684         (vect_supported_load_permutation_p): Likewise, and polynomial
13685         vf too.
13686         (vect_analyze_slp_cost): Handle polynomial vf.
13687         (vect_slp_analyze_node_operations): Likewise.
13688         (vect_slp_analyze_bb_1): Likewise.
13689         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
13690         than an unsigned HOST_WIDE_INT.
13691         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
13692         (vectorizable_load): Handle polynomial vf.
13693         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
13694         a poly_uint64.
13695         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
13697 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13698             Alan Hayward  <alan.hayward@arm.com>
13699             David Sherwood  <david.sherwood@arm.com>
13701         * match.pd: Handle bit operations involving three constants
13702         and try to fold one pair.
13704 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13706         * tree-vect-loop-manip.c: Include gimple-fold.h.
13707         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
13708         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
13709         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
13710         Add a path that uses a step of VF instead of 1, but disable it
13711         for now.
13712         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
13713         and niters_no_overflow parameters.  Update calls to
13714         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
13715         Create a new SSA name if the latter choses to use a ste other
13716         than zero, and return it via niters_vector_mult_vf_var.
13717         * tree-vect-loop.c (vect_transform_loop): Update calls to
13718         vect_do_peeling, vect_gen_vector_loop_niters and
13719         slpeel_make_loop_iterate_ntimes.
13720         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
13721         (vect_gen_vector_loop_niters): Update declarations after above changes.
13723 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
13725         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
13726         128-bit round to integer instructions.
13727         (ceil<mode>2): Likewise.
13728         (btrunc<mode>2): Likewise.
13729         (round<mode>2): Likewise.
13731 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13733         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
13734         unaligned VSX load/store on P8/P9.
13735         (expand_block_clear): Allow the use of unaligned VSX
13736         load/store on P8/P9.
13738 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13740         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
13741         New function.
13742         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
13743         swap associated with both a load and a store.
13745 2018-01-02  Andrew Waterman  <andrew@sifive.com>
13747         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
13748         * config/riscv/riscv.md (clear_cache): Use it.
13750 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
13752         * web.c: Remove out-of-date comment.
13754 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13756         * expr.c (fixup_args_size_notes): Check that any existing
13757         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
13758         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
13759         (emit_single_push_insn): ...here.
13761 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13763         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
13764         (const_vector_encoded_nelts): New function.
13765         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
13766         (const_vector_int_elt, const_vector_elt): Declare.
13767         * emit-rtl.c (const_vector_int_elt_1): New function.
13768         (const_vector_elt): Likewise.
13769         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
13770         of CONST_VECTOR_ELT.
13772 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13774         * expr.c: Include rtx-vector-builder.h.
13775         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
13776         directly on the tree encoding.
13777         (const_vector_from_tree): Likewise.
13778         * optabs.c: Include rtx-vector-builder.h.
13779         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
13780         sequence of "u" values.
13781         * vec-perm-indices.c: Include rtx-vector-builder.h.
13782         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
13783         directly on the vec_perm_indices encoding.
13785 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13787         * doc/rtl.texi (const_vector): Describe new encoding scheme.
13788         * Makefile.in (OBJS): Add rtx-vector-builder.o.
13789         * rtx-vector-builder.h: New file.
13790         * rtx-vector-builder.c: Likewise.
13791         * rtl.h (rtx_def::u2): Add a const_vector field.
13792         (CONST_VECTOR_NPATTERNS): New macro.
13793         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
13794         (CONST_VECTOR_DUPLICATE_P): Likewise.
13795         (CONST_VECTOR_STEPPED_P): Likewise.
13796         (CONST_VECTOR_ENCODED_ELT): Likewise.
13797         (const_vec_duplicate_p): Check for a duplicated vector encoding.
13798         (unwrap_const_vec_duplicate): Likewise.
13799         (const_vec_series_p): Check for a non-duplicated vector encoding.
13800         Say that the function only returns true for integer vectors.
13801         * emit-rtl.c: Include rtx-vector-builder.h.
13802         (gen_const_vec_duplicate_1): Delete.
13803         (gen_const_vector): Call gen_const_vec_duplicate instead of
13804         gen_const_vec_duplicate_1.
13805         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
13806         (gen_const_vec_duplicate): Use rtx_vector_builder.
13807         (gen_const_vec_series): Likewise.
13808         (gen_rtx_CONST_VECTOR): Likewise.
13809         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
13810         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13811         Build a new vector rather than modifying a CONST_VECTOR in-place.
13812         (handle_special_swappables): Update call accordingly.
13813         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
13814         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
13815         Build a new vector rather than modifying a CONST_VECTOR in-place.
13816         (handle_special_swappables): Update call accordingly.
13818 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13820         * simplify-rtx.c (simplify_const_binary_operation): Use
13821         CONST_VECTOR_ELT instead of XVECEXP.
13823 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13825         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
13826         the selector elements to be different from the data elements
13827         if the selector is a VECTOR_CST.
13828         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
13829         ssizetype for the selector.
13831 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13833         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
13834         before testing each element individually.
13835         * tree-vect-generic.c (lower_vec_perm): Likewise.
13837 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13839         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
13840         * selftest-run-tests.c (selftest::run_tests): Call it.
13841         * vector-builder.h (vector_builder::operator ==): New function.
13842         (vector_builder::operator !=): Likewise.
13843         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
13844         (vec_perm_indices::all_from_input_p): New function.
13845         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13846         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
13847         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
13848         instead of reading the VECTOR_CST directly.  Detect whether both
13849         vector inputs are the same before constructing the vec_perm_indices,
13850         and update the number of inputs argument accordingly.  Use the
13851         utility functions added above.  Only construct sel2 if we need to.
13853 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13855         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
13856         the broadcast of the low byte.
13857         (expand_mult_highpart): Use an explicit encoding for the permutes.
13858         * optabs-query.c (can_mult_highpart_p): Likewise.
13859         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13860         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13861         (vectorizable_bswap): Likewise.
13862         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
13863         explicit encoding for the power-of-2 permutes.
13864         (vect_permute_store_chain): Likewise.
13865         (vect_grouped_load_supported): Likewise.
13866         (vect_permute_load_chain): Likewise.
13868 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13870         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
13871         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
13872         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
13873         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13874         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
13875         (vect_gen_perm_mask_any): Likewise.
13877 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13879         * int-vector-builder.h: New file.
13880         * vec-perm-indices.h: Include int-vector-builder.h.
13881         (vec_perm_indices): Redefine as an int_vector_builder.
13882         (auto_vec_perm_indices): Delete.
13883         (vec_perm_builder): Redefine as a stand-alone class.
13884         (vec_perm_indices::vec_perm_indices): New function.
13885         (vec_perm_indices::clamp): Likewise.
13886         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
13887         (vec_perm_indices::new_vector): New function.
13888         (vec_perm_indices::new_expanded_vector): Update for new
13889         vec_perm_indices class.
13890         (vec_perm_indices::rotate_inputs): New function.
13891         (vec_perm_indices::all_in_range_p): Operate directly on the
13892         encoded form, without computing elided elements.
13893         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
13894         encoding.  Update for new vec_perm_indices class.
13895         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
13896         the given vec_perm_builder.
13897         (expand_vec_perm_var): Update vec_perm_builder constructor.
13898         (expand_mult_highpart): Use vec_perm_builder instead of
13899         auto_vec_perm_indices.
13900         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
13901         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
13902         or double series encoding as appropriate.
13903         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
13904         vec_perm_indices instead of auto_vec_perm_indices.
13905         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13906         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13907         (vect_permute_store_chain): Likewise.
13908         (vect_grouped_load_supported): Likewise.
13909         (vect_permute_load_chain): Likewise.
13910         (vect_shift_permute_load_chain): Likewise.
13911         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13912         (vect_transform_slp_perm_load): Likewise.
13913         (vect_schedule_slp_instance): Likewise.
13914         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13915         (vectorizable_mask_load_store): Likewise.
13916         (vectorizable_bswap): Likewise.
13917         (vectorizable_store): Likewise.
13918         (vectorizable_load): Likewise.
13919         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
13920         vec_perm_indices instead of auto_vec_perm_indices.  Use
13921         tree_to_vec_perm_builder to read the vector from a tree.
13922         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
13923         vec_perm_builder instead of a vec_perm_indices.
13924         (have_whole_vector_shift): Use vec_perm_builder and
13925         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
13926         truncation to calc_vec_perm_mask_for_shift.
13927         (vect_create_epilog_for_reduction): Likewise.
13928         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
13929         from auto_vec_perm_indices to vec_perm_indices.
13930         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13931         instead of changing individual elements.
13932         (aarch64_vectorize_vec_perm_const): Use new_vector to install
13933         the vector in d.perm.
13934         * config/arm/arm.c (expand_vec_perm_d::perm): Change
13935         from auto_vec_perm_indices to vec_perm_indices.
13936         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13937         instead of changing individual elements.
13938         (arm_vectorize_vec_perm_const): Use new_vector to install
13939         the vector in d.perm.
13940         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
13941         Update vec_perm_builder constructor.
13942         (rs6000_expand_interleave): Likewise.
13943         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
13944         (rs6000_expand_interleave): Likewise.
13946 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13948         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
13949         to qimode could truncate the indices.
13950         * optabs.c (expand_vec_perm_var): Likewise.
13952 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
13954         * Makefile.in (OBJS): Add vec-perm-indices.o.
13955         * vec-perm-indices.h: New file.
13956         * vec-perm-indices.c: Likewise.
13957         * target.h (vec_perm_indices): Replace with a forward class
13958         declaration.
13959         (auto_vec_perm_indices): Move to vec-perm-indices.h.
13960         * optabs.h: Include vec-perm-indices.h.
13961         (expand_vec_perm): Delete.
13962         (selector_fits_mode_p, expand_vec_perm_var): Declare.
13963         (expand_vec_perm_const): Declare.
13964         * target.def (vec_perm_const_ok): Replace with...
13965         (vec_perm_const): ...this new hook.
13966         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
13967         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
13968         * doc/tm.texi: Regenerate.
13969         * optabs.def (vec_perm_const): Delete.
13970         * doc/md.texi (vec_perm_const): Likewise.
13971         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
13972         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
13973         expand_vec_perm for constant permutation vectors.  Assert that
13974         the mode of variable permutation vectors is the integer equivalent
13975         of the mode that is being permuted.
13976         * optabs-query.h (selector_fits_mode_p): Declare.
13977         * optabs-query.c: Include vec-perm-indices.h.
13978         (selector_fits_mode_p): New function.
13979         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
13980         is defined, instead of checking whether the vec_perm_const_optab
13981         exists.  Use targetm.vectorize.vec_perm_const instead of
13982         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
13983         fit in the vector mode before using a variable permute.
13984         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
13985         vec_perm_indices instead of an rtx.
13986         (expand_vec_perm): Replace with...
13987         (expand_vec_perm_const): ...this new function.  Take the selector
13988         as a vec_perm_indices rather than an rtx.  Also take the mode of
13989         the selector.  Update call to shift_amt_for_vec_perm_mask.
13990         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
13991         Use vec_perm_indices::new_expanded_vector to expand the original
13992         selector into bytes.  Check whether the indices fit in the vector
13993         mode before using a variable permute.
13994         (expand_vec_perm_var): Make global.
13995         (expand_mult_highpart): Use expand_vec_perm_const.
13996         * fold-const.c: Includes vec-perm-indices.h.
13997         * tree-ssa-forwprop.c: Likewise.
13998         * tree-vect-data-refs.c: Likewise.
13999         * tree-vect-generic.c: Likewise.
14000         * tree-vect-loop.c: Likewise.
14001         * tree-vect-slp.c: Likewise.
14002         * tree-vect-stmts.c: Likewise.
14003         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14004         Delete.
14005         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14006         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14007         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14008         (aarch64_vectorize_vec_perm_const): ...this new function.
14009         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14010         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14011         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14012         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14013         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14014         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14015         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14016         into...
14017         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14018         check for NEON modes.
14019         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14020         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14021         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14022         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14023         into...
14024         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14025         the old VEC_PERM_CONST conditions.
14026         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14027         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14028         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14029         (ia64_vectorize_vec_perm_const_ok): Merge into...
14030         (ia64_vectorize_vec_perm_const): ...this new function.
14031         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14032         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14033         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14034         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14035         * config/mips/mips.c (mips_expand_vec_perm_const)
14036         (mips_vectorize_vec_perm_const_ok): Merge into...
14037         (mips_vectorize_vec_perm_const): ...this new function.
14038         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14039         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14040         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14041         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14042         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14043         (rs6000_expand_vec_perm_const): Delete.
14044         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14045         Delete.
14046         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14047         (altivec_expand_vec_perm_const_le): Take each operand individually.
14048         Operate on constant selectors rather than rtxes.
14049         (altivec_expand_vec_perm_const): Likewise.  Update call to
14050         altivec_expand_vec_perm_const_le.
14051         (rs6000_expand_vec_perm_const): Delete.
14052         (rs6000_vectorize_vec_perm_const_ok): Delete.
14053         (rs6000_vectorize_vec_perm_const): New function.
14054         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14055         an element count and rtx array.
14056         (rs6000_expand_extract_even): Update call accordingly.
14057         (rs6000_expand_interleave): Likewise.
14058         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14059         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14060         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14061         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14062         (rs6000_expand_vec_perm_const): Delete.
14063         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14064         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14065         (altivec_expand_vec_perm_const_le): Take each operand individually.
14066         Operate on constant selectors rather than rtxes.
14067         (altivec_expand_vec_perm_const): Likewise.  Update call to
14068         altivec_expand_vec_perm_const_le.
14069         (rs6000_expand_vec_perm_const): Delete.
14070         (rs6000_vectorize_vec_perm_const_ok): Delete.
14071         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14072         reference to the SPE evmerge intructions.
14073         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14074         an element count and rtx array.
14075         (rs6000_expand_extract_even): Update call accordingly.
14076         (rs6000_expand_interleave): Likewise.
14077         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14078         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14079         new function.
14080         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14082 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14084         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14085         vector mode and that that mode matches the mode of the data
14086         being permuted.
14087         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14088         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14089         directly using expand_vec_perm_1 when forcing selectors into
14090         registers.
14091         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14093 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14095         * optabs-query.h (can_vec_perm_p): Delete.
14096         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14097         * optabs-query.c (can_vec_perm_p): Split into...
14098         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14099         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14100         particular selector is valid.
14101         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14102         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14103         (vect_grouped_load_supported): Likewise.
14104         (vect_shift_permute_load_chain): Likewise.
14105         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14106         (vect_transform_slp_perm_load): Likewise.
14107         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14108         (vectorizable_bswap): Likewise.
14109         (vect_gen_perm_mask_checked): Likewise.
14110         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14111         implementations of variable permutation vectors into account
14112         when deciding which selector to use.
14113         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14114         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14115         with a false third argument.
14116         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14117         to test whether the constant selector is valid and can_vec_perm_var_p
14118         to test whether a variable selector is valid.
14120 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14122         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14123         * optabs-query.c (can_vec_perm_p): Likewise.
14124         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14125         instead of vec_perm_indices.
14126         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14127         (vect_gen_perm_mask_checked): Likewise,
14128         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14129         (vect_gen_perm_mask_checked): Likewise,
14131 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14133         * optabs-query.h (qimode_for_vec_perm): Declare.
14134         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14135         (qimode_for_vec_perm): ...this new function.
14136         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14138 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14140         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14141         does not have a conditional at the top.
14143 2018-01-02  Richard Biener  <rguenther@suse.de>
14145         * ipa-inline.c (big_speedup_p): Fix expression.
14147 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14149         PR target/81616
14150         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14151         for generic 4->6.
14153 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14155         PR target/81616
14156         Generic tuning.
14157         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14158         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14159         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14160         cond_taken_branch_cost 3->4.
14162 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14164         PR tree-optimization/83581
14165         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14166         TODO_cleanup_cfg if any changes have been made.
14168         PR middle-end/83608
14169         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14170         convert_modes if target mode has the right side, but different mode
14171         class.
14173         PR middle-end/83609
14174         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14175         last argument when extracting from CONCAT.  If either from_real or
14176         from_imag is NULL, use expansion through memory.  If result is not
14177         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14178         the parts directly to inner mode, if even that fails, use expansion
14179         through memory.
14181         PR middle-end/83623
14182         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14183         check for bswap in mode rather than HImode and use that in expand_unop
14184         too.
14186 Copyright (C) 2018 Free Software Foundation, Inc.
14188 Copying and distribution of this file, with or without modification,
14189 are permitted in any medium without royalty provided the copyright
14190 notice and this notice are preserved.